Import moonshot-ui_0.7.1.orig.tar.xz
[moonshot-ui.git] / src / moonshot-identity-request.c
1 /* moonshot-identity-request.c generated by valac 0.24.0, the Vala compiler
2  * generated from moonshot-identity-request.vala, do not modify */
3
4 /*
5  * Copyright (c) 2011-2014, JANET(UK)
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of JANET(UK) nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34 */
35
36 #include <glib.h>
37 #include <glib-object.h>
38 #include <stdlib.h>
39 #include <string.h>
40 #include <gtk/gtk.h>
41
42
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))
49
50 typedef struct _IdentityRequest IdentityRequest;
51 typedef struct _IdentityRequestClass IdentityRequestClass;
52 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
53
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))
60
61 typedef struct _IdCard IdCard;
62 typedef struct _IdCardClass IdCardClass;
63
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))
70
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;
78
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))
85
86 typedef struct _IdentityManagerModel IdentityManagerModel;
87 typedef struct _IdentityManagerModelClass IdentityManagerModelClass;
88
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))
95
96 typedef struct _IdentityManagerView IdentityManagerView;
97 typedef struct _IdentityManagerViewClass IdentityManagerViewClass;
98
99 typedef void (*ReturnIdentityCallback) (IdentityRequest* request, void* user_data);
100 struct _IdentityRequest {
101         GObject parent_instance;
102         IdentityRequestPrivate * priv;
103         IdCard* id_card;
104         gboolean complete;
105         gboolean select_default;
106         gchar* nai;
107         gchar* password;
108         gchar* service;
109         GSList* candidates;
110 };
111
112 struct _IdentityRequestClass {
113         GObjectClass parent_class;
114 };
115
116 struct _IdentityRequestPrivate {
117         IdentityManagerApp* parent_app;
118         ReturnIdentityCallback callback;
119         gpointer callback_target;
120         GDestroyNotify callback_target_destroy_notify;
121 };
122
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;
131 };
132
133 struct _IdentityManagerAppClass {
134         GTypeClass parent_class;
135         void (*finalize) (IdentityManagerApp *self);
136 };
137
138
139 static gpointer identity_request_parent_class = NULL;
140
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))
151 enum  {
152         IDENTITY_REQUEST_DUMMY_PROPERTY
153 };
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);
172
173
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"
178 }
179
180
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"
185         g_slist_free (self);
186 #line 187 "moonshot-identity-request.c"
187 }
188
189
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"
194 }
195
196
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"
218         _tmp0_ = app;
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"
226         _tmp2_ = nai;
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"
232         self->nai = _tmp3_;
233 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
234         _tmp4_ = password;
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"
242         _tmp6_ = service;
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"
250         return self;
251 #line 252 "moonshot-identity-request.c"
252 }
253
254
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"
259 }
260
261
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"
271         _tmp0_ = app;
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"
281         return self;
282 #line 283 "moonshot-identity-request.c"
283 }
284
285
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"
290 }
291
292
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"
300         _tmp0_ = cb;
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"
324         cb = NULL;
325 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
326         cb_target = NULL;
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"
330 }
331
332
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"
343         result = FALSE;
344 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
345         return result;
346 #line 347 "moonshot-identity-request.c"
347 }
348
349
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"
354 }
355
356
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"
370         _tmp0_ = id_card;
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"
380         _tmp4_ = id_card;
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"
390         } else {
391 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
392                 _tmp3_ = FALSE;
393 #line 394 "moonshot-identity-request.c"
394         }
395 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
396         if (_tmp3_) {
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"
404         } else {
405 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
406                 _tmp2_ = FALSE;
407 #line 408 "moonshot-identity-request.c"
408         }
409 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
410         if (_tmp2_) {
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"
422                 _tmp7_ = id_card;
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"
426                 _tmp9_ = _tmp8_;
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"
430                 {
431                         gchar** service_collection = NULL;
432                         gint service_collection_length1 = 0;
433                         gint _service_collection_size_ = 0;
434                         gint service_it = 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"
447                                 service = _tmp10_;
448 #line 449 "moonshot-identity-request.c"
449                                 {
450                                         const gchar* _tmp11_ = NULL;
451                                         const gchar* _tmp12_ = NULL;
452 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
453                                         _tmp11_ = service;
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"
461                                         }
462 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
463                                         _g_free0 (service);
464 #line 465 "moonshot-identity-request.c"
465                                 }
466                         }
467                 }
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"
500                         _tmp14_ = id_card;
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"
504                         _tmp16_ = _tmp15_;
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"
510                         services = _tmp17_;
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"
516                         {
517                                 gint i = 0;
518 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
519                                 i = 0;
520 #line 521 "moonshot-identity-request.c"
521                                 {
522                                         gboolean _tmp18_ = FALSE;
523 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
524                                         _tmp18_ = TRUE;
525 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
526                                         while (TRUE) {
527 #line 528 "moonshot-identity-request.c"
528                                                 gint _tmp20_ = 0;
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;
536                                                 gint _tmp25_ = 0;
537                                                 IdCard* _tmp26_ = NULL;
538                                                 gchar** _tmp27_ = NULL;
539                                                 gint _tmp27__length1 = 0;
540                                                 gchar** _tmp28_ = NULL;
541                                                 gint _tmp28__length1 = 0;
542                                                 gint _tmp29_ = 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"
547                                                 if (!_tmp18_) {
548 #line 549 "moonshot-identity-request.c"
549                                                         gint _tmp19_ = 0;
550 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
551                                                         _tmp19_ = i;
552 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
553                                                         i = _tmp19_ + 1;
554 #line 555 "moonshot-identity-request.c"
555                                                 }
556 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
557                                                 _tmp18_ = FALSE;
558 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
559                                                 _tmp20_ = i;
560 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
561                                                 _tmp21_ = id_card;
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"
565                                                 _tmp23_ = _tmp22_;
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"
571                                                         break;
572 #line 573 "moonshot-identity-request.c"
573                                                 }
574 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
575                                                 _tmp24_ = services;
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"
579                                                 _tmp25_ = i;
580 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
581                                                 _tmp26_ = id_card;
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"
585                                                 _tmp28_ = _tmp27_;
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"
589                                                 _tmp29_ = i;
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"
601                                         }
602                                 }
603                         }
604 #line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
605                         _tmp33_ = services;
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"
609                         _tmp34_ = id_card;
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"
613                         _tmp36_ = _tmp35_;
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"
627                         _tmp40_ = id_card;
628 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-request.vala"
629                         _tmp41_ = services;
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"
639                         _tmp44_ = id_card;
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"
649                 }
650         }
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"
664 }
665
666
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"
675 }
676
677
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"
690 }
691
692
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"
720 }
721
722
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);
730         }
731         return identity_request_type_id__volatile;
732 }
733
734
735 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
736         if ((array != NULL) && (destroy_func != NULL)) {
737                 int i;
738                 for (i = 0; i < array_length; i = i + 1) {
739                         if (((gpointer*) array)[i] != NULL) {
740                                 destroy_func (((gpointer*) array)[i]);
741                         }
742                 }
743         }
744 }
745
746
747 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
748         _vala_array_destroy (array, array_length, destroy_func);
749         g_free (array);
750 }
751
752
753