1 /* moonshot-identity-request.c generated by valac 0.24.0, the Vala compiler
2 * generated from moonshot-identity-request.vala, do not modify */
5 * Copyright (c) 2011-2014, JANET(UK)
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
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.
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.
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
37 #include <glib-object.h>
43 #define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
44 #define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
45 #define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
46 #define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
47 #define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
48 #define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
50 typedef struct _IdentityRequest IdentityRequest;
51 typedef struct _IdentityRequestClass IdentityRequestClass;
52 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
54 #define TYPE_ID_CARD (id_card_get_type ())
55 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
56 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
57 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
58 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
59 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
61 typedef struct _IdCard IdCard;
62 typedef struct _IdCardClass IdCardClass;
64 #define TYPE_IDENTITY_MANAGER_APP (identity_manager_app_get_type ())
65 #define IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp))
66 #define IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
67 #define IS_IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_APP))
68 #define IS_IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_APP))
69 #define IDENTITY_MANAGER_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
71 typedef struct _IdentityManagerApp IdentityManagerApp;
72 typedef struct _IdentityManagerAppClass IdentityManagerAppClass;
73 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
74 #define _identity_manager_app_unref0(var) ((var == NULL) ? NULL : (var = (identity_manager_app_unref (var), NULL)))
75 #define _g_free0(var) (var = (g_free (var), NULL))
76 #define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
77 typedef struct _IdentityManagerAppPrivate IdentityManagerAppPrivate;
79 #define TYPE_IDENTITY_MANAGER_MODEL (identity_manager_model_get_type ())
80 #define IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModel))
81 #define IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
82 #define IS_IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_MODEL))
83 #define IS_IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_MODEL))
84 #define IDENTITY_MANAGER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
86 typedef struct _IdentityManagerModel IdentityManagerModel;
87 typedef struct _IdentityManagerModelClass IdentityManagerModelClass;
89 #define TYPE_IDENTITY_MANAGER_VIEW (identity_manager_view_get_type ())
90 #define IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerView))
91 #define IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
92 #define IS_IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_VIEW))
93 #define IS_IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_VIEW))
94 #define IDENTITY_MANAGER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
96 typedef struct _IdentityManagerView IdentityManagerView;
97 typedef struct _IdentityManagerViewClass IdentityManagerViewClass;
99 typedef void (*ReturnIdentityCallback) (IdentityRequest* request, void* user_data);
100 struct _IdentityRequest {
101 GObject parent_instance;
102 IdentityRequestPrivate * priv;
105 gboolean select_default;
112 struct _IdentityRequestClass {
113 GObjectClass parent_class;
116 struct _IdentityRequestPrivate {
117 IdentityManagerApp* parent_app;
118 ReturnIdentityCallback callback;
119 gpointer callback_target;
120 GDestroyNotify callback_target_destroy_notify;
123 struct _IdentityManagerApp {
124 GTypeInstance parent_instance;
125 volatile int ref_count;
126 IdentityManagerAppPrivate * priv;
127 IdentityManagerModel* model;
128 IdCard* default_id_card;
129 gboolean explicitly_launched;
130 IdentityManagerView* view;
133 struct _IdentityManagerAppClass {
134 GTypeClass parent_class;
135 void (*finalize) (IdentityManagerApp *self);
139 static gpointer identity_request_parent_class = NULL;
141 GType identity_request_get_type (void) G_GNUC_CONST;
142 GType id_card_get_type (void) G_GNUC_CONST;
143 gpointer identity_manager_app_ref (gpointer instance);
144 void identity_manager_app_unref (gpointer instance);
145 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
146 void value_set_identity_manager_app (GValue* value, gpointer v_object);
147 void value_take_identity_manager_app (GValue* value, gpointer v_object);
148 gpointer value_get_identity_manager_app (const GValue* value);
149 GType identity_manager_app_get_type (void) G_GNUC_CONST;
150 #define IDENTITY_REQUEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IDENTITY_REQUEST, IdentityRequestPrivate))
152 IDENTITY_REQUEST_DUMMY_PROPERTY
154 static void _g_object_unref0_ (gpointer var);
155 static void _g_slist_free__g_object_unref0_ (GSList* self);
156 IdentityRequest* identity_request_new (IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service);
157 IdentityRequest* identity_request_construct (GType object_type, IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service);
158 IdentityRequest* identity_request_new_default (IdentityManagerApp* app);
159 IdentityRequest* identity_request_construct_default (GType object_type, IdentityManagerApp* app);
160 void identity_request_set_callback (IdentityRequest* self, ReturnIdentityCallback cb, void* cb_target, GDestroyNotify cb_target_destroy_notify);
161 gboolean identity_request_execute (IdentityRequest* self);
162 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request);
163 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card);
164 gchar** id_card_get_services (IdCard* self, int* result_length1);
165 void id_card_set_services (IdCard* self, gchar** value, int value_length1);
166 GType identity_manager_model_get_type (void) G_GNUC_CONST;
167 GType identity_manager_view_get_type (void) G_GNUC_CONST;
168 IdCard* identity_manager_model_update_card (IdentityManagerModel* self, IdCard* card);
169 static void identity_request_finalize (GObject* obj);
170 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
171 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
174 static void _g_object_unref0_ (gpointer var) {
175 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
176 (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
177 #line 178 "moonshot-identity-request.c"
181 static void _g_slist_free__g_object_unref0_ (GSList* self) {
182 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
183 g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
184 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
186 #line 187 "moonshot-identity-request.c"
190 static gpointer _identity_manager_app_ref0 (gpointer self) {
191 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
192 return self ? identity_manager_app_ref (self) : NULL;
193 #line 194 "moonshot-identity-request.c"
197 IdentityRequest* identity_request_construct (GType object_type, IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service) {
198 IdentityRequest * self = NULL;
199 IdentityManagerApp* _tmp0_ = NULL;
200 IdentityManagerApp* _tmp1_ = NULL;
201 const gchar* _tmp2_ = NULL;
202 gchar* _tmp3_ = NULL;
203 const gchar* _tmp4_ = NULL;
204 gchar* _tmp5_ = NULL;
205 const gchar* _tmp6_ = NULL;
206 gchar* _tmp7_ = NULL;
207 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
208 g_return_val_if_fail (app != NULL, NULL);
209 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
210 g_return_val_if_fail (nai != NULL, NULL);
211 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
212 g_return_val_if_fail (password != NULL, NULL);
213 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
214 g_return_val_if_fail (service != NULL, NULL);
215 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
216 self = (IdentityRequest*) g_object_new (object_type, NULL);
217 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
219 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
220 _tmp1_ = _identity_manager_app_ref0 (_tmp0_);
221 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
222 _identity_manager_app_unref0 (self->priv->parent_app);
223 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
224 self->priv->parent_app = _tmp1_;
225 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
227 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
228 _tmp3_ = g_strdup (_tmp2_);
229 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
230 _g_free0 (self->nai);
231 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
233 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
235 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
236 _tmp5_ = g_strdup (_tmp4_);
237 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
238 _g_free0 (self->password);
239 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
240 self->password = _tmp5_;
241 #line 55 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
243 #line 55 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
244 _tmp7_ = g_strdup (_tmp6_);
245 #line 55 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
246 _g_free0 (self->service);
247 #line 55 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
248 self->service = _tmp7_;
249 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
251 #line 252 "moonshot-identity-request.c"
255 IdentityRequest* identity_request_new (IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service) {
256 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
257 return identity_request_construct (TYPE_IDENTITY_REQUEST, app, nai, password, service);
258 #line 259 "moonshot-identity-request.c"
262 IdentityRequest* identity_request_construct_default (GType object_type, IdentityManagerApp* app) {
263 IdentityRequest * self = NULL;
264 IdentityManagerApp* _tmp0_ = NULL;
265 IdentityManagerApp* _tmp1_ = NULL;
266 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
267 g_return_val_if_fail (app != NULL, NULL);
268 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
269 self = (IdentityRequest*) g_object_new (object_type, NULL);
270 #line 60 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
272 #line 60 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
273 _tmp1_ = _identity_manager_app_ref0 (_tmp0_);
274 #line 60 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
275 _identity_manager_app_unref0 (self->priv->parent_app);
276 #line 60 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
277 self->priv->parent_app = _tmp1_;
278 #line 61 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
279 self->select_default = TRUE;
280 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
282 #line 283 "moonshot-identity-request.c"
286 IdentityRequest* identity_request_new_default (IdentityManagerApp* app) {
287 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
288 return identity_request_construct_default (TYPE_IDENTITY_REQUEST, app);
289 #line 290 "moonshot-identity-request.c"
293 void identity_request_set_callback (IdentityRequest* self, ReturnIdentityCallback cb, void* cb_target, GDestroyNotify cb_target_destroy_notify) {
294 ReturnIdentityCallback _tmp0_ = NULL;
295 void* _tmp0__target = NULL;
296 GDestroyNotify _tmp0__target_destroy_notify = NULL;
297 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
298 g_return_if_fail (self != NULL);
299 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
301 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
302 _tmp0__target = cb_target;
303 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
304 _tmp0__target_destroy_notify = cb_target_destroy_notify;
305 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
306 cb_target_destroy_notify = NULL;
307 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
308 (self->priv->callback_target_destroy_notify == NULL) ? NULL : (self->priv->callback_target_destroy_notify (self->priv->callback_target), NULL);
309 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
310 self->priv->callback = NULL;
311 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
312 self->priv->callback_target = NULL;
313 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
314 self->priv->callback_target_destroy_notify = NULL;
315 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
316 self->priv->callback = _tmp0_;
317 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
318 self->priv->callback_target = _tmp0__target;
319 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
320 self->priv->callback_target_destroy_notify = _tmp0__target_destroy_notify;
321 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
322 (cb_target_destroy_notify == NULL) ? NULL : (cb_target_destroy_notify (cb_target), NULL);
323 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
325 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
327 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
328 cb_target_destroy_notify = NULL;
329 #line 330 "moonshot-identity-request.c"
333 gboolean identity_request_execute (IdentityRequest* self) {
334 gboolean result = FALSE;
335 IdentityManagerApp* _tmp0_ = NULL;
336 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
337 g_return_val_if_fail (self != NULL, FALSE);
338 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
339 _tmp0_ = self->priv->parent_app;
340 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
341 identity_manager_app_select_identity (_tmp0_, self);
342 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
344 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
346 #line 347 "moonshot-identity-request.c"
350 static gpointer _g_object_ref0 (gpointer self) {
351 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
352 return self ? g_object_ref (self) : NULL;
353 #line 354 "moonshot-identity-request.c"
357 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card) {
358 IdCard* _tmp0_ = NULL;
359 IdCard* _tmp1_ = NULL;
360 gboolean _tmp2_ = FALSE;
361 gboolean _tmp3_ = FALSE;
362 IdCard* _tmp4_ = NULL;
363 ReturnIdentityCallback _tmp46_ = NULL;
364 void* _tmp46__target = NULL;
365 ReturnIdentityCallback _tmp47_ = NULL;
366 void* _tmp47__target = NULL;
367 #line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
368 g_return_if_fail (self != NULL);
369 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
371 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
372 _tmp1_ = _g_object_ref0 (_tmp0_);
373 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
374 _g_object_unref0 (self->id_card);
375 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
376 self->id_card = _tmp1_;
377 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
378 self->complete = TRUE;
379 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
381 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
382 if (_tmp4_ != NULL) {
383 #line 384 "moonshot-identity-request.c"
384 const gchar* _tmp5_ = NULL;
385 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
386 _tmp5_ = self->service;
387 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
388 _tmp3_ = _tmp5_ != NULL;
389 #line 390 "moonshot-identity-request.c"
391 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
393 #line 394 "moonshot-identity-request.c"
395 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
397 #line 398 "moonshot-identity-request.c"
398 const gchar* _tmp6_ = NULL;
399 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
400 _tmp6_ = self->service;
401 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
402 _tmp2_ = g_strcmp0 (_tmp6_, "") != 0;
403 #line 404 "moonshot-identity-request.c"
405 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
407 #line 408 "moonshot-identity-request.c"
409 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
411 #line 412 "moonshot-identity-request.c"
412 gboolean duplicate_service = FALSE;
413 IdCard* _tmp7_ = NULL;
414 gchar** _tmp8_ = NULL;
415 gint _tmp8__length1 = 0;
416 gchar** _tmp9_ = NULL;
417 gint _tmp9__length1 = 0;
418 gboolean _tmp13_ = FALSE;
419 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
420 duplicate_service = FALSE;
421 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
423 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
424 _tmp8_ = id_card_get_services (_tmp7_, &_tmp8__length1);
425 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
427 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
428 _tmp9__length1 = _tmp8__length1;
429 #line 430 "moonshot-identity-request.c"
431 gchar** service_collection = NULL;
432 gint service_collection_length1 = 0;
433 gint _service_collection_size_ = 0;
435 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
436 service_collection = _tmp9_;
437 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
438 service_collection_length1 = _tmp9__length1;
439 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
440 for (service_it = 0; service_it < _tmp9__length1; service_it = service_it + 1) {
441 #line 442 "moonshot-identity-request.c"
442 gchar* _tmp10_ = NULL;
443 gchar* service = NULL;
444 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
445 _tmp10_ = g_strdup (service_collection[service_it]);
446 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
448 #line 449 "moonshot-identity-request.c"
450 const gchar* _tmp11_ = NULL;
451 const gchar* _tmp12_ = NULL;
452 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
454 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
455 _tmp12_ = self->service;
456 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
457 if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
458 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
459 duplicate_service = TRUE;
460 #line 461 "moonshot-identity-request.c"
462 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
464 #line 465 "moonshot-identity-request.c"
468 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
469 _tmp13_ = duplicate_service;
470 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
471 if (_tmp13_ == FALSE) {
472 #line 473 "moonshot-identity-request.c"
473 gchar** services = NULL;
474 IdCard* _tmp14_ = NULL;
475 gchar** _tmp15_ = NULL;
476 gint _tmp15__length1 = 0;
477 gchar** _tmp16_ = NULL;
478 gint _tmp16__length1 = 0;
479 gchar** _tmp17_ = NULL;
480 gint services_length1 = 0;
481 gint _services_size_ = 0;
482 gchar** _tmp33_ = NULL;
483 gint _tmp33__length1 = 0;
484 IdCard* _tmp34_ = NULL;
485 gchar** _tmp35_ = NULL;
486 gint _tmp35__length1 = 0;
487 gchar** _tmp36_ = NULL;
488 gint _tmp36__length1 = 0;
489 const gchar* _tmp37_ = NULL;
490 gchar* _tmp38_ = NULL;
491 gchar* _tmp39_ = NULL;
492 IdCard* _tmp40_ = NULL;
493 gchar** _tmp41_ = NULL;
494 gint _tmp41__length1 = 0;
495 IdentityManagerApp* _tmp42_ = NULL;
496 IdentityManagerModel* _tmp43_ = NULL;
497 IdCard* _tmp44_ = NULL;
498 IdCard* _tmp45_ = NULL;
499 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
501 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
502 _tmp15_ = id_card_get_services (_tmp14_, &_tmp15__length1);
503 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
505 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
506 _tmp16__length1 = _tmp15__length1;
507 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
508 _tmp17_ = g_new0 (gchar*, (_tmp16__length1 + 1) + 1);
509 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
511 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
512 services_length1 = _tmp16__length1 + 1;
513 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
514 _services_size_ = services_length1;
515 #line 516 "moonshot-identity-request.c"
518 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
520 #line 521 "moonshot-identity-request.c"
522 gboolean _tmp18_ = FALSE;
523 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
525 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
527 #line 528 "moonshot-identity-request.c"
529 IdCard* _tmp21_ = NULL;
530 gchar** _tmp22_ = NULL;
531 gint _tmp22__length1 = 0;
532 gchar** _tmp23_ = NULL;
533 gint _tmp23__length1 = 0;
534 gchar** _tmp24_ = NULL;
535 gint _tmp24__length1 = 0;
537 IdCard* _tmp26_ = NULL;
538 gchar** _tmp27_ = NULL;
539 gint _tmp27__length1 = 0;
540 gchar** _tmp28_ = NULL;
541 gint _tmp28__length1 = 0;
543 const gchar* _tmp30_ = NULL;
544 gchar* _tmp31_ = NULL;
545 gchar* _tmp32_ = NULL;
546 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
548 #line 549 "moonshot-identity-request.c"
550 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
552 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
554 #line 555 "moonshot-identity-request.c"
556 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
558 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
560 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
562 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
563 _tmp22_ = id_card_get_services (_tmp21_, &_tmp22__length1);
564 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
566 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
567 _tmp23__length1 = _tmp22__length1;
568 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
569 if (!(_tmp20_ < _tmp23__length1)) {
570 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
572 #line 573 "moonshot-identity-request.c"
574 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
576 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
577 _tmp24__length1 = services_length1;
578 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
580 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
582 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
583 _tmp27_ = id_card_get_services (_tmp26_, &_tmp27__length1);
584 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
586 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
587 _tmp28__length1 = _tmp27__length1;
588 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
590 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
591 _tmp30_ = _tmp28_[_tmp29_];
592 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
593 _tmp31_ = g_strdup (_tmp30_);
594 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
595 _g_free0 (_tmp24_[_tmp25_]);
596 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
597 _tmp24_[_tmp25_] = _tmp31_;
598 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
599 _tmp32_ = _tmp24_[_tmp25_];
600 #line 601 "moonshot-identity-request.c"
604 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
606 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
607 _tmp33__length1 = services_length1;
608 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
610 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
611 _tmp35_ = id_card_get_services (_tmp34_, &_tmp35__length1);
612 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
614 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
615 _tmp36__length1 = _tmp35__length1;
616 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
617 _tmp37_ = self->service;
618 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
619 _tmp38_ = g_strdup (_tmp37_);
620 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
621 _g_free0 (_tmp33_[_tmp36__length1]);
622 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
623 _tmp33_[_tmp36__length1] = _tmp38_;
624 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
625 _tmp39_ = _tmp33_[_tmp36__length1];
626 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
628 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
630 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
631 _tmp41__length1 = services_length1;
632 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
633 id_card_set_services (_tmp40_, _tmp41_, _tmp41__length1);
634 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
635 _tmp42_ = self->priv->parent_app;
636 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
637 _tmp43_ = _tmp42_->model;
638 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
640 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
641 _tmp45_ = identity_manager_model_update_card (_tmp43_, _tmp44_);
642 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
643 _g_object_unref0 (self->id_card);
644 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
645 self->id_card = _tmp45_;
646 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
647 services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
648 #line 649 "moonshot-identity-request.c"
651 #line 110 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
652 _tmp46_ = self->priv->callback;
653 #line 110 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
654 _tmp46__target = self->priv->callback_target;
655 #line 110 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
656 g_return_if_fail (_tmp46_ != NULL);
657 #line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
658 _tmp47_ = self->priv->callback;
659 #line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
660 _tmp47__target = self->priv->callback_target;
661 #line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
662 _tmp47_ (self, _tmp47__target);
663 #line 664 "moonshot-identity-request.c"
667 static void identity_request_class_init (IdentityRequestClass * klass) {
668 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
669 identity_request_parent_class = g_type_class_peek_parent (klass);
670 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
671 g_type_class_add_private (klass, sizeof (IdentityRequestPrivate));
672 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
673 G_OBJECT_CLASS (klass)->finalize = identity_request_finalize;
674 #line 675 "moonshot-identity-request.c"
678 static void identity_request_instance_init (IdentityRequest * self) {
679 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
680 self->priv = IDENTITY_REQUEST_GET_PRIVATE (self);
681 #line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
682 self->id_card = NULL;
683 #line 36 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
684 self->complete = FALSE;
685 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
686 self->select_default = FALSE;
687 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
688 self->priv->callback = NULL;
689 #line 690 "moonshot-identity-request.c"
693 static void identity_request_finalize (GObject* obj) {
694 IdentityRequest * self;
695 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
696 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IDENTITY_REQUEST, IdentityRequest);
697 #line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
698 _g_object_unref0 (self->id_card);
699 #line 39 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
700 _identity_manager_app_unref0 (self->priv->parent_app);
701 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
702 _g_free0 (self->nai);
703 #line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
704 _g_free0 (self->password);
705 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
706 _g_free0 (self->service);
707 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
708 __g_slist_free__g_object_unref0_0 (self->candidates);
709 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
710 (self->priv->callback_target_destroy_notify == NULL) ? NULL : (self->priv->callback_target_destroy_notify (self->priv->callback_target), NULL);
711 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
712 self->priv->callback = NULL;
713 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
714 self->priv->callback_target = NULL;
715 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
716 self->priv->callback_target_destroy_notify = NULL;
717 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
718 G_OBJECT_CLASS (identity_request_parent_class)->finalize (obj);
719 #line 720 "moonshot-identity-request.c"
723 GType identity_request_get_type (void) {
724 static volatile gsize identity_request_type_id__volatile = 0;
725 if (g_once_init_enter (&identity_request_type_id__volatile)) {
726 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 };
727 GType identity_request_type_id;
728 identity_request_type_id = g_type_register_static (G_TYPE_OBJECT, "IdentityRequest", &g_define_type_info, 0);
729 g_once_init_leave (&identity_request_type_id__volatile, identity_request_type_id);
731 return identity_request_type_id__volatile;
735 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
736 if ((array != NULL) && (destroy_func != NULL)) {
738 for (i = 0; i < array_length; i = i + 1) {
739 if (((gpointer*) array)[i] != NULL) {
740 destroy_func (((gpointer*) array)[i]);
747 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
748 _vala_array_destroy (array, array_length, destroy_func);