~ubuntu-branches/ubuntu/trusty/gnome-contacts/trusty

« back to all changes in this revision

Viewing changes to src/contacts-store.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Jeremy Bicha, Michael Biebl
  • Date: 2013-09-19 18:23:06 UTC
  • mfrom: (1.3.10) (0.3.4 experimental)
  • mto: This revision was merged to the branch mainline in revision 40.
  • Revision ID: package-import@ubuntu.com-20130919182306-rcatwotzg94pr884
Tags: 3.8.3-1
[ Jeremy Bicha ]
* debian/control.in:
  - Drop alternate build-depends on valac-0.18 since it's no longer
    in Debian

[ Michael Biebl ]
* New upstream release.
* Loosen Build-Depends on libgnome-desktop-3-dev, we do not strictly require
  version (>= 3.6.0) which is not yet available in unstable.
* Bump Standards-Version to 3.9.4. No further changes.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* contacts-store.c generated by valac 0.15.1.23-684b1, the Vala compiler
 
1
/* contacts-store.c generated by valac 0.20.1, the Vala compiler
2
2
 * generated from contacts-store.vala, do not modify */
3
3
 
4
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
55
55
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
56
56
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
57
57
typedef struct _ContactsContactPrivate ContactsContactPrivate;
58
 
typedef struct _Block29Data Block29Data;
 
58
typedef struct _Block35Data Block35Data;
59
59
typedef struct _ContactsStoreFindContactData ContactsStoreFindContactData;
60
60
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
61
61
typedef struct _ContactsStoreCheckCallCapabilitiesData ContactsStoreCheckCallCapabilitiesData;
94
94
};
95
95
 
96
96
typedef gboolean (*ContactsStoreContactMatcher) (ContactsContact* c, void* user_data);
97
 
struct _Block29Data {
 
97
struct _Block35Data {
98
98
        int _ref_count_;
99
99
        ContactsStore * self;
100
100
        ContactsContact* matched;
115
115
        ContactsStoreContactMatcher matcher;
116
116
        gpointer matcher_target;
117
117
        ContactsContact* result;
118
 
        Block29Data* _data29_;
 
118
        Block35Data* _data35_;
119
119
        ContactsStoreContactMatcher _tmp0_;
120
120
        void* _tmp0__target;
121
121
        GeeArrayList* _tmp1_;
245
245
static void contacts_store_set_backend_store (ContactsStore* self, FolksBackendStore* value);
246
246
static void contacts_store_set_aggregator (ContactsStore* self, FolksIndividualAggregator* value);
247
247
FolksIndividualAggregator* contacts_store_get_aggregator (ContactsStore* self);
248
 
static void __lambda11_ (ContactsStore* self, GObject* obj, GParamSpec* pspec);
249
 
static gboolean __lambda12_ (ContactsStore* self);
250
 
static gboolean ___lambda12__gsource_func (gpointer self);
251
 
static void ___lambda11__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
252
 
static void __lambda13_ (ContactsStore* self, GObject* obj, GParamSpec* pspec);
253
 
static gboolean __lambda14_ (ContactsStore* self);
254
 
static gboolean ___lambda14__gsource_func (gpointer self);
255
 
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
256
 
static void __lambda15_ (ContactsStore* self, GeeMultiMap* changes);
 
248
static void __lambda14_ (ContactsStore* self, GObject* obj, GParamSpec* pspec);
 
249
static gboolean __lambda15_ (ContactsStore* self);
 
250
static gboolean ___lambda15__gsource_func (gpointer self);
 
251
static void ___lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 
252
static void __lambda16_ (ContactsStore* self, GObject* obj, GParamSpec* pspec);
 
253
static gboolean __lambda17_ (ContactsStore* self);
 
254
static gboolean ___lambda17__gsource_func (gpointer self);
 
255
static void ___lambda16__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 
256
static void __lambda18_ (ContactsStore* self, GeeMultiMap* changes);
257
257
static void contacts_store_remove (ContactsStore* self, ContactsContact* c);
258
258
static void contacts_store_add (ContactsStore* self, ContactsContact* c);
259
259
ContactsContact* contacts_contact_new (ContactsStore* store, FolksIndividual* i);
260
260
ContactsContact* contacts_contact_construct (GType object_type, ContactsStore* store, FolksIndividual* i);
261
261
void contacts_contact_replace_individual (ContactsContact* self, FolksIndividual* new_individual);
262
 
static void ___lambda15__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
 
262
static void ___lambda18__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
263
263
static void contacts_store_check_call_capabilities (ContactsStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
264
264
static void contacts_store_check_call_capabilities_finish (ContactsStore* self, GAsyncResult* _res_);
265
265
static void contacts_store_contact_changed_cb (ContactsStore* self, ContactsContact* c);
267
267
void contacts_store_find_contact (ContactsStore* self, ContactsStoreContactMatcher matcher, void* matcher_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
268
268
ContactsContact* contacts_store_find_contact_finish (ContactsStore* self, GAsyncResult* _res_);
269
269
static gboolean contacts_store_find_contact_co (ContactsStoreFindContactData* _data_);
270
 
static Block29Data* block29_data_ref (Block29Data* _data29_);
271
 
static void block29_data_unref (void * _userdata_);
 
270
static Block35Data* block35_data_ref (Block35Data* _data35_);
 
271
static void block35_data_unref (void * _userdata_);
272
272
gboolean contacts_store_get_is_quiescent (ContactsStore* self);
273
273
static gboolean _contacts_store_find_contact_co_gsource_func (gpointer self);
274
 
static void __lambda16_ (Block29Data* _data29_, ContactsContact* c);
275
 
static void ___lambda16__contacts_store_changed (ContactsStore* _sender, ContactsContact* c, gpointer self);
276
 
static void __lambda17_ (Block29Data* _data29_, ContactsContact* c);
277
 
static void ___lambda17__contacts_store_added (ContactsStore* _sender, ContactsContact* c, gpointer self);
278
 
static void __lambda18_ (Block29Data* _data29_);
279
 
static void ___lambda18__contacts_store_quiescent (ContactsStore* _sender, gpointer self);
 
274
static void __lambda19_ (Block35Data* _data35_, ContactsContact* c);
 
275
static void ___lambda19__contacts_store_changed (ContactsStore* _sender, ContactsContact* c, gpointer self);
 
276
static void __lambda20_ (Block35Data* _data35_, ContactsContact* c);
 
277
static void ___lambda20__contacts_store_added (ContactsStore* _sender, ContactsContact* c, gpointer self);
 
278
static void __lambda21_ (Block35Data* _data35_);
 
279
static void ___lambda21__contacts_store_quiescent (ContactsStore* _sender, gpointer self);
280
280
ContactsContact* contacts_store_find_contact_with_persona (ContactsStore* self, FolksPersona* persona);
281
281
GeeCollection* contacts_store_get_contacts (ContactsStore* self);
282
282
gboolean contacts_store_is_empty (ContactsStore* self);
389
389
                        p = (FolksPersona*) _tmp7_;
390
390
                        _tmp8_ = p;
391
391
                        _tmp9_ = g_object_get_data ((GObject*) _tmp8_, "contacts-new-contact");
392
 
                        if (GPOINTER_TO_INT (_tmp9_)) {
 
392
                        if ((gboolean) ((gintptr) _tmp9_)) {
393
393
                                result = FALSE;
394
394
                                _g_object_unref0 (p);
395
395
                                _g_object_unref0 (_p_it);
416
416
        _tmp1_ = contacts_contact_from_individual (_tmp0_);
417
417
        c = _tmp1_;
418
418
        _tmp2_ = g_object_get_data ((GObject*) c, "contacts-master-at-join");
419
 
        result = GPOINTER_TO_INT (_tmp2_);
 
419
        result = (gboolean) ((gintptr) _tmp2_);
420
420
        _g_object_unref0 (c);
421
421
        return result;
422
422
}
446
446
                if (_inner_error_ != NULL) {
447
447
                        _g_free0 (contents);
448
448
                        _g_free0 (path);
449
 
                        goto __catch18_g_error;
 
449
                        goto __catch16_g_error;
450
450
                }
451
451
                if (_tmp5_) {
452
452
                        gchar** _tmp6_;
517
517
                _g_free0 (contents);
518
518
                _g_free0 (path);
519
519
        }
520
 
        goto __finally18;
521
 
        __catch18_g_error:
 
520
        goto __finally16;
 
521
        __catch16_g_error:
522
522
        {
523
523
                GError* e = NULL;
524
524
                GError* _tmp19_;
534
534
                }
535
535
                _g_error_free0 (e);
536
536
        }
537
 
        __finally18:
 
537
        __finally16:
538
538
        if (_inner_error_ != NULL) {
539
539
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
540
540
                g_clear_error (&_inner_error_);
654
654
                        _g_string_free0 (s);
655
655
                        _g_free0 (path);
656
656
                        _g_free0 (dir);
657
 
                        goto __catch19_g_error;
 
657
                        goto __catch17_g_error;
658
658
                }
659
659
                _g_string_free0 (s);
660
660
                _g_free0 (path);
661
661
                _g_free0 (dir);
662
662
        }
663
 
        goto __finally19;
664
 
        __catch19_g_error:
 
663
        goto __finally17;
 
664
        __catch17_g_error:
665
665
        {
666
666
                GError* e = NULL;
667
667
                GError* _tmp33_;
673
673
                g_warning ("contacts-store.vala:106: error writing no suggestion db: %s\n", _tmp34_);
674
674
                _g_error_free0 (e);
675
675
        }
676
 
        __finally19:
 
676
        __finally17:
677
677
        if (_inner_error_ != NULL) {
678
678
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
679
679
                g_clear_error (&_inner_error_);
995
995
}
996
996
 
997
997
 
998
 
static gboolean __lambda12_ (ContactsStore* self) {
 
998
static gboolean __lambda15_ (ContactsStore* self) {
999
999
        gboolean result = FALSE;
1000
1000
        g_signal_emit_by_name (self, "quiescent");
1001
1001
        result = FALSE;
1003
1003
}
1004
1004
 
1005
1005
 
1006
 
static gboolean ___lambda12__gsource_func (gpointer self) {
 
1006
static gboolean ___lambda15__gsource_func (gpointer self) {
1007
1007
        gboolean result;
1008
 
        result = __lambda12_ (self);
 
1008
        result = __lambda15_ (self);
1009
1009
        return result;
1010
1010
}
1011
1011
 
1012
1012
 
1013
 
static void __lambda11_ (ContactsStore* self, GObject* obj, GParamSpec* pspec) {
 
1013
static void __lambda14_ (ContactsStore* self, GObject* obj, GParamSpec* pspec) {
1014
1014
        g_return_if_fail (obj != NULL);
1015
1015
        g_return_if_fail (pspec != NULL);
1016
 
        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda12__gsource_func, g_object_ref (self), g_object_unref);
1017
 
}
1018
 
 
1019
 
 
1020
 
static void ___lambda11__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
1021
 
        __lambda11_ (self, _sender, pspec);
1022
 
}
1023
 
 
1024
 
 
1025
 
static gboolean __lambda14_ (ContactsStore* self) {
 
1016
        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda15__gsource_func, g_object_ref (self), g_object_unref);
 
1017
}
 
1018
 
 
1019
 
 
1020
static void ___lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
 
1021
        __lambda14_ (self, _sender, pspec);
 
1022
}
 
1023
 
 
1024
 
 
1025
static gboolean __lambda17_ (ContactsStore* self) {
1026
1026
        gboolean result = FALSE;
1027
1027
        g_signal_emit_by_name (self, "prepared");
1028
1028
        result = FALSE;
1030
1030
}
1031
1031
 
1032
1032
 
1033
 
static gboolean ___lambda14__gsource_func (gpointer self) {
 
1033
static gboolean ___lambda17__gsource_func (gpointer self) {
1034
1034
        gboolean result;
1035
 
        result = __lambda14_ (self);
 
1035
        result = __lambda17_ (self);
1036
1036
        return result;
1037
1037
}
1038
1038
 
1039
1039
 
1040
 
static void __lambda13_ (ContactsStore* self, GObject* obj, GParamSpec* pspec) {
 
1040
static void __lambda16_ (ContactsStore* self, GObject* obj, GParamSpec* pspec) {
1041
1041
        g_return_if_fail (obj != NULL);
1042
1042
        g_return_if_fail (pspec != NULL);
1043
 
        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda14__gsource_func, g_object_ref (self), g_object_unref);
1044
 
}
1045
 
 
1046
 
 
1047
 
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
1048
 
        __lambda13_ (self, _sender, pspec);
1049
 
}
1050
 
 
1051
 
 
1052
 
static void __lambda15_ (ContactsStore* self, GeeMultiMap* changes) {
 
1043
        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda17__gsource_func, g_object_ref (self), g_object_unref);
 
1044
}
 
1045
 
 
1046
 
 
1047
static void ___lambda16__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
 
1048
        __lambda16_ (self, _sender, pspec);
 
1049
}
 
1050
 
 
1051
 
 
1052
static void __lambda18_ (ContactsStore* self, GeeMultiMap* changes) {
1053
1053
        GeeHashMap* _tmp0_;
1054
1054
        GeeHashMap* replaced_individuals;
1055
1055
        g_return_if_fail (changes != NULL);
1056
 
        _tmp0_ = gee_hash_map_new (FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
 
1056
        _tmp0_ = gee_hash_map_new (FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1057
1057
        replaced_individuals = _tmp0_;
1058
1058
        {
1059
1059
                GeeMultiMap* _tmp1_;
1259
1259
                                                _tmp62_ = replacements;
1260
1260
                                                if (_tmp62_ == NULL) {
1261
1261
                                                        GeeHashSet* _tmp63_;
1262
 
                                                        _tmp63_ = gee_hash_set_new (FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
 
1262
                                                        _tmp63_ = gee_hash_set_new (FOLKS_TYPE_INDIVIDUAL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
1263
1263
                                                        _g_object_unref0 (replacements);
1264
1264
                                                        replacements = _tmp63_;
1265
1265
                                                }
1404
1404
}
1405
1405
 
1406
1406
 
1407
 
static void ___lambda15__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
1408
 
        __lambda15_ (self, changes);
 
1407
static void ___lambda18__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
 
1408
        __lambda18_ (self, changes);
1409
1409
}
1410
1410
 
1411
1411
 
1422
1422
        FolksIndividualAggregator* _tmp8_;
1423
1423
        FolksIndividualAggregator* _tmp9_;
1424
1424
        self = (ContactsStore*) g_object_new (object_type, NULL);
1425
 
        _tmp0_ = gee_array_list_new (CONTACTS_TYPE_CONTACT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
 
1425
        _tmp0_ = gee_array_list_new (CONTACTS_TYPE_CONTACT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
1426
1426
        _g_object_unref0 (self->priv->contacts);
1427
1427
        self->priv->contacts = _tmp0_;
1428
 
        _tmp1_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
 
1428
        _tmp1_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1429
1429
        _g_object_unref0 (self->dont_suggest_link);
1430
1430
        self->dont_suggest_link = _tmp1_;
1431
1431
        contacts_store_read_dont_suggest_db (self);
1438
1438
        contacts_store_set_aggregator (self, _tmp5_);
1439
1439
        _g_object_unref0 (_tmp5_);
1440
1440
        _tmp6_ = self->priv->_aggregator;
1441
 
        g_signal_connect_object ((GObject*) _tmp6_, "notify::is-quiescent", (GCallback) ___lambda11__g_object_notify, self, 0);
 
1441
        g_signal_connect_object ((GObject*) _tmp6_, "notify::is-quiescent", (GCallback) ___lambda14__g_object_notify, self, 0);
1442
1442
        _tmp7_ = self->priv->_aggregator;
1443
 
        g_signal_connect_object ((GObject*) _tmp7_, "notify::is-prepared", (GCallback) ___lambda13__g_object_notify, self, 0);
 
1443
        g_signal_connect_object ((GObject*) _tmp7_, "notify::is-prepared", (GCallback) ___lambda16__g_object_notify, self, 0);
1444
1444
        _tmp8_ = self->priv->_aggregator;
1445
 
        g_signal_connect_object (_tmp8_, "individuals-changed-detailed", (GCallback) ___lambda15__folks_individual_aggregator_individuals_changed_detailed, self, 0);
 
1445
        g_signal_connect_object (_tmp8_, "individuals-changed-detailed", (GCallback) ___lambda18__folks_individual_aggregator_individuals_changed_detailed, self, 0);
1446
1446
        _tmp9_ = self->priv->_aggregator;
1447
1447
        folks_individual_aggregator_prepare (_tmp9_, NULL, NULL);
1448
1448
        contacts_store_check_call_capabilities (self, NULL, NULL);
1501
1501
}
1502
1502
 
1503
1503
 
1504
 
static Block29Data* block29_data_ref (Block29Data* _data29_) {
1505
 
        g_atomic_int_inc (&_data29_->_ref_count_);
1506
 
        return _data29_;
 
1504
static Block35Data* block35_data_ref (Block35Data* _data35_) {
 
1505
        g_atomic_int_inc (&_data35_->_ref_count_);
 
1506
        return _data35_;
1507
1507
}
1508
1508
 
1509
1509
 
1510
 
static void block29_data_unref (void * _userdata_) {
1511
 
        Block29Data* _data29_;
1512
 
        _data29_ = (Block29Data*) _userdata_;
1513
 
        if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
 
1510
static void block35_data_unref (void * _userdata_) {
 
1511
        Block35Data* _data35_;
 
1512
        _data35_ = (Block35Data*) _userdata_;
 
1513
        if (g_atomic_int_dec_and_test (&_data35_->_ref_count_)) {
1514
1514
                ContactsStore * self;
1515
 
                self = _data29_->self;
1516
 
                (_data29_->callback_target_destroy_notify == NULL) ? NULL : (_data29_->callback_target_destroy_notify (_data29_->callback_target), NULL);
1517
 
                _data29_->callback = NULL;
1518
 
                _data29_->callback_target = NULL;
1519
 
                _data29_->callback_target_destroy_notify = NULL;
1520
 
                _g_object_unref0 (_data29_->matched);
 
1515
                self = _data35_->self;
 
1516
                (_data35_->callback_target_destroy_notify == NULL) ? NULL : (_data35_->callback_target_destroy_notify (_data35_->callback_target), NULL);
 
1517
                _data35_->callback = NULL;
 
1518
                _data35_->callback_target = NULL;
 
1519
                _data35_->callback_target_destroy_notify = NULL;
 
1520
                _g_object_unref0 (_data35_->matched);
1521
1521
                _g_object_unref0 (self);
1522
 
                g_slice_free (Block29Data, _data29_);
 
1522
                g_slice_free (Block35Data, _data35_);
1523
1523
        }
1524
1524
}
1525
1525
 
1531
1531
}
1532
1532
 
1533
1533
 
1534
 
static void __lambda16_ (Block29Data* _data29_, ContactsContact* c) {
1535
 
        ContactsStore * self;
1536
 
        ContactsStoreContactMatcher _tmp0_;
1537
 
        void* _tmp0__target;
1538
 
        ContactsContact* _tmp1_;
1539
 
        gboolean _tmp2_ = FALSE;
1540
 
        self = _data29_->self;
1541
 
        g_return_if_fail (c != NULL);
1542
 
        _tmp0_ = _data29_->matcher;
1543
 
        _tmp0__target = _data29_->matcher_target;
1544
 
        _tmp1_ = c;
1545
 
        _tmp2_ = _tmp0_ (_tmp1_, _tmp0__target);
1546
 
        if (_tmp2_) {
1547
 
                ContactsContact* _tmp3_;
1548
 
                ContactsContact* _tmp4_;
1549
 
                GSourceFunc _tmp5_;
1550
 
                void* _tmp5__target;
1551
 
                _tmp3_ = c;
1552
 
                _tmp4_ = _g_object_ref0 (_tmp3_);
1553
 
                _g_object_unref0 (_data29_->matched);
1554
 
                _data29_->matched = _tmp4_;
1555
 
                _tmp5_ = _data29_->callback;
1556
 
                _tmp5__target = _data29_->callback_target;
1557
 
                _tmp5_ (_tmp5__target);
1558
 
        }
1559
 
}
1560
 
 
1561
 
 
1562
 
static void ___lambda16__contacts_store_changed (ContactsStore* _sender, ContactsContact* c, gpointer self) {
1563
 
        __lambda16_ (self, c);
1564
 
}
1565
 
 
1566
 
 
1567
 
static void __lambda17_ (Block29Data* _data29_, ContactsContact* c) {
1568
 
        ContactsStore * self;
1569
 
        ContactsStoreContactMatcher _tmp0_;
1570
 
        void* _tmp0__target;
1571
 
        ContactsContact* _tmp1_;
1572
 
        gboolean _tmp2_ = FALSE;
1573
 
        self = _data29_->self;
1574
 
        g_return_if_fail (c != NULL);
1575
 
        _tmp0_ = _data29_->matcher;
1576
 
        _tmp0__target = _data29_->matcher_target;
1577
 
        _tmp1_ = c;
1578
 
        _tmp2_ = _tmp0_ (_tmp1_, _tmp0__target);
1579
 
        if (_tmp2_) {
1580
 
                ContactsContact* _tmp3_;
1581
 
                ContactsContact* _tmp4_;
1582
 
                GSourceFunc _tmp5_;
1583
 
                void* _tmp5__target;
1584
 
                _tmp3_ = c;
1585
 
                _tmp4_ = _g_object_ref0 (_tmp3_);
1586
 
                _g_object_unref0 (_data29_->matched);
1587
 
                _data29_->matched = _tmp4_;
1588
 
                _tmp5_ = _data29_->callback;
1589
 
                _tmp5__target = _data29_->callback_target;
1590
 
                _tmp5_ (_tmp5__target);
1591
 
        }
1592
 
}
1593
 
 
1594
 
 
1595
 
static void ___lambda17__contacts_store_added (ContactsStore* _sender, ContactsContact* c, gpointer self) {
1596
 
        __lambda17_ (self, c);
1597
 
}
1598
 
 
1599
 
 
1600
 
static void __lambda18_ (Block29Data* _data29_) {
 
1534
static void __lambda19_ (Block35Data* _data35_, ContactsContact* c) {
 
1535
        ContactsStore * self;
 
1536
        ContactsStoreContactMatcher _tmp0_;
 
1537
        void* _tmp0__target;
 
1538
        ContactsContact* _tmp1_;
 
1539
        gboolean _tmp2_ = FALSE;
 
1540
        self = _data35_->self;
 
1541
        g_return_if_fail (c != NULL);
 
1542
        _tmp0_ = _data35_->matcher;
 
1543
        _tmp0__target = _data35_->matcher_target;
 
1544
        _tmp1_ = c;
 
1545
        _tmp2_ = _tmp0_ (_tmp1_, _tmp0__target);
 
1546
        if (_tmp2_) {
 
1547
                ContactsContact* _tmp3_;
 
1548
                ContactsContact* _tmp4_;
 
1549
                GSourceFunc _tmp5_;
 
1550
                void* _tmp5__target;
 
1551
                _tmp3_ = c;
 
1552
                _tmp4_ = _g_object_ref0 (_tmp3_);
 
1553
                _g_object_unref0 (_data35_->matched);
 
1554
                _data35_->matched = _tmp4_;
 
1555
                _tmp5_ = _data35_->callback;
 
1556
                _tmp5__target = _data35_->callback_target;
 
1557
                _tmp5_ (_tmp5__target);
 
1558
        }
 
1559
}
 
1560
 
 
1561
 
 
1562
static void ___lambda19__contacts_store_changed (ContactsStore* _sender, ContactsContact* c, gpointer self) {
 
1563
        __lambda19_ (self, c);
 
1564
}
 
1565
 
 
1566
 
 
1567
static void __lambda20_ (Block35Data* _data35_, ContactsContact* c) {
 
1568
        ContactsStore * self;
 
1569
        ContactsStoreContactMatcher _tmp0_;
 
1570
        void* _tmp0__target;
 
1571
        ContactsContact* _tmp1_;
 
1572
        gboolean _tmp2_ = FALSE;
 
1573
        self = _data35_->self;
 
1574
        g_return_if_fail (c != NULL);
 
1575
        _tmp0_ = _data35_->matcher;
 
1576
        _tmp0__target = _data35_->matcher_target;
 
1577
        _tmp1_ = c;
 
1578
        _tmp2_ = _tmp0_ (_tmp1_, _tmp0__target);
 
1579
        if (_tmp2_) {
 
1580
                ContactsContact* _tmp3_;
 
1581
                ContactsContact* _tmp4_;
 
1582
                GSourceFunc _tmp5_;
 
1583
                void* _tmp5__target;
 
1584
                _tmp3_ = c;
 
1585
                _tmp4_ = _g_object_ref0 (_tmp3_);
 
1586
                _g_object_unref0 (_data35_->matched);
 
1587
                _data35_->matched = _tmp4_;
 
1588
                _tmp5_ = _data35_->callback;
 
1589
                _tmp5__target = _data35_->callback_target;
 
1590
                _tmp5_ (_tmp5__target);
 
1591
        }
 
1592
}
 
1593
 
 
1594
 
 
1595
static void ___lambda20__contacts_store_added (ContactsStore* _sender, ContactsContact* c, gpointer self) {
 
1596
        __lambda20_ (self, c);
 
1597
}
 
1598
 
 
1599
 
 
1600
static void __lambda21_ (Block35Data* _data35_) {
1601
1601
        ContactsStore * self;
1602
1602
        GSourceFunc _tmp0_;
1603
1603
        void* _tmp0__target;
1604
 
        self = _data29_->self;
1605
 
        _tmp0_ = _data29_->callback;
1606
 
        _tmp0__target = _data29_->callback_target;
 
1604
        self = _data35_->self;
 
1605
        _tmp0_ = _data35_->callback;
 
1606
        _tmp0__target = _data35_->callback_target;
1607
1607
        _tmp0_ (_tmp0__target);
1608
1608
}
1609
1609
 
1610
1610
 
1611
 
static void ___lambda18__contacts_store_quiescent (ContactsStore* _sender, gpointer self) {
1612
 
        __lambda18_ (self);
 
1611
static void ___lambda21__contacts_store_quiescent (ContactsStore* _sender, gpointer self) {
 
1612
        __lambda21_ (self);
1613
1613
}
1614
1614
 
1615
1615
 
1623
1623
                g_assert_not_reached ();
1624
1624
        }
1625
1625
        _state_0:
1626
 
        _data_->_data29_ = g_slice_new0 (Block29Data);
1627
 
        _data_->_data29_->_ref_count_ = 1;
1628
 
        _data_->_data29_->self = g_object_ref (_data_->self);
 
1626
        _data_->_data35_ = g_slice_new0 (Block35Data);
 
1627
        _data_->_data35_->_ref_count_ = 1;
 
1628
        _data_->_data35_->self = g_object_ref (_data_->self);
1629
1629
        _data_->_tmp0_ = _data_->matcher;
1630
1630
        _data_->_tmp0__target = _data_->matcher_target;
1631
 
        _data_->_data29_->matcher = _data_->_tmp0_;
1632
 
        _data_->_data29_->matcher_target = _data_->_tmp0__target;
1633
 
        _data_->_data29_->_async_data_ = _data_;
 
1631
        _data_->_data35_->matcher = _data_->_tmp0_;
 
1632
        _data_->_data35_->matcher_target = _data_->_tmp0__target;
 
1633
        _data_->_data35_->_async_data_ = _data_;
1634
1634
        {
1635
1635
                _data_->_tmp1_ = _data_->self->priv->contacts;
1636
1636
                _data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
1653
1653
                        _data_->_tmp11_ = NULL;
1654
1654
                        _data_->_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp9_, _data_->_tmp10_);
1655
1655
                        _data_->c = (ContactsContact*) _data_->_tmp11_;
1656
 
                        _data_->_tmp12_ = _data_->_data29_->matcher;
1657
 
                        _data_->_tmp12__target = _data_->_data29_->matcher_target;
 
1656
                        _data_->_tmp12_ = _data_->_data35_->matcher;
 
1657
                        _data_->_tmp12__target = _data_->_data35_->matcher_target;
1658
1658
                        _data_->_tmp13_ = _data_->c;
1659
1659
                        _data_->_tmp14_ = FALSE;
1660
1660
                        _data_->_tmp14_ = _data_->_tmp12_ (_data_->_tmp13_, _data_->_tmp12__target);
1661
1661
                        if (_data_->_tmp14_) {
1662
1662
                                _data_->result = _data_->c;
1663
1663
                                _g_object_unref0 (_data_->_c_list);
1664
 
                                block29_data_unref (_data_->_data29_);
1665
 
                                _data_->_data29_ = NULL;
 
1664
                                block35_data_unref (_data_->_data35_);
 
1665
                                _data_->_data35_ = NULL;
1666
1666
                                if (_data_->_state_ == 0) {
1667
1667
                                        g_simple_async_result_complete_in_idle (_data_->_async_result);
1668
1668
                                } else {
1679
1679
        _data_->_tmp16_ = _data_->_tmp15_;
1680
1680
        if (_data_->_tmp16_) {
1681
1681
                _data_->result = NULL;
1682
 
                block29_data_unref (_data_->_data29_);
1683
 
                _data_->_data29_ = NULL;
 
1682
                block35_data_unref (_data_->_data35_);
 
1683
                _data_->_data35_ = NULL;
1684
1684
                if (_data_->_state_ == 0) {
1685
1685
                        g_simple_async_result_complete_in_idle (_data_->_async_result);
1686
1686
                } else {
1689
1689
                g_object_unref (_data_->_async_result);
1690
1690
                return FALSE;
1691
1691
        }
1692
 
        _data_->_data29_->matched = NULL;
1693
 
        _data_->_data29_->callback = _contacts_store_find_contact_co_gsource_func;
1694
 
        _data_->_data29_->callback_target = _data_;
1695
 
        _data_->_data29_->callback_target_destroy_notify = NULL;
 
1692
        _data_->_data35_->matched = NULL;
 
1693
        _data_->_data35_->callback = _contacts_store_find_contact_co_gsource_func;
 
1694
        _data_->_data35_->callback_target = _data_;
 
1695
        _data_->_data35_->callback_target_destroy_notify = NULL;
1696
1696
        _data_->_tmp17_ = 0UL;
1697
 
        _data_->_tmp17_ = g_signal_connect_data (_data_->self, "changed", (GCallback) ___lambda16__contacts_store_changed, block29_data_ref (_data_->_data29_), (GClosureNotify) block29_data_unref, 0);
 
1697
        _data_->_tmp17_ = g_signal_connect_data (_data_->self, "changed", (GCallback) ___lambda19__contacts_store_changed, block35_data_ref (_data_->_data35_), (GClosureNotify) block35_data_unref, 0);
1698
1698
        _data_->id1 = _data_->_tmp17_;
1699
1699
        _data_->_tmp18_ = 0UL;
1700
 
        _data_->_tmp18_ = g_signal_connect_data (_data_->self, "added", (GCallback) ___lambda17__contacts_store_added, block29_data_ref (_data_->_data29_), (GClosureNotify) block29_data_unref, 0);
 
1700
        _data_->_tmp18_ = g_signal_connect_data (_data_->self, "added", (GCallback) ___lambda20__contacts_store_added, block35_data_ref (_data_->_data35_), (GClosureNotify) block35_data_unref, 0);
1701
1701
        _data_->id2 = _data_->_tmp18_;
1702
1702
        _data_->_tmp19_ = 0UL;
1703
 
        _data_->_tmp19_ = g_signal_connect_data (_data_->self, "quiescent", (GCallback) ___lambda18__contacts_store_quiescent, block29_data_ref (_data_->_data29_), (GClosureNotify) block29_data_unref, 0);
 
1703
        _data_->_tmp19_ = g_signal_connect_data (_data_->self, "quiescent", (GCallback) ___lambda21__contacts_store_quiescent, block35_data_ref (_data_->_data35_), (GClosureNotify) block35_data_unref, 0);
1704
1704
        _data_->id3 = _data_->_tmp19_;
1705
1705
        _data_->_state_ = 1;
1706
1706
        return FALSE;
1712
1712
        g_signal_handler_disconnect ((GObject*) _data_->self, _data_->_tmp21_);
1713
1713
        _data_->_tmp22_ = _data_->id3;
1714
1714
        g_signal_handler_disconnect ((GObject*) _data_->self, _data_->_tmp22_);
1715
 
        _data_->_tmp23_ = _data_->_data29_->matched;
 
1715
        _data_->_tmp23_ = _data_->_data35_->matched;
1716
1716
        _data_->_tmp24_ = _g_object_ref0 (_data_->_tmp23_);
1717
1717
        _data_->result = _data_->_tmp24_;
1718
 
        block29_data_unref (_data_->_data29_);
1719
 
        _data_->_data29_ = NULL;
 
1718
        block35_data_unref (_data_->_data35_);
 
1719
        _data_->_data35_ = NULL;
1720
1720
        if (_data_->_state_ == 0) {
1721
1721
                g_simple_async_result_complete_in_idle (_data_->_async_result);
1722
1722
        } else {
1724
1724
        }
1725
1725
        g_object_unref (_data_->_async_result);
1726
1726
        return FALSE;
1727
 
        block29_data_unref (_data_->_data29_);
1728
 
        _data_->_data29_ = NULL;
 
1727
        block35_data_unref (_data_->_data35_);
 
1728
        _data_->_data35_ = NULL;
1729
1729
        if (_data_->_state_ == 0) {
1730
1730
                g_simple_async_result_complete_in_idle (_data_->_async_result);
1731
1731
        } else {
1805
1805
GeeCollection* contacts_store_get_contacts (ContactsStore* self) {
1806
1806
        GeeCollection* result = NULL;
1807
1807
        GeeArrayList* _tmp0_;
1808
 
        GeeList* _tmp1_;
1809
 
        GeeList* _tmp2_;
 
1808
        GeeBidirList* _tmp1_;
 
1809
        GeeBidirList* _tmp2_;
1810
1810
        g_return_val_if_fail (self != NULL, NULL);
1811
1811
        _tmp0_ = self->priv->contacts;
1812
 
        _tmp1_ = gee_abstract_list_get_read_only_view ((GeeAbstractList*) _tmp0_);
 
1812
        _tmp1_ = gee_abstract_bidir_list_get_read_only_view ((GeeAbstractBidirList*) _tmp0_);
1813
1813
        _tmp2_ = _tmp1_;
1814
1814
        result = (GeeCollection*) _tmp2_;
1815
1815
        return result;
2018
2018
                g_assert_not_reached ();
2019
2019
        }
2020
2020
        _state_0:
2021
 
        _data_->_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, tp_account_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
 
2021
        _data_->_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, tp_account_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
2022
2022
        _g_object_unref0 (_data_->self->calling_accounts);
2023
2023
        _data_->self->calling_accounts = _data_->_tmp0_;
2024
2024
        _data_->_tmp1_ = NULL;
2031
2031
                _state_1:
2032
2032
                tp_proxy_prepare_finish ((TpProxy*) _data_->account_manager, _data_->_res_, &_data_->_inner_error_);
2033
2033
                if (_data_->_inner_error_ != NULL) {
2034
 
                        goto __catch20_g_error;
 
2034
                        goto __catch18_g_error;
2035
2035
                }
2036
2036
                g_signal_connect_object (_data_->account_manager, "account-enabled", (GCallback) _contacts_store_check_account_caps_tp_account_manager_account_enabled, _data_->self, 0);
2037
2037
                g_signal_connect_object (_data_->account_manager, "account-disabled", (GCallback) _contacts_store_check_account_caps_tp_account_manager_account_disabled, _data_->self, 0);
2053
2053
                        _g_list_free0 (_data_->account_collection);
2054
2054
                }
2055
2055
        }
2056
 
        goto __finally20;
2057
 
        __catch20_g_error:
 
2056
        goto __finally18;
 
2057
        __catch18_g_error:
2058
2058
        {
2059
2059
                _data_->e = _data_->_inner_error_;
2060
2060
                _data_->_inner_error_ = NULL;
2063
2063
                g_warning ("contacts-store.vala:322: Unable to check accounts caps %s", _data_->_tmp5_);
2064
2064
                _g_error_free0 (_data_->e);
2065
2065
        }
2066
 
        __finally20:
 
2066
        __finally18:
2067
2067
        if (_data_->_inner_error_ != NULL) {
2068
2068
                _g_object_unref0 (_data_->account_manager);
2069
2069
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
2102
2102
        _data_->self = _tmp0_;
2103
2103
        _tmp1_ = account;
2104
2104
        _tmp2_ = _g_object_ref0 (_tmp1_);
 
2105
        _g_object_unref0 (_data_->account);
2105
2106
        _data_->account = _tmp2_;
2106
2107
        contacts_store_check_account_caps_co (_data_);
2107
2108
}
2157
2158
                        _state_1:
2158
2159
                        tp_proxy_prepare_finish ((TpProxy*) _data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
2159
2160
                        if (_data_->_inner_error_ != NULL) {
2160
 
                                goto __catch21_g_error;
 
2161
                                goto __catch19_g_error;
2161
2162
                        }
2162
2163
                }
2163
 
                goto __finally21;
2164
 
                __catch21_g_error:
 
2164
                goto __finally19;
 
2165
                __catch19_g_error:
2165
2166
                {
2166
2167
                        _data_->e = _data_->_inner_error_;
2167
2168
                        _data_->_inner_error_ = NULL;
2170
2171
                        g_warning ("contacts-store.vala:333: Unable to prepare account %s", _data_->_tmp9_);
2171
2172
                        _g_error_free0 (_data_->e);
2172
2173
                }
2173
 
                __finally21:
 
2174
                __finally19:
2174
2175
                if (_data_->_inner_error_ != NULL) {
2175
2176
                        _data_->features = (g_free (_data_->features), NULL);
2176
2177
                        g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
2343
2344
 
2344
2345
static void contacts_store_finalize (GObject* obj) {
2345
2346
        ContactsStore * self;
2346
 
        self = CONTACTS_STORE (obj);
 
2347
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_STORE, ContactsStore);
2347
2348
        _g_object_unref0 (self->priv->_aggregator);
2348
2349
        _g_object_unref0 (self->priv->_backend_store);
2349
2350
        _g_object_unref0 (self->priv->contacts);
2367
2368
 
2368
2369
static void _vala_contacts_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
2369
2370
        ContactsStore * self;
2370
 
        self = CONTACTS_STORE (object);
 
2371
        self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_STORE, ContactsStore);
2371
2372
        switch (property_id) {
2372
2373
                case CONTACTS_STORE_AGGREGATOR:
2373
2374
                g_value_set_object (value, contacts_store_get_aggregator (self));
2393
2394
 
2394
2395
static void _vala_contacts_store_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
2395
2396
        ContactsStore * self;
2396
 
        self = CONTACTS_STORE (object);
 
2397
        self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_STORE, ContactsStore);
2397
2398
        switch (property_id) {
2398
2399
                case CONTACTS_STORE_AGGREGATOR:
2399
2400
                contacts_store_set_aggregator (self, g_value_get_object (value));