~ubuntu-branches/ubuntu/wily/gnome-software/wily

« back to all changes in this revision

Viewing changes to src/gs-plugin-loader-sync.c

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2014-10-11 11:04:58 UTC
  • Revision ID: package-import@ubuntu.com-20141011110458-0qsyec8s0lsjevdv
Tags: upstream-3.14.0
ImportĀ upstreamĀ versionĀ 3.14.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 
2
 *
 
3
 * Copyright (C) 2012-2014 Richard Hughes <richard@hughsie.com>
 
4
 *
 
5
 * Licensed under the GNU General Public License Version 2
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
20
 */
 
21
 
 
22
#include "config.h"
 
23
 
 
24
#include "gs-plugin-loader-sync.h"
 
25
 
 
26
/**
 
27
 * gs_plugin_loader_get_app_by_id:
 
28
 */
 
29
GsApp *
 
30
gs_plugin_loader_get_app_by_id (GsPluginLoader *plugin_loader,
 
31
                                const gchar *id,
 
32
                                GsPluginRefineFlags flags,
 
33
                                GCancellable *cancellable,
 
34
                                GError **error)
 
35
{
 
36
        GsApp *app;
 
37
        gboolean ret;
 
38
 
 
39
        app = gs_app_new (id);
 
40
        app = gs_plugin_loader_dedupe (plugin_loader, app);
 
41
        ret = gs_plugin_loader_app_refine (plugin_loader, app, flags,
 
42
                                           cancellable, error);
 
43
        if (!ret)
 
44
                g_clear_object (&app);
 
45
        return app;
 
46
}
 
47
 
 
48
/* tiny helper to help us do the async operation */
 
49
typedef struct {
 
50
        GError          **error;
 
51
        GList           *list;
 
52
        GMainContext    *context;
 
53
        GMainLoop       *loop;
 
54
        gboolean         ret;
 
55
        GsApp           *app;
 
56
} GsPluginLoaderHelper;
 
57
 
 
58
static void
 
59
gs_plugin_loader_get_installed_finish_sync (GsPluginLoader *plugin_loader,
 
60
                                            GAsyncResult *res,
 
61
                                            GsPluginLoaderHelper *helper)
 
62
{
 
63
        helper->list = gs_plugin_loader_get_installed_finish (plugin_loader,
 
64
                                                              res,
 
65
                                                              helper->error);
 
66
        g_main_loop_quit (helper->loop);
 
67
}
 
68
 
 
69
/**
 
70
 * gs_plugin_loader_get_installed:
 
71
 **/
 
72
GList *
 
73
gs_plugin_loader_get_installed (GsPluginLoader *plugin_loader,
 
74
                                GsPluginRefineFlags flags,
 
75
                                GCancellable *cancellable,
 
76
                                GError **error)
 
77
{
 
78
        GsPluginLoaderHelper helper;
 
79
 
 
80
        /* create temp object */
 
81
        helper.context = g_main_context_new ();
 
82
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
83
        helper.error = error;
 
84
 
 
85
        g_main_context_push_thread_default (helper.context);
 
86
 
 
87
        /* run async method */
 
88
        gs_plugin_loader_get_installed_async (plugin_loader,
 
89
                                              flags,
 
90
                                              cancellable,
 
91
                                              (GAsyncReadyCallback) gs_plugin_loader_get_installed_finish_sync,
 
92
                                              &helper);
 
93
        g_main_loop_run (helper.loop);
 
94
 
 
95
        g_main_context_pop_thread_default (helper.context);
 
96
 
 
97
        g_main_loop_unref (helper.loop);
 
98
        g_main_context_unref (helper.context);
 
99
 
 
100
        return helper.list;
 
101
}
 
102
 
 
103
static void
 
104
gs_plugin_loader_search_finish_sync (GsPluginLoader *plugin_loader,
 
105
                                     GAsyncResult *res,
 
106
                                     GsPluginLoaderHelper *helper)
 
107
{
 
108
        helper->list = gs_plugin_loader_search_finish (plugin_loader,
 
109
                                                       res,
 
110
                                                       helper->error);
 
111
        g_main_loop_quit (helper->loop);
 
112
}
 
113
 
 
114
/**
 
115
 * gs_plugin_loader_search:
 
116
 **/
 
117
GList *
 
118
gs_plugin_loader_search (GsPluginLoader *plugin_loader,
 
119
                         const gchar *value,
 
120
                         GsPluginRefineFlags flags,
 
121
                         GCancellable *cancellable,
 
122
                         GError **error)
 
123
{
 
124
        GsPluginLoaderHelper helper;
 
125
 
 
126
        /* create temp object */
 
127
        helper.context = g_main_context_new ();
 
128
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
129
        helper.error = error;
 
130
 
 
131
        g_main_context_push_thread_default (helper.context);
 
132
 
 
133
        /* run async method */
 
134
        gs_plugin_loader_search_async (plugin_loader,
 
135
                                       value,
 
136
                                       flags,
 
137
                                       cancellable,
 
138
                                       (GAsyncReadyCallback) gs_plugin_loader_search_finish_sync,
 
139
                                       &helper);
 
140
        g_main_loop_run (helper.loop);
 
141
 
 
142
        g_main_context_pop_thread_default (helper.context);
 
143
 
 
144
        g_main_loop_unref (helper.loop);
 
145
        g_main_context_unref (helper.context);
 
146
 
 
147
        return helper.list;
 
148
}
 
149
 
 
150
static void
 
151
gs_plugin_loader_get_updates_finish_sync (GsPluginLoader *plugin_loader,
 
152
                                          GAsyncResult *res,
 
153
                                          GsPluginLoaderHelper *helper)
 
154
{
 
155
        helper->list = gs_plugin_loader_get_updates_finish (plugin_loader,
 
156
                                                            res,
 
157
                                                            helper->error);
 
158
        g_main_loop_quit (helper->loop);
 
159
}
 
160
 
 
161
/**
 
162
 * gs_plugin_loader_get_updates:
 
163
 **/
 
164
GList *
 
165
gs_plugin_loader_get_updates (GsPluginLoader *plugin_loader,
 
166
                              GsPluginRefineFlags flags,
 
167
                              GCancellable *cancellable,
 
168
                              GError **error)
 
169
{
 
170
        GsPluginLoaderHelper helper;
 
171
 
 
172
        /* create temp object */
 
173
        helper.context = g_main_context_new ();
 
174
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
175
        helper.error = error;
 
176
 
 
177
        g_main_context_push_thread_default (helper.context);
 
178
 
 
179
        /* run async method */
 
180
        gs_plugin_loader_get_updates_async (plugin_loader,
 
181
                                            flags,
 
182
                                            cancellable,
 
183
                                            (GAsyncReadyCallback) gs_plugin_loader_get_updates_finish_sync,
 
184
                                            &helper);
 
185
        g_main_loop_run (helper.loop);
 
186
 
 
187
        g_main_context_pop_thread_default (helper.context);
 
188
 
 
189
        g_main_loop_unref (helper.loop);
 
190
        g_main_context_unref (helper.context);
 
191
 
 
192
        return helper.list;
 
193
}
 
194
 
 
195
static void
 
196
gs_plugin_loader_get_sources_finish_sync (GsPluginLoader *plugin_loader,
 
197
                                          GAsyncResult *res,
 
198
                                          GsPluginLoaderHelper *helper)
 
199
{
 
200
        helper->list = gs_plugin_loader_get_sources_finish (plugin_loader,
 
201
                                                            res,
 
202
                                                            helper->error);
 
203
        g_main_loop_quit (helper->loop);
 
204
}
 
205
 
 
206
/**
 
207
 * gs_plugin_loader_get_sources:
 
208
 **/
 
209
GList *
 
210
gs_plugin_loader_get_sources (GsPluginLoader *plugin_loader,
 
211
                              GsPluginRefineFlags flags,
 
212
                              GCancellable *cancellable,
 
213
                              GError **error)
 
214
{
 
215
        GsPluginLoaderHelper helper;
 
216
 
 
217
        /* create temp object */
 
218
        helper.context = g_main_context_new ();
 
219
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
220
        helper.error = error;
 
221
 
 
222
        g_main_context_push_thread_default (helper.context);
 
223
 
 
224
        /* run async method */
 
225
        gs_plugin_loader_get_sources_async (plugin_loader,
 
226
                                            flags,
 
227
                                            cancellable,
 
228
                                            (GAsyncReadyCallback) gs_plugin_loader_get_sources_finish_sync,
 
229
                                            &helper);
 
230
        g_main_loop_run (helper.loop);
 
231
 
 
232
        g_main_context_pop_thread_default (helper.context);
 
233
 
 
234
        g_main_loop_unref (helper.loop);
 
235
        g_main_context_unref (helper.context);
 
236
 
 
237
        return helper.list;
 
238
}
 
239
 
 
240
static void
 
241
gs_plugin_loader_get_popular_finish_sync (GsPluginLoader *plugin_loader,
 
242
                                          GAsyncResult *res,
 
243
                                          GsPluginLoaderHelper *helper)
 
244
{
 
245
        helper->list = gs_plugin_loader_get_popular_finish (plugin_loader,
 
246
                                                            res,
 
247
                                                            helper->error);
 
248
        g_main_loop_quit (helper->loop);
 
249
}
 
250
 
 
251
/**
 
252
 * gs_plugin_loader_get_popular:
 
253
 **/
 
254
GList *
 
255
gs_plugin_loader_get_popular (GsPluginLoader *plugin_loader,
 
256
                              GsPluginRefineFlags flags,
 
257
                              const gchar *category,
 
258
                              const gchar *category_exclude,
 
259
                              GCancellable *cancellable,
 
260
                              GError **error)
 
261
{
 
262
        GsPluginLoaderHelper helper;
 
263
 
 
264
        /* create temp object */
 
265
        helper.context = g_main_context_new ();
 
266
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
267
        helper.error = error;
 
268
 
 
269
        g_main_context_push_thread_default (helper.context);
 
270
 
 
271
        /* run async method */
 
272
        gs_plugin_loader_get_popular_async (plugin_loader,
 
273
                                            flags,
 
274
                                            category,
 
275
                                            category_exclude,
 
276
                                            cancellable,
 
277
                                            (GAsyncReadyCallback) gs_plugin_loader_get_popular_finish_sync,
 
278
                                            &helper);
 
279
        g_main_loop_run (helper.loop);
 
280
 
 
281
        g_main_context_pop_thread_default (helper.context);
 
282
 
 
283
        g_main_loop_unref (helper.loop);
 
284
        g_main_context_unref (helper.context);
 
285
 
 
286
        return helper.list;
 
287
}
 
288
 
 
289
static void
 
290
gs_plugin_loader_get_featured_finish_sync (GsPluginLoader *plugin_loader,
 
291
                                          GAsyncResult *res,
 
292
                                          GsPluginLoaderHelper *helper)
 
293
{
 
294
        helper->list = gs_plugin_loader_get_featured_finish (plugin_loader,
 
295
                                                             res,
 
296
                                                             helper->error);
 
297
        g_main_loop_quit (helper->loop);
 
298
}
 
299
 
 
300
/**
 
301
 * gs_plugin_loader_get_featured:
 
302
 **/
 
303
GList *
 
304
gs_plugin_loader_get_featured (GsPluginLoader *plugin_loader,
 
305
                               GsPluginRefineFlags flags,
 
306
                               GCancellable *cancellable,
 
307
                               GError **error)
 
308
{
 
309
        GsPluginLoaderHelper helper;
 
310
 
 
311
        /* create temp object */
 
312
        helper.context = g_main_context_new ();
 
313
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
314
        helper.error = error;
 
315
 
 
316
        g_main_context_push_thread_default (helper.context);
 
317
 
 
318
        /* run async method */
 
319
        gs_plugin_loader_get_featured_async (plugin_loader,
 
320
                                             flags,
 
321
                                             cancellable,
 
322
                                             (GAsyncReadyCallback) gs_plugin_loader_get_featured_finish_sync,
 
323
                                             &helper);
 
324
        g_main_loop_run (helper.loop);
 
325
 
 
326
        g_main_context_pop_thread_default (helper.context);
 
327
 
 
328
        g_main_loop_unref (helper.loop);
 
329
        g_main_context_unref (helper.context);
 
330
 
 
331
        return helper.list;
 
332
}
 
333
 
 
334
static void
 
335
gs_plugin_loader_get_categories_finish_sync (GsPluginLoader *plugin_loader,
 
336
                                             GAsyncResult *res,
 
337
                                             GsPluginLoaderHelper *helper)
 
338
{
 
339
        helper->list = gs_plugin_loader_get_categories_finish (plugin_loader,
 
340
                                                               res,
 
341
                                                               helper->error);
 
342
        g_main_loop_quit (helper->loop);
 
343
}
 
344
 
 
345
/**
 
346
 * gs_plugin_loader_get_categories:
 
347
 **/
 
348
GList *
 
349
gs_plugin_loader_get_categories (GsPluginLoader *plugin_loader,
 
350
                                 GsPluginRefineFlags flags,
 
351
                                 GCancellable *cancellable,
 
352
                                 GError **error)
 
353
{
 
354
        GsPluginLoaderHelper helper;
 
355
 
 
356
        /* create temp object */
 
357
        helper.context = g_main_context_new ();
 
358
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
359
        helper.error = error;
 
360
 
 
361
        g_main_context_push_thread_default (helper.context);
 
362
 
 
363
        /* run async method */
 
364
        gs_plugin_loader_get_categories_async (plugin_loader,
 
365
                                               flags,
 
366
                                               cancellable,
 
367
                                               (GAsyncReadyCallback) gs_plugin_loader_get_categories_finish_sync,
 
368
                                               &helper);
 
369
        g_main_loop_run (helper.loop);
 
370
 
 
371
        g_main_context_pop_thread_default (helper.context);
 
372
 
 
373
        g_main_loop_unref (helper.loop);
 
374
        g_main_context_unref (helper.context);
 
375
 
 
376
        return helper.list;
 
377
}
 
378
 
 
379
static void
 
380
gs_plugin_loader_get_category_apps_finish_sync (GsPluginLoader *plugin_loader,
 
381
                                                GAsyncResult *res,
 
382
                                                GsPluginLoaderHelper *helper)
 
383
{
 
384
        helper->list = gs_plugin_loader_get_category_apps_finish (plugin_loader,
 
385
                                                                  res,
 
386
                                                                  helper->error);
 
387
        g_main_loop_quit (helper->loop);
 
388
}
 
389
 
 
390
/**
 
391
 * gs_plugin_loader_get_category_apps:
 
392
 **/
 
393
GList *
 
394
gs_plugin_loader_get_category_apps (GsPluginLoader *plugin_loader,
 
395
                                    GsCategory *category,
 
396
                                    GsPluginRefineFlags flags,
 
397
                                    GCancellable *cancellable,
 
398
                                    GError **error)
 
399
{
 
400
        GsPluginLoaderHelper helper;
 
401
 
 
402
        /* create temp object */
 
403
        helper.context = g_main_context_new ();
 
404
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
405
        helper.error = error;
 
406
 
 
407
        g_main_context_push_thread_default (helper.context);
 
408
 
 
409
        /* run async method */
 
410
        gs_plugin_loader_get_category_apps_async (plugin_loader,
 
411
                                                  category,
 
412
                                                  flags,
 
413
                                                  cancellable,
 
414
                                                  (GAsyncReadyCallback) gs_plugin_loader_get_category_apps_finish_sync,
 
415
                                                  &helper);
 
416
        g_main_loop_run (helper.loop);
 
417
 
 
418
        g_main_context_pop_thread_default (helper.context);
 
419
 
 
420
        g_main_loop_unref (helper.loop);
 
421
        g_main_context_unref (helper.context);
 
422
 
 
423
        return helper.list;
 
424
}
 
425
 
 
426
/**
 
427
 * gs_plugin_loader_app_refine_finish_sync:
 
428
 **/
 
429
static void
 
430
gs_plugin_loader_app_refine_finish_sync (GsPluginLoader *plugin_loader,
 
431
                                         GAsyncResult *res,
 
432
                                         GsPluginLoaderHelper *helper)
 
433
{
 
434
        helper->ret = gs_plugin_loader_app_refine_finish (plugin_loader,
 
435
                                                          res,
 
436
                                                          helper->error);
 
437
        g_main_loop_quit (helper->loop);
 
438
}
 
439
 
 
440
/**
 
441
 * gs_plugin_loader_app_refine:
 
442
 **/
 
443
gboolean
 
444
gs_plugin_loader_app_refine (GsPluginLoader *plugin_loader,
 
445
                             GsApp *app,
 
446
                             GsPluginRefineFlags flags,
 
447
                             GCancellable *cancellable,
 
448
                             GError **error)
 
449
{
 
450
        GsPluginLoaderHelper helper;
 
451
 
 
452
        /* create temp object */
 
453
        helper.context = g_main_context_new ();
 
454
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
455
        helper.error = error;
 
456
 
 
457
        g_main_context_push_thread_default (helper.context);
 
458
 
 
459
        /* run async method */
 
460
        gs_plugin_loader_app_refine_async (plugin_loader,
 
461
                                           app,
 
462
                                           flags,
 
463
                                           cancellable,
 
464
                                           (GAsyncReadyCallback) gs_plugin_loader_app_refine_finish_sync,
 
465
                                           &helper);
 
466
        g_main_loop_run (helper.loop);
 
467
 
 
468
        g_main_context_pop_thread_default (helper.context);
 
469
 
 
470
        g_main_loop_unref (helper.loop);
 
471
        g_main_context_unref (helper.context);
 
472
 
 
473
        return helper.ret;
 
474
}
 
475
 
 
476
/**
 
477
 * gs_plugin_loader_app_action_finish_sync:
 
478
 **/
 
479
static void
 
480
gs_plugin_loader_app_action_finish_sync (GsPluginLoader *plugin_loader,
 
481
                                         GAsyncResult *res,
 
482
                                         GsPluginLoaderHelper *helper)
 
483
{
 
484
        helper->ret = gs_plugin_loader_app_action_finish (plugin_loader,
 
485
                                                          res,
 
486
                                                          helper->error);
 
487
        g_main_loop_quit (helper->loop);
 
488
}
 
489
 
 
490
/**
 
491
 * gs_plugin_loader_app_action:
 
492
 **/
 
493
gboolean
 
494
gs_plugin_loader_app_action (GsPluginLoader *plugin_loader,
 
495
                             GsApp *app,
 
496
                             GsPluginLoaderAction action,
 
497
                             GCancellable *cancellable,
 
498
                             GError **error)
 
499
{
 
500
        GsPluginLoaderHelper helper;
 
501
 
 
502
        /* create temp object */
 
503
        helper.context = g_main_context_new ();
 
504
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
505
        helper.error = error;
 
506
 
 
507
        g_main_context_push_thread_default (helper.context);
 
508
 
 
509
        /* run async method */
 
510
        gs_plugin_loader_app_action_async (plugin_loader,
 
511
                                           app,
 
512
                                           action,
 
513
                                           cancellable,
 
514
                                           (GAsyncReadyCallback) gs_plugin_loader_app_action_finish_sync,
 
515
                                           &helper);
 
516
        g_main_loop_run (helper.loop);
 
517
 
 
518
        g_main_context_pop_thread_default (helper.context);
 
519
 
 
520
        g_main_loop_unref (helper.loop);
 
521
        g_main_context_unref (helper.context);
 
522
 
 
523
        return helper.ret;
 
524
}
 
525
 
 
526
/**
 
527
 * gs_plugin_loader_refresh_finish_sync:
 
528
 **/
 
529
static void
 
530
gs_plugin_loader_refresh_finish_sync (GsPluginLoader *plugin_loader,
 
531
                                      GAsyncResult *res,
 
532
                                      GsPluginLoaderHelper *helper)
 
533
{
 
534
        helper->ret = gs_plugin_loader_refresh_finish (plugin_loader,
 
535
                                                       res,
 
536
                                                       helper->error);
 
537
        g_main_loop_quit (helper->loop);
 
538
}
 
539
 
 
540
/**
 
541
 * gs_plugin_loader_refresh:
 
542
 **/
 
543
gboolean
 
544
gs_plugin_loader_refresh (GsPluginLoader *plugin_loader,
 
545
                          guint cache_age,
 
546
                          GsPluginRefreshFlags flags,
 
547
                          GCancellable *cancellable,
 
548
                          GError **error)
 
549
{
 
550
        GsPluginLoaderHelper helper;
 
551
 
 
552
        /* create temp object */
 
553
        helper.context = g_main_context_new ();
 
554
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
555
        helper.error = error;
 
556
 
 
557
        g_main_context_push_thread_default (helper.context);
 
558
 
 
559
        /* run async method */
 
560
        gs_plugin_loader_refresh_async (plugin_loader,
 
561
                                        cache_age,
 
562
                                        flags,
 
563
                                        cancellable,
 
564
                                        (GAsyncReadyCallback) gs_plugin_loader_refresh_finish_sync,
 
565
                                        &helper);
 
566
        g_main_loop_run (helper.loop);
 
567
 
 
568
        g_main_context_pop_thread_default (helper.context);
 
569
 
 
570
        g_main_loop_unref (helper.loop);
 
571
        g_main_context_unref (helper.context);
 
572
 
 
573
        return helper.ret;
 
574
}
 
575
 
 
576
static void
 
577
gs_plugin_loader_filename_to_app_finish_sync (GObject *source_object,
 
578
                                              GAsyncResult *res,
 
579
                                              gpointer user_data)
 
580
{
 
581
        GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object);
 
582
        GsPluginLoaderHelper *helper = (GsPluginLoaderHelper *) user_data;
 
583
        helper->app = gs_plugin_loader_filename_to_app_finish (plugin_loader,
 
584
                                                               res,
 
585
                                                               helper->error);
 
586
        g_main_loop_quit (helper->loop);
 
587
}
 
588
 
 
589
/**
 
590
 * gs_plugin_loader_filename_to_app:
 
591
 **/
 
592
GsApp *
 
593
gs_plugin_loader_filename_to_app (GsPluginLoader *plugin_loader,
 
594
                                  const gchar *filename,
 
595
                                  GsPluginRefineFlags flags,
 
596
                                  GCancellable *cancellable,
 
597
                                  GError **error)
 
598
{
 
599
        GsPluginLoaderHelper helper;
 
600
 
 
601
        /* create temp object */
 
602
        helper.app = NULL;
 
603
        helper.context = g_main_context_new ();
 
604
        helper.loop = g_main_loop_new (helper.context, FALSE);
 
605
        helper.error = error;
 
606
 
 
607
        g_main_context_push_thread_default (helper.context);
 
608
 
 
609
        /* run async method */
 
610
        gs_plugin_loader_filename_to_app_async (plugin_loader,
 
611
                                                filename,
 
612
                                                flags,
 
613
                                                cancellable,
 
614
                                                gs_plugin_loader_filename_to_app_finish_sync,
 
615
                                                &helper);
 
616
        g_main_loop_run (helper.loop);
 
617
 
 
618
        g_main_context_pop_thread_default (helper.context);
 
619
 
 
620
        g_main_loop_unref (helper.loop);
 
621
        g_main_context_unref (helper.context);
 
622
 
 
623
        return helper.app;
 
624
}
 
625
 
 
626
/* vim: set noexpandtab: */