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

« back to all changes in this revision

Viewing changes to src/contacts-contact.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-contact.c generated by valac 0.15.1.23-684b1, the Vala compiler
 
1
/* contacts-contact.c generated by valac 0.20.1, the Vala compiler
2
2
 * generated from contacts-contact.vala, do not modify */
3
3
 
4
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
38
38
#include <math.h>
39
39
#include <gdk/gdk.h>
40
40
#include <contacts-esd-setup.h>
 
41
#include <folks/folks-eds.h>
41
42
#include <gobject/gvaluecollector.h>
42
43
 
43
44
 
74
75
 
75
76
typedef struct _ContactsStore ContactsStore;
76
77
typedef struct _ContactsStoreClass ContactsStoreClass;
77
 
typedef struct _Block10Data Block10Data;
 
78
typedef struct _Block1Data Block1Data;
78
79
 
79
80
#define CONTACTS_CONTACT_TYPE_CONTACT_DATA_REF (contacts_contact_contact_data_ref_get_type ())
80
81
typedef struct _ContactsContactContactDataRef ContactsContactContactDataRef;
81
82
 
82
83
#define CONTACTS_CONTACT_TYPE_IM_DISPLAY (contacts_contact_im_display_get_type ())
 
84
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
83
85
 
84
86
#define CONTACTS_TYPE_FAKE_PERSONA (contacts_fake_persona_get_type ())
85
87
#define CONTACTS_FAKE_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersona))
94
96
 
95
97
#define CONTACTS_CONTACT_TYPE_IM_DATA (contacts_contact_im_data_get_type ())
96
98
typedef struct _ContactsContactImData ContactsContactImData;
97
 
typedef struct _Block11Data Block11Data;
 
99
typedef struct _Block2Data Block2Data;
98
100
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
99
101
 
100
102
#define CONTACTS_TYPE_TYPESET (contacts_typeset_get_type ())
113
115
#define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL)))
114
116
typedef struct _ContactsContactRemovePersonasData ContactsContactRemovePersonasData;
115
117
typedef struct _ContactsContactEnsurePrimaryPersonaData ContactsContactEnsurePrimaryPersonaData;
116
 
 
117
 
#define CONTACTS_TYPE_APP (contacts_app_get_type ())
118
 
#define CONTACTS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_APP, ContactsApp))
119
 
#define CONTACTS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_APP, ContactsAppClass))
120
 
#define CONTACTS_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_APP))
121
 
#define CONTACTS_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_APP))
122
 
#define CONTACTS_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_APP, ContactsAppClass))
123
 
 
124
 
typedef struct _ContactsApp ContactsApp;
125
 
typedef struct _ContactsAppClass ContactsAppClass;
126
 
typedef struct _ContactsAppPrivate ContactsAppPrivate;
127
 
 
128
 
#define CONTACTS_TYPE_WINDOW (contacts_window_get_type ())
129
 
#define CONTACTS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_WINDOW, ContactsWindow))
130
 
#define CONTACTS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_WINDOW, ContactsWindowClass))
131
 
#define CONTACTS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_WINDOW))
132
 
#define CONTACTS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_WINDOW))
133
 
#define CONTACTS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_WINDOW, ContactsWindowClass))
134
 
 
135
 
typedef struct _ContactsWindow ContactsWindow;
136
 
typedef struct _ContactsWindowClass ContactsWindowClass;
 
118
typedef struct _ContactsContactSetIndividualPropertyData ContactsContactSetIndividualPropertyData;
137
119
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
138
120
typedef struct _ContactsContactCreatePrimaryPersonaForDetailsData ContactsContactCreatePrimaryPersonaForDetailsData;
139
121
typedef struct _ContactsContactSetPersonaPropertyData ContactsContactSetPersonaPropertyData;
140
 
typedef struct _Block12Data Block12Data;
 
122
typedef struct _Block3Data Block3Data;
141
123
 
142
124
#define CONTACTS_TYPE_FAKE_PERSONA_STORE (contacts_fake_persona_store_get_type ())
143
125
#define CONTACTS_FAKE_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_FAKE_PERSONA_STORE, ContactsFakePersonaStore))
167
149
#define _contacts_fake_persona_prop_val_unref0(var) ((var == NULL) ? NULL : (var = (contacts_fake_persona_prop_val_unref (var), NULL)))
168
150
typedef struct _ContactsFakePersonaMakeRealAndSetData ContactsFakePersonaMakeRealAndSetData;
169
151
typedef struct _ContactsFakePersonaParamSpecPropVal ContactsFakePersonaParamSpecPropVal;
 
152
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
170
153
 
171
154
typedef enum  {
172
155
        CONTACT_ERROR_NOT_IMPLEMENTED,
205
188
        GObjectClass parent_class;
206
189
};
207
190
 
208
 
struct _Block10Data {
 
191
struct _Block1Data {
209
192
        int _ref_count_;
210
193
        ContactsContactPresence * self;
211
194
        gulong id;
 
195
        gulong id2;
212
196
        ContactsContact* contact;
213
197
};
214
198
 
224
208
        guint changed_id;
225
209
        gboolean changed_personas;
226
210
        GdkPixbuf* _small_avatar;
 
211
        GVariant* _avatar_icon_data;
227
212
        gchar* filter_data;
228
213
        gboolean _is_hidden;
229
214
        gboolean _is_hidden_uptodate;
241
226
        ContactsContactImDisplay display;
242
227
};
243
228
 
244
 
struct _Block11Data {
 
229
struct _Block2Data {
245
230
        int _ref_count_;
246
231
        ContactsContact * self;
247
232
        TpfPersona* tp;
327
312
        GError * _inner_error_;
328
313
};
329
314
 
330
 
struct _ContactsApp {
331
 
        GtkApplication parent_instance;
332
 
        ContactsAppPrivate * priv;
333
 
        GSettings* settings;
334
 
        ContactsWindow* window;
335
 
        ContactsStore* contacts_store;
336
 
};
337
 
 
338
 
struct _ContactsAppClass {
339
 
        GtkApplicationClass parent_class;
 
315
struct _ContactsContactSetIndividualPropertyData {
 
316
        int _state_;
 
317
        GObject* _source_object_;
 
318
        GAsyncResult* _res_;
 
319
        GSimpleAsyncResult* _async_result;
 
320
        ContactsContact* contact;
 
321
        gchar* property_name;
 
322
        GValue value;
 
323
        FolksPersona* result;
 
324
        gboolean did_set;
 
325
        ContactsContact* _tmp0_;
 
326
        FolksIndividual* _tmp1_;
 
327
        GeeSet* _tmp2_;
 
328
        GeeSet* _tmp3_;
 
329
        gint _tmp4_;
 
330
        gpointer* _tmp5_;
 
331
        FolksPersona** personas_copy;
 
332
        gint personas_copy_length1;
 
333
        gint _personas_copy_size_;
 
334
        FolksPersona** _tmp6_;
 
335
        gint _tmp6__length1;
 
336
        FolksPersona** p_collection;
 
337
        gint p_collection_length1;
 
338
        gint _p_collection_size_;
 
339
        gint p_it;
 
340
        FolksPersona* _tmp7_;
 
341
        FolksPersona* p;
 
342
        const gchar* _tmp8_;
 
343
        FolksPersona* _tmp9_;
 
344
        gchar** _tmp10_;
 
345
        gint _tmp10__length1;
 
346
        gchar** _tmp11_;
 
347
        gint _tmp11__length1;
 
348
        FolksPersona* _tmp12_;
 
349
        const gchar* _tmp13_;
 
350
        GValue _tmp14_;
 
351
        gboolean _tmp15_;
 
352
        ContactsContact* _tmp16_;
 
353
        ContactsFakePersona* _tmp17_;
 
354
        ContactsFakePersona* fake;
 
355
        ContactsFakePersona* _tmp18_;
 
356
        const gchar* _tmp19_;
 
357
        GValue _tmp20_;
 
358
        FolksPersona* _tmp21_;
 
359
        FolksPersona* _tmp22_;
 
360
        GError * _inner_error_;
340
361
};
341
362
 
342
363
struct _ContactsContactCreatePrimaryPersonaForDetailsData {
344
365
        GObject* _source_object_;
345
366
        GAsyncResult* _res_;
346
367
        GSimpleAsyncResult* _async_result;
 
368
        FolksPersonaStore* store;
347
369
        GHashTable* details;
348
370
        FolksPersona* result;
349
 
        ContactsApp* _tmp0_;
350
 
        ContactsStore* _tmp1_;
351
 
        FolksIndividualAggregator* _tmp2_;
352
 
        FolksIndividualAggregator* _tmp3_;
353
 
        FolksPersonaStore* _tmp4_;
354
 
        FolksPersonaStore* _tmp5_;
355
 
        FolksPersonaStore* _tmp6_;
356
 
        FolksPersonaStore* primary_store;
357
 
        FolksPersonaStore* _tmp7_;
358
 
        GHashTable* _tmp8_;
359
 
        FolksPersona* _tmp9_;
 
371
        FolksPersonaStore* _tmp0_;
 
372
        GHashTable* _tmp1_;
 
373
        FolksPersona* _tmp2_;
360
374
        FolksPersona* p;
361
 
        gboolean _tmp10_;
362
 
        FolksPersona* _tmp11_;
363
 
        FolksPersona* _tmp12_;
364
 
        gboolean _tmp13_;
365
 
        gboolean _tmp14_;
366
 
        FolksPersona* _tmp15_;
367
 
        FolksGroupDetails* _tmp16_;
368
 
        FolksGroupDetails* g;
369
 
        FolksGroupDetails* _tmp17_;
370
 
        const gchar* _tmp18_;
371
375
        GError * _inner_error_;
372
376
};
373
377
 
433
437
        GError * _inner_error_;
434
438
};
435
439
 
436
 
struct _Block12Data {
 
440
struct _Block3Data {
437
441
        int _ref_count_;
438
442
        ContactsContact * self;
439
443
        gulong id;
588
592
gint contacts_contact_postal_element_names_length1 = 0;
589
593
static GdkPixbuf* contacts_contact_fallback_pixbuf_default;
590
594
static GdkPixbuf* contacts_contact_fallback_pixbuf_default = NULL;
591
 
extern ContactsApp* contacts_app_app;
 
595
extern gchar** contacts_contact_sorted_properties;
 
596
extern gint contacts_contact_sorted_properties_length1;
 
597
gchar** contacts_contact_sorted_properties = NULL;
 
598
gint contacts_contact_sorted_properties_length1 = 0;
592
599
static gpointer contacts_fake_persona_store_parent_class = NULL;
593
600
extern ContactsFakePersonaStore* contacts_fake_persona_store__the_store;
594
601
ContactsFakePersonaStore* contacts_fake_persona_store__the_store = NULL;
606
613
GType contacts_store_get_type (void) G_GNUC_CONST;
607
614
gchar* contacts_contact_presence_to_icon_full (FolksPresenceType presence);
608
615
gchar* contacts_contact_presence_to_class (FolksPresenceType presence);
609
 
gchar* contacts_contact_presence_to_string (FolksPresenceType presence);
610
616
ContactsContactPresence* contacts_contact_presence_new (ContactsContact* contact);
611
617
ContactsContactPresence* contacts_contact_presence_construct (GType object_type, ContactsContact* contact);
612
 
static Block10Data* block10_data_ref (Block10Data* _data10_);
613
 
static void block10_data_unref (void * _userdata_);
614
 
static void __lambda4_ (ContactsContactPresence* self);
615
 
static void ___lambda4__contacts_contact_presence_changed (ContactsContact* _sender, gpointer self);
616
 
static void __lambda5_ (Block10Data* _data10_);
617
 
static void ___lambda5__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
 
618
static Block1Data* block1_data_ref (Block1Data* _data1_);
 
619
static void block1_data_unref (void * _userdata_);
 
620
static void __lambda19_ (ContactsContactPresence* self);
 
621
static void ___lambda19__contacts_contact_presence_changed (ContactsContact* _sender, gpointer self);
 
622
static void __lambda20_ (ContactsContactPresence* self);
 
623
static void ___lambda20__contacts_contact_personas_changed (ContactsContact* _sender, gpointer self);
 
624
static void __lambda21_ (Block1Data* _data1_);
 
625
static void ___lambda21__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
618
626
static void contacts_contact_presence_finalize (GObject* obj);
619
627
static GType contacts_contact_contact_data_ref_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
620
628
static ContactsContactContactDataRef* contacts_contact_contact_data_ref_dup (const ContactsContactContactDataRef* self);
623
631
enum  {
624
632
        CONTACTS_CONTACT_DUMMY_PROPERTY,
625
633
        CONTACTS_CONTACT_SMALL_AVATAR,
 
634
        CONTACTS_CONTACT_SERIALIZABLE_AVATAR_ICON,
 
635
        CONTACTS_CONTACT_AVATAR_ICON_DATA,
626
636
        CONTACTS_CONTACT_DISPLAY_NAME,
627
637
        CONTACTS_CONTACT_INITIAL_LETTER,
628
638
        CONTACTS_CONTACT_IS_HIDDEN
651
661
static gboolean contacts_contact_calc_is_main (ContactsContact* self);
652
662
ContactsContact* contacts_contact_new (ContactsStore* store, FolksIndividual* i);
653
663
ContactsContact* contacts_contact_construct (GType object_type, ContactsStore* store, FolksIndividual* i);
654
 
static void __lambda2_ (ContactsContact* self, GeeSet* added, GeeSet* removed);
655
 
static void ___lambda2__folks_individual_personas_changed (FolksIndividual* _sender, GeeSet* added, GeeSet* removed, gpointer self);
 
664
static void __lambda12_ (ContactsContact* self, GeeSet* added, GeeSet* removed);
 
665
static void ___lambda12__folks_individual_personas_changed (FolksIndividual* _sender, GeeSet* added, GeeSet* removed, gpointer self);
656
666
static void contacts_contact_update (ContactsContact* self);
657
667
static void contacts_contact_notify_cb (ContactsContact* self, GParamSpec* pspec);
658
668
static void _contacts_contact_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
660
670
void contacts_contact_remove (ContactsContact* self);
661
671
static void contacts_contact_unqueue_changed (ContactsContact* self);
662
672
gboolean contacts_contact_has_email (ContactsContact* self, const gchar* email_address);
 
673
gboolean contacts_contact_has_birthday (ContactsContact* self);
 
674
gboolean contacts_contact_has_nickname (ContactsContact* self);
 
675
gboolean contacts_contact_has_notes (ContactsContact* self);
 
676
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self);
663
677
gboolean contacts_contact_contains_strings (ContactsContact* self, gchar** strings, int strings_length1);
664
678
gchar* contacts_contact_presence_to_icon_symbolic (FolksPresenceType presence);
665
679
gchar* contacts_contact_presence_to_icon_symbolic_full (FolksPresenceType presence);
667
681
static gchar* contacts_contact_get_first_string (GeeCollection* collection);
668
682
static gboolean contacts_contact_has_pref (FolksAbstractFieldDetails* details);
669
683
gint contacts_contact_compare_fields (void* _a, void* _b);
670
 
gint contacts_contact_compare_persona_by_store (void* a, void* b);
671
 
static gboolean contacts_contact_persona_is_google (FolksPersona* persona);
672
684
GeeArrayList* contacts_contact_sort_fields (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GeeCollection* fields);
673
 
static gint _contacts_contact_compare_fields_gcompare_func (gconstpointer a, gconstpointer b);
 
685
static gint _contacts_contact_compare_fields_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
674
686
gchar** contacts_contact_format_address (FolksPostalAddress* addr, int* result_length1);
675
687
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
676
688
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
688
700
gchar* contacts_contact_format_im_name (TpfPersona* persona, const gchar* protocol, const gchar* id);
689
701
GtkWidget* contacts_contact_create_merged_presence_widget (ContactsContact* self);
690
702
GtkWidget* contacts_contact_create_presence_widget (ContactsContact* self, const gchar* protocol, const gchar* im_address);
691
 
static Block11Data* block11_data_ref (Block11Data* _data11_);
692
 
static void block11_data_unref (void * _userdata_);
693
 
static void __lambda6_ (Block11Data* _data11_, GParamSpec* pspec);
694
 
static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
695
 
static void __lambda7_ (Block11Data* _data11_, GParamSpec* pspec);
696
 
static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
697
 
static void __lambda8_ (Block11Data* _data11_);
698
 
static void ___lambda8__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
 
703
static Block2Data* block2_data_ref (Block2Data* _data2_);
 
704
static void block2_data_unref (void * _userdata_);
 
705
static void __lambda13_ (Block2Data* _data2_, GParamSpec* pspec);
 
706
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 
707
static void __lambda14_ (Block2Data* _data2_, GParamSpec* pspec);
 
708
static void ___lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 
709
static void __lambda15_ (Block2Data* _data2_);
 
710
static void ___lambda15__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
699
711
static gboolean contacts_contact_changed_cb (ContactsContact* self);
700
712
static gboolean _contacts_contact_changed_cb_gsource_func (gpointer self);
701
713
static gboolean contacts_contact_get_is_phone (FolksPersona* persona);
727
739
FolksIndividualAggregator* contacts_store_get_aggregator (ContactsStore* self);
728
740
static void contacts_contact_ensure_primary_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
729
741
FolksPersona* contacts_contact_find_persona_from_store (ContactsContact* self, FolksPersonaStore* store);
730
 
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self);
731
 
static gint _contacts_contact_compare_persona_by_store_gcompare_func (gconstpointer a, gconstpointer b);
 
742
static gint __lambda3_ (ContactsContact* self, FolksPersona* a, FolksPersona* b);
 
743
static gboolean contacts_contact_persona_is_google (FolksPersona* persona);
 
744
static gint ___lambda3__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
732
745
gchar* contacts_contact_format_persona_stores (ContactsContact* self);
733
746
gchar* contacts_contact_format_persona_store_name_for_contact (FolksPersona* persona);
734
 
FolksPersonaStore** contacts_contact_get_eds_address_books (int* result_length1);
735
 
GType contacts_app_get_type (void) G_GNUC_CONST;
736
 
GType contacts_window_get_type (void) G_GNUC_CONST;
737
 
FolksBackendStore* contacts_store_get_backend_store (ContactsStore* self);
738
 
static void _vala_array_add9 (FolksPersonaStore*** array, int* length, int* size, FolksPersonaStore* value);
739
747
gchar* contacts_contact_format_persona_store_name (FolksPersonaStore* store);
740
748
gboolean contacts_contact_has_mainable_persona (ContactsContact* self);
741
749
static gboolean contacts_contact_non_linkable (ContactsContact* self);
742
750
gboolean contacts_contact_persona_is_google_profile (FolksPersona* persona);
743
751
gboolean contacts_contact_suggest_link_to (ContactsContact* self, ContactsContact* other);
744
752
gboolean contacts_store_may_suggest_link (ContactsStore* self, ContactsContact* a, ContactsContact* b);
 
753
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1);
 
754
static gint __lambda16_ (const gchar* a, const gchar* b);
 
755
static gint ___lambda16__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
 
756
static void contacts_contact_set_individual_property_data_free (gpointer _data);
 
757
void contacts_contact_set_individual_property (ContactsContact* contact, const gchar* property_name, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
 
758
FolksPersona* contacts_contact_set_individual_property_finish (GAsyncResult* _res_, GError** error);
 
759
static gboolean contacts_contact_set_individual_property_co (ContactsContactSetIndividualPropertyData* _data_);
 
760
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
 
761
void contacts_contact_set_persona_property (FolksPersona* persona, const gchar* property_name, GValue* new_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
 
762
void contacts_contact_set_persona_property_finish (GAsyncResult* _res_, GError** error);
 
763
static void contacts_contact_set_individual_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 
764
void contacts_fake_persona_make_real_and_set (ContactsFakePersona* self, const gchar* property, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
 
765
FolksPersona* contacts_fake_persona_make_real_and_set_finish (ContactsFakePersona* self, GAsyncResult* _res_, GError** error);
745
766
TpAccount* contacts_contact_is_callable (ContactsContact* self, const gchar* proto, const gchar* id);
746
767
static void contacts_contact_create_primary_persona_for_details_data_free (gpointer _data);
747
 
void contacts_contact_create_primary_persona_for_details (GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
 
768
void contacts_contact_create_primary_persona_for_details (FolksPersonaStore* store, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
748
769
FolksPersona* contacts_contact_create_primary_persona_for_details_finish (GAsyncResult* _res_, GError** error);
749
770
static gboolean contacts_contact_create_primary_persona_for_details_co (ContactsContactCreatePrimaryPersonaForDetailsData* _data_);
750
771
static void contacts_contact_create_primary_persona_for_details_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
751
772
static void contacts_contact_set_persona_property_data_free (gpointer _data);
752
 
void contacts_contact_set_persona_property (FolksPersona* persona, const gchar* property_name, GValue* new_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
753
 
void contacts_contact_set_persona_property_finish (GAsyncResult* _res_, GError** error);
754
773
static gboolean contacts_contact_set_persona_property_co (ContactsContactSetPersonaPropertyData* _data_);
755
 
void contacts_fake_persona_make_real_and_set (ContactsFakePersona* self, const gchar* property, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
756
 
FolksPersona* contacts_fake_persona_make_real_and_set_finish (ContactsFakePersona* self, GAsyncResult* _res_, GError** error);
757
774
static void contacts_contact_set_persona_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
758
775
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
759
 
static Block12Data* block12_data_ref (Block12Data* _data12_);
760
 
static void block12_data_unref (void * _userdata_);
761
 
static void __lambda9_ (Block12Data* _data12_);
762
 
static void ___lambda9__contacts_contact_changed (ContactsContact* _sender, gpointer self);
763
 
static void __lambda10_ (Block12Data* _data12_);
764
 
static void ___lambda10__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
 
776
static Block3Data* block3_data_ref (Block3Data* _data3_);
 
777
static void block3_data_unref (void * _userdata_);
 
778
static void __lambda17_ (Block3Data* _data3_);
 
779
static void ___lambda17__contacts_contact_changed (ContactsContact* _sender, gpointer self);
 
780
static void __lambda18_ (Block3Data* _data3_);
 
781
static void ___lambda18__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
 
782
void contacts_contact_fetch_contact_info (ContactsContact* self);
765
783
GdkPixbuf* contacts_contact_get_small_avatar (ContactsContact* self);
 
784
GIcon* contacts_contact_get_serializable_avatar_icon (ContactsContact* self);
 
785
GVariant* contacts_contact_get_avatar_icon_data (ContactsContact* self);
766
786
const gchar* contacts_contact_get_display_name (ContactsContact* self);
767
787
gunichar contacts_contact_get_initial_letter (ContactsContact* self);
768
788
gboolean contacts_contact_get_is_hidden (ContactsContact* self);
823
843
static void _vala_contacts_fake_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
824
844
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
825
845
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
846
static gint _vala_array_length (gpointer array);
826
847
 
827
848
static GRegex* _tmp_regex_0 = NULL;
828
849
static GRegex* _tmp_regex_1 = NULL;
871
892
        const gchar* _tmp38_;
872
893
        gint _tmp39_;
873
894
        gint _tmp40_;
874
 
        GtkLabel* _tmp43_;
875
 
        const gchar* _tmp44_;
876
 
        gchar* _tmp45_;
877
 
        gchar* _tmp46_;
 
895
        GtkLabel* _tmp44_;
 
896
        const gchar* _tmp45_;
 
897
        gchar* _tmp46_ = NULL;
878
898
        gchar* _tmp47_;
879
 
        gchar* _tmp48_;
880
 
        GtkLabel* _tmp49_;
881
 
        gboolean _tmp50_;
 
899
        GtkLabel* _tmp48_;
 
900
        gboolean _tmp49_;
882
901
        g_return_if_fail (self != NULL);
883
902
        _tmp0_ = self->priv->contact;
884
903
        _tmp1_ = _tmp0_->presence_type;
970
989
        _tmp40_ = _tmp39_;
971
990
        if (_tmp40_ == 0) {
972
991
                FolksPresenceType _tmp41_;
973
 
                gchar* _tmp42_ = NULL;
 
992
                const gchar* _tmp42_ = NULL;
 
993
                gchar* _tmp43_;
974
994
                _tmp41_ = type;
975
 
                _tmp42_ = contacts_contact_presence_to_string (_tmp41_);
 
995
                _tmp42_ = folks_presence_details_get_default_message_from_type (_tmp41_);
 
996
                _tmp43_ = g_strdup (_tmp42_);
976
997
                _g_free0 (message);
977
 
                message = _tmp42_;
 
998
                message = _tmp43_;
978
999
        }
979
 
        _tmp43_ = self->priv->label;
980
 
        _tmp44_ = message;
981
 
        _tmp45_ = g_strconcat ("<span font='11px'>", _tmp44_, NULL);
982
 
        _tmp46_ = _tmp45_;
983
 
        _tmp47_ = g_strconcat (_tmp46_, "</span>", NULL);
984
 
        _tmp48_ = _tmp47_;
985
 
        gtk_label_set_markup (_tmp43_, _tmp48_);
986
 
        _g_free0 (_tmp48_);
987
 
        _g_free0 (_tmp46_);
988
 
        _tmp49_ = self->priv->label;
989
 
        gtk_widget_set_margin_bottom ((GtkWidget*) _tmp49_, 3);
990
 
        _tmp50_ = is_phone;
991
 
        if (_tmp50_) {
 
1000
        _tmp44_ = self->priv->label;
 
1001
        _tmp45_ = message;
 
1002
        _tmp46_ = g_markup_printf_escaped ("<span font='11px'>%s</span>", _tmp45_);
 
1003
        _tmp47_ = _tmp46_;
 
1004
        gtk_label_set_markup (_tmp44_, _tmp47_);
 
1005
        _g_free0 (_tmp47_);
 
1006
        _tmp48_ = self->priv->label;
 
1007
        gtk_widget_set_margin_bottom ((GtkWidget*) _tmp48_, 3);
 
1008
        _tmp49_ = is_phone;
 
1009
        if (_tmp49_) {
 
1010
                GtkImage* _tmp50_;
 
1011
                _tmp50_ = self->priv->phone_image;
 
1012
                gtk_widget_show ((GtkWidget*) _tmp50_);
 
1013
        } else {
992
1014
                GtkImage* _tmp51_;
993
1015
                _tmp51_ = self->priv->phone_image;
994
 
                gtk_widget_show ((GtkWidget*) _tmp51_);
995
 
        } else {
996
 
                GtkImage* _tmp52_;
997
 
                _tmp52_ = self->priv->phone_image;
998
 
                gtk_widget_hide ((GtkWidget*) _tmp52_);
 
1016
                gtk_widget_hide ((GtkWidget*) _tmp51_);
999
1017
        }
1000
1018
        _g_free0 (message);
1001
1019
}
1006
1024
}
1007
1025
 
1008
1026
 
1009
 
static Block10Data* block10_data_ref (Block10Data* _data10_) {
1010
 
        g_atomic_int_inc (&_data10_->_ref_count_);
1011
 
        return _data10_;
 
1027
static Block1Data* block1_data_ref (Block1Data* _data1_) {
 
1028
        g_atomic_int_inc (&_data1_->_ref_count_);
 
1029
        return _data1_;
1012
1030
}
1013
1031
 
1014
1032
 
1015
 
static void block10_data_unref (void * _userdata_) {
1016
 
        Block10Data* _data10_;
1017
 
        _data10_ = (Block10Data*) _userdata_;
1018
 
        if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
 
1033
static void block1_data_unref (void * _userdata_) {
 
1034
        Block1Data* _data1_;
 
1035
        _data1_ = (Block1Data*) _userdata_;
 
1036
        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
1019
1037
                ContactsContactPresence * self;
1020
 
                self = _data10_->self;
1021
 
                _g_object_unref0 (_data10_->contact);
 
1038
                self = _data1_->self;
 
1039
                _g_object_unref0 (_data1_->contact);
1022
1040
                _g_object_unref0 (self);
1023
 
                g_slice_free (Block10Data, _data10_);
 
1041
                g_slice_free (Block1Data, _data1_);
1024
1042
        }
1025
1043
}
1026
1044
 
1027
1045
 
1028
 
static void __lambda4_ (ContactsContactPresence* self) {
1029
 
        contacts_contact_presence_update_presence_widgets (self);
1030
 
}
1031
 
 
1032
 
 
1033
 
static void ___lambda4__contacts_contact_presence_changed (ContactsContact* _sender, gpointer self) {
1034
 
        __lambda4_ (self);
1035
 
}
1036
 
 
1037
 
 
1038
 
static void __lambda5_ (Block10Data* _data10_) {
 
1046
static void __lambda19_ (ContactsContactPresence* self) {
 
1047
        contacts_contact_presence_update_presence_widgets (self);
 
1048
}
 
1049
 
 
1050
 
 
1051
static void ___lambda19__contacts_contact_presence_changed (ContactsContact* _sender, gpointer self) {
 
1052
        __lambda19_ (self);
 
1053
}
 
1054
 
 
1055
 
 
1056
static void __lambda20_ (ContactsContactPresence* self) {
 
1057
        contacts_contact_presence_update_presence_widgets (self);
 
1058
}
 
1059
 
 
1060
 
 
1061
static void ___lambda20__contacts_contact_personas_changed (ContactsContact* _sender, gpointer self) {
 
1062
        __lambda20_ (self);
 
1063
}
 
1064
 
 
1065
 
 
1066
static void __lambda21_ (Block1Data* _data1_) {
1039
1067
        ContactsContactPresence * self;
1040
1068
        ContactsContact* _tmp0_;
1041
 
        self = _data10_->self;
1042
 
        _tmp0_ = _data10_->contact;
1043
 
        g_signal_handler_disconnect ((GObject*) _tmp0_, _data10_->id);
 
1069
        ContactsContact* _tmp1_;
 
1070
        self = _data1_->self;
 
1071
        _tmp0_ = _data1_->contact;
 
1072
        g_signal_handler_disconnect ((GObject*) _tmp0_, _data1_->id);
 
1073
        _tmp1_ = _data1_->contact;
 
1074
        g_signal_handler_disconnect ((GObject*) _tmp1_, _data1_->id2);
1044
1075
}
1045
1076
 
1046
1077
 
1047
 
static void ___lambda5__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
1048
 
        __lambda5_ (self);
 
1078
static void ___lambda21__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
 
1079
        __lambda21_ (self);
1049
1080
}
1050
1081
 
1051
1082
 
1052
1083
ContactsContactPresence* contacts_contact_presence_construct (GType object_type, ContactsContact* contact) {
1053
1084
        ContactsContactPresence * self = NULL;
1054
 
        Block10Data* _data10_;
 
1085
        Block1Data* _data1_;
1055
1086
        ContactsContact* _tmp0_;
1056
1087
        ContactsContact* _tmp1_;
1057
1088
        ContactsContact* _tmp2_;
1059
1090
        GtkImage* _tmp4_;
1060
1091
        GtkImage* _tmp5_;
1061
1092
        GtkImage* _tmp6_;
1062
 
        GtkImage* _tmp7_;
 
1093
        GtkLabel* _tmp7_;
1063
1094
        GtkLabel* _tmp8_;
1064
1095
        GtkLabel* _tmp9_;
1065
1096
        GtkLabel* _tmp10_;
1066
1097
        GtkLabel* _tmp11_;
1067
 
        GtkLabel* _tmp12_;
1068
 
        GtkLabel* _tmp13_;
 
1098
        GtkImage* _tmp12_;
 
1099
        GtkImage* _tmp13_;
1069
1100
        GtkImage* _tmp14_;
1070
1101
        GtkImage* _tmp15_;
1071
 
        GtkImage* _tmp16_;
1072
 
        GtkImage* _tmp17_;
1073
 
        GtkImage* _tmp18_;
1074
 
        ContactsContact* _tmp19_;
1075
 
        gulong _tmp20_ = 0UL;
 
1102
        ContactsContact* _tmp16_;
 
1103
        gulong _tmp17_ = 0UL;
 
1104
        ContactsContact* _tmp18_;
 
1105
        gulong _tmp19_ = 0UL;
1076
1106
        g_return_val_if_fail (contact != NULL, NULL);
1077
 
        _data10_ = g_slice_new0 (Block10Data);
1078
 
        _data10_->_ref_count_ = 1;
 
1107
        _data1_ = g_slice_new0 (Block1Data);
 
1108
        _data1_->_ref_count_ = 1;
1079
1109
        _tmp0_ = contact;
1080
1110
        _tmp1_ = _g_object_ref0 (_tmp0_);
1081
 
        _data10_->contact = _tmp1_;
 
1111
        _g_object_unref0 (_data1_->contact);
 
1112
        _data1_->contact = _tmp1_;
1082
1113
        self = (ContactsContactPresence*) g_object_new (object_type, NULL);
1083
 
        _data10_->self = g_object_ref (self);
1084
 
        _tmp2_ = _data10_->contact;
 
1114
        _data1_->self = g_object_ref (self);
 
1115
        _tmp2_ = _data1_->contact;
1085
1116
        _tmp3_ = _g_object_ref0 (_tmp2_);
1086
1117
        _g_object_unref0 (self->priv->contact);
1087
1118
        self->priv->contact = _tmp3_;
1088
1119
        gtk_grid_set_column_spacing ((GtkGrid*) self, (guint) 4);
1089
1120
        _tmp4_ = (GtkImage*) gtk_image_new ();
1090
 
        _tmp5_ = g_object_ref_sink (_tmp4_);
 
1121
        g_object_ref_sink (_tmp4_);
1091
1122
        _g_object_unref0 (self->priv->image);
1092
 
        self->priv->image = _tmp5_;
 
1123
        self->priv->image = _tmp4_;
 
1124
        _tmp5_ = self->priv->image;
 
1125
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp5_, TRUE);
1093
1126
        _tmp6_ = self->priv->image;
1094
 
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp6_, TRUE);
1095
 
        _tmp7_ = self->priv->image;
1096
 
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp7_);
1097
 
        _tmp8_ = (GtkLabel*) gtk_label_new ("");
1098
 
        _tmp9_ = g_object_ref_sink (_tmp8_);
 
1127
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp6_);
 
1128
        _tmp7_ = (GtkLabel*) gtk_label_new ("");
 
1129
        g_object_ref_sink (_tmp7_);
1099
1130
        _g_object_unref0 (self->priv->label);
1100
 
        self->priv->label = _tmp9_;
 
1131
        self->priv->label = _tmp7_;
 
1132
        _tmp8_ = self->priv->label;
 
1133
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp8_, TRUE);
 
1134
        _tmp9_ = self->priv->label;
 
1135
        gtk_label_set_ellipsize (_tmp9_, PANGO_ELLIPSIZE_END);
1101
1136
        _tmp10_ = self->priv->label;
1102
 
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp10_, TRUE);
 
1137
        g_object_set ((GtkMisc*) _tmp10_, "xalign", 0.0f, NULL);
1103
1138
        _tmp11_ = self->priv->label;
1104
 
        gtk_label_set_ellipsize (_tmp11_, PANGO_ELLIPSIZE_END);
1105
 
        _tmp12_ = self->priv->label;
1106
 
        g_object_set ((GtkMisc*) _tmp12_, "xalign", 0.0f, NULL);
1107
 
        _tmp13_ = self->priv->label;
1108
 
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp13_);
1109
 
        _tmp14_ = (GtkImage*) gtk_image_new ();
1110
 
        _tmp15_ = g_object_ref_sink (_tmp14_);
 
1139
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp11_);
 
1140
        _tmp12_ = (GtkImage*) gtk_image_new ();
 
1141
        g_object_ref_sink (_tmp12_);
1111
1142
        _g_object_unref0 (self->priv->phone_image);
1112
 
        self->priv->phone_image = _tmp15_;
1113
 
        _tmp16_ = self->priv->phone_image;
1114
 
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp16_, TRUE);
1115
 
        _tmp17_ = self->priv->phone_image;
1116
 
        gtk_image_set_from_icon_name (_tmp17_, "phone-symbolic", GTK_ICON_SIZE_MENU);
1117
 
        _tmp18_ = self->priv->phone_image;
1118
 
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp18_);
 
1143
        self->priv->phone_image = _tmp12_;
 
1144
        _tmp13_ = self->priv->phone_image;
 
1145
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp13_, TRUE);
 
1146
        _tmp14_ = self->priv->phone_image;
 
1147
        gtk_image_set_from_icon_name (_tmp14_, "phone-symbolic", GTK_ICON_SIZE_MENU);
 
1148
        _tmp15_ = self->priv->phone_image;
 
1149
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp15_);
1119
1150
        contacts_contact_presence_update_presence_widgets (self);
1120
 
        _tmp19_ = _data10_->contact;
1121
 
        _tmp20_ = g_signal_connect_object (_tmp19_, "presence-changed", (GCallback) ___lambda4__contacts_contact_presence_changed, self, 0);
1122
 
        _data10_->id = _tmp20_;
1123
 
        g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda5__gtk_widget_destroy, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
1124
 
        block10_data_unref (_data10_);
1125
 
        _data10_ = NULL;
 
1151
        _tmp16_ = _data1_->contact;
 
1152
        _tmp17_ = g_signal_connect_object (_tmp16_, "presence-changed", (GCallback) ___lambda19__contacts_contact_presence_changed, self, 0);
 
1153
        _data1_->id = _tmp17_;
 
1154
        _tmp18_ = _data1_->contact;
 
1155
        _tmp19_ = g_signal_connect_object (_tmp18_, "personas-changed", (GCallback) ___lambda20__contacts_contact_personas_changed, self, 0);
 
1156
        _data1_->id2 = _tmp19_;
 
1157
        g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda21__gtk_widget_destroy, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
 
1158
        block1_data_unref (_data1_);
 
1159
        _data1_ = NULL;
1126
1160
        return self;
1127
1161
}
1128
1162
 
1146
1180
 
1147
1181
static void contacts_contact_presence_finalize (GObject* obj) {
1148
1182
        ContactsContactPresence * self;
1149
 
        self = CONTACTS_CONTACT_PRESENCE (obj);
 
1183
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_PRESENCE, ContactsContactPresence);
1150
1184
        _g_object_unref0 (self->priv->contact);
1151
1185
        _g_object_unref0 (self->priv->image);
1152
1186
        _g_object_unref0 (self->priv->phone_image);
1577
1611
        g_return_val_if_fail (persona != NULL, FALSE);
1578
1612
        g_return_val_if_fail (property != NULL, FALSE);
1579
1613
        _tmp0_ = persona;
1580
 
        if (CONTACTS_IS_FAKE_PERSONA (_tmp0_)) {
 
1614
        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, CONTACTS_TYPE_FAKE_PERSONA)) {
1581
1615
                result = TRUE;
1582
1616
                return result;
1583
1617
        }
1630
1664
        gchar* _tmp45_;
1631
1665
        g_return_val_if_fail (persona != NULL, NULL);
1632
1666
        _tmp0_ = persona;
1633
 
        _tmp1_ = _g_object_ref0 (FOLKS_IS_NAME_DETAILS (_tmp0_) ? ((FolksNameDetails*) _tmp0_) : NULL);
 
1667
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp0_) : NULL);
1634
1668
        name_details = _tmp1_;
1635
1669
        _tmp2_ = persona;
1636
 
        _tmp3_ = _g_object_ref0 (FOLKS_IS_ALIAS_DETAILS (_tmp2_) ? ((FolksAliasDetails*) _tmp2_) : NULL);
 
1670
        _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, FOLKS_TYPE_ALIAS_DETAILS) ? ((FolksAliasDetails*) _tmp2_) : NULL);
1637
1671
        alias_details = _tmp3_;
1638
1672
        _tmp4_ = persona;
1639
 
        _tmp5_ = _g_object_ref0 (FOLKS_IS_EMAIL_DETAILS (_tmp4_) ? ((FolksEmailDetails*) _tmp4_) : NULL);
 
1673
        _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _tmp4_) : NULL);
1640
1674
        email_details = _tmp5_;
1641
1675
        _tmp6_ = name_details;
1642
1676
        if (_tmp6_ != NULL) {
1958
1992
        _tmp1_ = p;
1959
1993
        g_signal_connect_object ((GObject*) _tmp1_, "notify::presence-message", (GCallback) _contacts_contact_persona_notify_cb_g_object_notify, self, 0);
1960
1994
        _tmp2_ = p;
1961
 
        _tmp3_ = _g_object_ref0 (TPF_IS_PERSONA (_tmp2_) ? ((TpfPersona*) _tmp2_) : NULL);
 
1995
        _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp2_) : NULL);
1962
1996
        tp = _tmp3_;
1963
1997
        _tmp5_ = tp;
1964
1998
        if (_tmp5_ != NULL) {
1999
2033
        _tmp0_ = self->individual;
2000
2034
        g_signal_handlers_disconnect_by_func (_tmp0_, (void*) contacts_contact_persona_notify_cb, self);
2001
2035
        _tmp1_ = p;
2002
 
        _tmp2_ = _g_object_ref0 (TPF_IS_PERSONA (_tmp1_) ? ((TpfPersona*) _tmp1_) : NULL);
 
2036
        _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp1_) : NULL);
2003
2037
        tp = _tmp2_;
2004
2038
        _tmp4_ = tp;
2005
2039
        if (_tmp4_ != NULL) {
2300
2334
}
2301
2335
 
2302
2336
 
2303
 
static void __lambda2_ (ContactsContact* self, GeeSet* added, GeeSet* removed) {
 
2337
static void __lambda12_ (ContactsContact* self, GeeSet* added, GeeSet* removed) {
2304
2338
        g_return_if_fail (added != NULL);
2305
2339
        g_return_if_fail (removed != NULL);
2306
2340
        {
2363
2397
}
2364
2398
 
2365
2399
 
2366
 
static void ___lambda2__folks_individual_personas_changed (FolksIndividual* _sender, GeeSet* added, GeeSet* removed, gpointer self) {
2367
 
        __lambda2_ (self, added, removed);
 
2400
static void ___lambda12__folks_individual_personas_changed (FolksIndividual* _sender, GeeSet* added, GeeSet* removed, gpointer self) {
 
2401
        __lambda12_ (self, added, removed);
2368
2402
}
2369
2403
 
2370
2404
 
2439
2473
                _g_object_unref0 (_p_it);
2440
2474
        }
2441
2475
        _tmp17_ = self->individual;
2442
 
        g_signal_connect_object (_tmp17_, "personas-changed", (GCallback) ___lambda2__folks_individual_personas_changed, self, 0);
 
2476
        g_signal_connect_object (_tmp17_, "personas-changed", (GCallback) ___lambda12__folks_individual_personas_changed, self, 0);
2443
2477
        contacts_contact_update (self);
2444
2478
        _tmp18_ = self->individual;
2445
2479
        g_signal_connect_object ((GObject*) _tmp18_, "notify", (GCallback) _contacts_contact_notify_cb_g_object_notify, self, 0);
2538
2572
        }
2539
2573
        _g_object_unref0 (self->priv->_small_avatar);
2540
2574
        self->priv->_small_avatar = NULL;
 
2575
        _g_variant_unref0 (self->priv->_avatar_icon_data);
 
2576
        self->priv->_avatar_icon_data = NULL;
2541
2577
        _tmp24_ = self->individual;
2542
2578
        g_signal_connect_object ((GObject*) _tmp24_, "notify", (GCallback) _contacts_contact_notify_cb_g_object_notify, self, 0);
2543
2579
        contacts_contact_queue_changed (self, TRUE);
2647
2683
}
2648
2684
 
2649
2685
 
 
2686
gboolean contacts_contact_has_birthday (ContactsContact* self) {
 
2687
        gboolean result = FALSE;
 
2688
        FolksIndividual* _tmp0_;
 
2689
        GDateTime* _tmp1_;
 
2690
        GDateTime* _tmp2_;
 
2691
        g_return_val_if_fail (self != NULL, FALSE);
 
2692
        _tmp0_ = self->individual;
 
2693
        _tmp1_ = folks_birthday_details_get_birthday ((FolksBirthdayDetails*) _tmp0_);
 
2694
        _tmp2_ = _tmp1_;
 
2695
        result = _tmp2_ != NULL;
 
2696
        return result;
 
2697
}
 
2698
 
 
2699
 
 
2700
gboolean contacts_contact_has_nickname (ContactsContact* self) {
 
2701
        gboolean result = FALSE;
 
2702
        gboolean _tmp0_ = FALSE;
 
2703
        FolksIndividual* _tmp1_;
 
2704
        const gchar* _tmp2_;
 
2705
        const gchar* _tmp3_;
 
2706
        gboolean _tmp7_;
 
2707
        g_return_val_if_fail (self != NULL, FALSE);
 
2708
        _tmp1_ = self->individual;
 
2709
        _tmp2_ = folks_name_details_get_nickname ((FolksNameDetails*) _tmp1_);
 
2710
        _tmp3_ = _tmp2_;
 
2711
        if (_tmp3_ != NULL) {
 
2712
                FolksIndividual* _tmp4_;
 
2713
                const gchar* _tmp5_;
 
2714
                const gchar* _tmp6_;
 
2715
                _tmp4_ = self->individual;
 
2716
                _tmp5_ = folks_name_details_get_nickname ((FolksNameDetails*) _tmp4_);
 
2717
                _tmp6_ = _tmp5_;
 
2718
                _tmp0_ = g_strcmp0 (_tmp6_, "") != 0;
 
2719
        } else {
 
2720
                _tmp0_ = FALSE;
 
2721
        }
 
2722
        _tmp7_ = _tmp0_;
 
2723
        result = _tmp7_;
 
2724
        return result;
 
2725
}
 
2726
 
 
2727
 
 
2728
gboolean contacts_contact_has_notes (ContactsContact* self) {
 
2729
        gboolean result = FALSE;
 
2730
        gboolean has_notes;
 
2731
        g_return_val_if_fail (self != NULL, FALSE);
 
2732
        has_notes = FALSE;
 
2733
        {
 
2734
                GeeList* _tmp0_ = NULL;
 
2735
                GeeList* _p_list;
 
2736
                GeeList* _tmp1_;
 
2737
                gint _tmp2_;
 
2738
                gint _tmp3_;
 
2739
                gint _p_size;
 
2740
                gint _p_index;
 
2741
                _tmp0_ = contacts_contact_get_personas_for_display (self);
 
2742
                _p_list = _tmp0_;
 
2743
                _tmp1_ = _p_list;
 
2744
                _tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
 
2745
                _tmp3_ = _tmp2_;
 
2746
                _p_size = _tmp3_;
 
2747
                _p_index = -1;
 
2748
                while (TRUE) {
 
2749
                        gint _tmp4_;
 
2750
                        gint _tmp5_;
 
2751
                        gint _tmp6_;
 
2752
                        GeeList* _tmp7_;
 
2753
                        gint _tmp8_;
 
2754
                        gpointer _tmp9_ = NULL;
 
2755
                        FolksPersona* p;
 
2756
                        FolksPersona* _tmp10_;
 
2757
                        FolksNoteDetails* _tmp11_;
 
2758
                        FolksNoteDetails* note_details;
 
2759
                        FolksNoteDetails* _tmp12_;
 
2760
                        _tmp4_ = _p_index;
 
2761
                        _p_index = _tmp4_ + 1;
 
2762
                        _tmp5_ = _p_index;
 
2763
                        _tmp6_ = _p_size;
 
2764
                        if (!(_tmp5_ < _tmp6_)) {
 
2765
                                break;
 
2766
                        }
 
2767
                        _tmp7_ = _p_list;
 
2768
                        _tmp8_ = _p_index;
 
2769
                        _tmp9_ = gee_list_get (_tmp7_, _tmp8_);
 
2770
                        p = (FolksPersona*) _tmp9_;
 
2771
                        _tmp10_ = p;
 
2772
                        _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _tmp10_) : NULL);
 
2773
                        note_details = _tmp11_;
 
2774
                        _tmp12_ = note_details;
 
2775
                        if (_tmp12_ != NULL) {
 
2776
                                {
 
2777
                                        FolksNoteDetails* _tmp13_;
 
2778
                                        GeeSet* _tmp14_;
 
2779
                                        GeeSet* _tmp15_;
 
2780
                                        GeeIterator* _tmp16_ = NULL;
 
2781
                                        GeeIterator* _note_it;
 
2782
                                        _tmp13_ = note_details;
 
2783
                                        _tmp14_ = folks_note_details_get_notes (_tmp13_);
 
2784
                                        _tmp15_ = _tmp14_;
 
2785
                                        _tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
 
2786
                                        _note_it = _tmp16_;
 
2787
                                        while (TRUE) {
 
2788
                                                GeeIterator* _tmp17_;
 
2789
                                                gboolean _tmp18_ = FALSE;
 
2790
                                                GeeIterator* _tmp19_;
 
2791
                                                gpointer _tmp20_ = NULL;
 
2792
                                                FolksNoteFieldDetails* note;
 
2793
                                                FolksNoteFieldDetails* _tmp21_;
 
2794
                                                gconstpointer _tmp22_;
 
2795
                                                const gchar* _tmp23_;
 
2796
                                                _tmp17_ = _note_it;
 
2797
                                                _tmp18_ = gee_iterator_next (_tmp17_);
 
2798
                                                if (!_tmp18_) {
 
2799
                                                        break;
 
2800
                                                }
 
2801
                                                _tmp19_ = _note_it;
 
2802
                                                _tmp20_ = gee_iterator_get (_tmp19_);
 
2803
                                                note = (FolksNoteFieldDetails*) _tmp20_;
 
2804
                                                _tmp21_ = note;
 
2805
                                                _tmp22_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp21_);
 
2806
                                                _tmp23_ = _tmp22_;
 
2807
                                                if (g_strcmp0 ((const gchar*) _tmp23_, "") != 0) {
 
2808
                                                        result = TRUE;
 
2809
                                                        _g_object_unref0 (note);
 
2810
                                                        _g_object_unref0 (_note_it);
 
2811
                                                        _g_object_unref0 (note_details);
 
2812
                                                        _g_object_unref0 (p);
 
2813
                                                        _g_object_unref0 (_p_list);
 
2814
                                                        return result;
 
2815
                                                }
 
2816
                                                _g_object_unref0 (note);
 
2817
                                        }
 
2818
                                        _g_object_unref0 (_note_it);
 
2819
                                }
 
2820
                        }
 
2821
                        _g_object_unref0 (note_details);
 
2822
                        _g_object_unref0 (p);
 
2823
                }
 
2824
                _g_object_unref0 (_p_list);
 
2825
        }
 
2826
        result = FALSE;
 
2827
        return result;
 
2828
}
 
2829
 
 
2830
 
2650
2831
static gboolean string_contains (const gchar* self, const gchar* needle) {
2651
2832
        gboolean result = FALSE;
2652
2833
        const gchar* _tmp0_;
2700
2881
}
2701
2882
 
2702
2883
 
2703
 
gchar* contacts_contact_presence_to_string (FolksPresenceType presence) {
2704
 
        gchar* result = NULL;
2705
 
        FolksPresenceType _tmp0_;
2706
 
        _tmp0_ = presence;
2707
 
        switch (_tmp0_) {
2708
 
                default:
2709
 
                case FOLKS_PRESENCE_TYPE_UNKNOWN:
2710
 
                {
2711
 
                        const gchar* _tmp1_ = NULL;
2712
 
                        gchar* _tmp2_;
2713
 
                        _tmp1_ = _ ("Unknown status");
2714
 
                        _tmp2_ = g_strdup (_tmp1_);
2715
 
                        result = _tmp2_;
2716
 
                        return result;
2717
 
                }
2718
 
                case FOLKS_PRESENCE_TYPE_OFFLINE:
2719
 
                {
2720
 
                        const gchar* _tmp3_ = NULL;
2721
 
                        gchar* _tmp4_;
2722
 
                        _tmp3_ = _ ("Offline");
2723
 
                        _tmp4_ = g_strdup (_tmp3_);
2724
 
                        result = _tmp4_;
2725
 
                        return result;
2726
 
                }
2727
 
                case FOLKS_PRESENCE_TYPE_UNSET:
2728
 
                {
2729
 
                        gchar* _tmp5_;
2730
 
                        _tmp5_ = g_strdup ("");
2731
 
                        result = _tmp5_;
2732
 
                        return result;
2733
 
                }
2734
 
                case FOLKS_PRESENCE_TYPE_ERROR:
2735
 
                {
2736
 
                        const gchar* _tmp6_ = NULL;
2737
 
                        gchar* _tmp7_;
2738
 
                        _tmp6_ = _ ("Error");
2739
 
                        _tmp7_ = g_strdup (_tmp6_);
2740
 
                        result = _tmp7_;
2741
 
                        return result;
2742
 
                }
2743
 
                case FOLKS_PRESENCE_TYPE_AVAILABLE:
2744
 
                {
2745
 
                        const gchar* _tmp8_ = NULL;
2746
 
                        gchar* _tmp9_;
2747
 
                        _tmp8_ = _ ("Available");
2748
 
                        _tmp9_ = g_strdup (_tmp8_);
2749
 
                        result = _tmp9_;
2750
 
                        return result;
2751
 
                }
2752
 
                case FOLKS_PRESENCE_TYPE_AWAY:
2753
 
                {
2754
 
                        const gchar* _tmp10_ = NULL;
2755
 
                        gchar* _tmp11_;
2756
 
                        _tmp10_ = _ ("Away");
2757
 
                        _tmp11_ = g_strdup (_tmp10_);
2758
 
                        result = _tmp11_;
2759
 
                        return result;
2760
 
                }
2761
 
                case FOLKS_PRESENCE_TYPE_EXTENDED_AWAY:
2762
 
                {
2763
 
                        const gchar* _tmp12_ = NULL;
2764
 
                        gchar* _tmp13_;
2765
 
                        _tmp12_ = _ ("Extended away");
2766
 
                        _tmp13_ = g_strdup (_tmp12_);
2767
 
                        result = _tmp13_;
2768
 
                        return result;
2769
 
                }
2770
 
                case FOLKS_PRESENCE_TYPE_BUSY:
2771
 
                {
2772
 
                        const gchar* _tmp14_ = NULL;
2773
 
                        gchar* _tmp15_;
2774
 
                        _tmp14_ = _ ("Busy");
2775
 
                        _tmp15_ = g_strdup (_tmp14_);
2776
 
                        result = _tmp15_;
2777
 
                        return result;
2778
 
                }
2779
 
                case FOLKS_PRESENCE_TYPE_HIDDEN:
2780
 
                {
2781
 
                        const gchar* _tmp16_ = NULL;
2782
 
                        gchar* _tmp17_;
2783
 
                        _tmp16_ = _ ("Hidden");
2784
 
                        _tmp17_ = g_strdup (_tmp16_);
2785
 
                        result = _tmp17_;
2786
 
                        return result;
2787
 
                }
2788
 
        }
2789
 
}
2790
 
 
2791
 
 
2792
2884
gchar* contacts_contact_presence_to_icon_symbolic (FolksPresenceType presence) {
2793
2885
        gchar* result = NULL;
2794
2886
        gchar* iconname;
3136
3228
                }
3137
3229
        }
3138
3230
        _tmp10_ = a;
3139
 
        if (FOLKS_IS_EMAIL_FIELD_DETAILS (_tmp10_)) {
 
3231
        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, FOLKS_TYPE_EMAIL_FIELD_DETAILS)) {
3140
3232
                _tmp9_ = TRUE;
3141
3233
        } else {
3142
3234
                FolksAbstractFieldDetails* _tmp11_;
3143
3235
                _tmp11_ = a;
3144
 
                _tmp9_ = FOLKS_IS_PHONE_FIELD_DETAILS (_tmp11_);
 
3236
                _tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, FOLKS_TYPE_PHONE_FIELD_DETAILS);
3145
3237
        }
3146
3238
        _tmp12_ = _tmp9_;
3147
3239
        if (_tmp12_) {
3160
3252
                const gchar* _tmp23_;
3161
3253
                gint _tmp24_ = 0;
3162
3254
                _tmp13_ = a;
3163
 
                _tmp14_ = _g_object_ref0 (FOLKS_IS_ABSTRACT_FIELD_DETAILS (_tmp13_) ? ((FolksAbstractFieldDetails*) _tmp13_) : NULL);
 
3255
                _tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, FOLKS_TYPE_ABSTRACT_FIELD_DETAILS) ? ((FolksAbstractFieldDetails*) _tmp13_) : NULL);
3164
3256
                aa = _tmp14_;
3165
3257
                _tmp15_ = b;
3166
 
                _tmp16_ = _g_object_ref0 (FOLKS_IS_ABSTRACT_FIELD_DETAILS (_tmp15_) ? ((FolksAbstractFieldDetails*) _tmp15_) : NULL);
 
3258
                _tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, FOLKS_TYPE_ABSTRACT_FIELD_DETAILS) ? ((FolksAbstractFieldDetails*) _tmp15_) : NULL);
3167
3259
                bb = _tmp16_;
3168
3260
                _tmp17_ = g_strcmp0;
3169
3261
                _tmp18_ = aa;
3178
3270
                _g_object_unref0 (aa);
3179
3271
                return result;
3180
3272
        }
3181
 
        g_warning ("contacts-contact.vala:617: Unsupported AbstractFieldDetails value type");
 
3273
        g_warning ("contacts-contact.vala:662: Unsupported AbstractFieldDetails value type");
3182
3274
        result = 0;
3183
3275
        return result;
3184
3276
}
3185
3277
 
3186
3278
 
3187
 
gint contacts_contact_compare_persona_by_store (void* a, void* b) {
3188
 
        gint result = 0;
3189
 
        void* _tmp0_;
3190
 
        FolksPersona* _tmp1_;
3191
 
        FolksPersona* persona_a;
3192
 
        void* _tmp2_;
3193
 
        FolksPersona* _tmp3_;
3194
 
        FolksPersona* persona_b;
3195
 
        FolksPersona* _tmp4_;
3196
 
        FolksPersonaStore* _tmp5_;
3197
 
        FolksPersonaStore* _tmp6_;
3198
 
        FolksPersonaStore* _tmp7_;
3199
 
        FolksPersonaStore* store_a;
3200
 
        FolksPersona* _tmp8_;
3201
 
        FolksPersonaStore* _tmp9_;
3202
 
        FolksPersonaStore* _tmp10_;
3203
 
        FolksPersonaStore* _tmp11_;
3204
 
        FolksPersonaStore* store_b;
3205
 
        FolksPersonaStore* _tmp12_;
3206
 
        FolksPersonaStore* _tmp13_;
3207
 
        gboolean _tmp28_ = FALSE;
3208
 
        FolksPersonaStore* _tmp29_;
3209
 
        gboolean _tmp30_;
3210
 
        gboolean _tmp31_;
3211
 
        gboolean _tmp35_;
3212
 
        FolksPersonaStore* _tmp36_;
3213
 
        gboolean _tmp37_;
3214
 
        gboolean _tmp38_;
3215
 
        FolksPersonaStore* _tmp39_;
3216
 
        gboolean _tmp40_;
3217
 
        gboolean _tmp41_;
3218
 
        gboolean _tmp42_ = FALSE;
3219
 
        FolksPersonaStore* _tmp43_;
3220
 
        const gchar* _tmp44_;
3221
 
        const gchar* _tmp45_;
3222
 
        gboolean _tmp49_;
3223
 
        FolksPersonaStore* _tmp58_;
3224
 
        const gchar* _tmp59_;
3225
 
        const gchar* _tmp60_;
3226
 
        FolksPersonaStore* _tmp61_;
3227
 
        const gchar* _tmp62_;
3228
 
        const gchar* _tmp63_;
3229
 
        GCompareFunc _tmp64_;
3230
 
        FolksPersonaStore* _tmp65_;
3231
 
        const gchar* _tmp66_;
3232
 
        const gchar* _tmp67_;
3233
 
        FolksPersonaStore* _tmp68_;
3234
 
        const gchar* _tmp69_;
3235
 
        const gchar* _tmp70_;
3236
 
        gint _tmp71_ = 0;
3237
 
        _tmp0_ = a;
3238
 
        _tmp1_ = _g_object_ref0 ((FolksPersona*) _tmp0_);
3239
 
        persona_a = _tmp1_;
3240
 
        _tmp2_ = b;
3241
 
        _tmp3_ = _g_object_ref0 ((FolksPersona*) _tmp2_);
3242
 
        persona_b = _tmp3_;
3243
 
        _tmp4_ = persona_a;
3244
 
        _tmp5_ = folks_persona_get_store (_tmp4_);
3245
 
        _tmp6_ = _tmp5_;
3246
 
        _tmp7_ = _g_object_ref0 (_tmp6_);
3247
 
        store_a = _tmp7_;
3248
 
        _tmp8_ = persona_b;
3249
 
        _tmp9_ = folks_persona_get_store (_tmp8_);
3250
 
        _tmp10_ = _tmp9_;
3251
 
        _tmp11_ = _g_object_ref0 (_tmp10_);
3252
 
        store_b = _tmp11_;
3253
 
        _tmp12_ = store_a;
3254
 
        _tmp13_ = store_b;
3255
 
        if (_tmp12_ == _tmp13_) {
3256
 
                FolksPersona* _tmp14_;
3257
 
                gboolean _tmp15_ = FALSE;
3258
 
                _tmp14_ = persona_a;
3259
 
                _tmp15_ = contacts_contact_persona_is_google (_tmp14_);
3260
 
                if (_tmp15_) {
3261
 
                        gboolean _tmp16_ = FALSE;
3262
 
                        FolksPersona* _tmp17_;
3263
 
                        gboolean _tmp18_ = FALSE;
3264
 
                        gboolean _tmp21_;
3265
 
                        gboolean _tmp22_ = FALSE;
3266
 
                        FolksPersona* _tmp23_;
3267
 
                        gboolean _tmp24_ = FALSE;
3268
 
                        gboolean _tmp27_;
3269
 
                        _tmp17_ = persona_a;
3270
 
                        _tmp18_ = contacts_contact_persona_is_google_other (_tmp17_);
3271
 
                        if (_tmp18_) {
3272
 
                                FolksPersona* _tmp19_;
3273
 
                                gboolean _tmp20_ = FALSE;
3274
 
                                _tmp19_ = persona_b;
3275
 
                                _tmp20_ = contacts_contact_persona_is_google_other (_tmp19_);
3276
 
                                _tmp16_ = !_tmp20_;
3277
 
                        } else {
3278
 
                                _tmp16_ = FALSE;
3279
 
                        }
3280
 
                        _tmp21_ = _tmp16_;
3281
 
                        if (_tmp21_) {
3282
 
                                result = 1;
3283
 
                                _g_object_unref0 (store_b);
3284
 
                                _g_object_unref0 (store_a);
3285
 
                                _g_object_unref0 (persona_b);
3286
 
                                _g_object_unref0 (persona_a);
3287
 
                                return result;
3288
 
                        }
3289
 
                        _tmp23_ = persona_a;
3290
 
                        _tmp24_ = contacts_contact_persona_is_google_other (_tmp23_);
3291
 
                        if (!_tmp24_) {
3292
 
                                FolksPersona* _tmp25_;
3293
 
                                gboolean _tmp26_ = FALSE;
3294
 
                                _tmp25_ = persona_b;
3295
 
                                _tmp26_ = contacts_contact_persona_is_google_other (_tmp25_);
3296
 
                                _tmp22_ = _tmp26_;
3297
 
                        } else {
3298
 
                                _tmp22_ = FALSE;
3299
 
                        }
3300
 
                        _tmp27_ = _tmp22_;
3301
 
                        if (_tmp27_) {
3302
 
                                result = -1;
3303
 
                                _g_object_unref0 (store_b);
3304
 
                                _g_object_unref0 (store_a);
3305
 
                                _g_object_unref0 (persona_b);
3306
 
                                _g_object_unref0 (persona_a);
3307
 
                                return result;
3308
 
                        }
3309
 
                }
3310
 
                result = 0;
3311
 
                _g_object_unref0 (store_b);
3312
 
                _g_object_unref0 (store_a);
3313
 
                _g_object_unref0 (persona_b);
3314
 
                _g_object_unref0 (persona_a);
3315
 
                return result;
3316
 
        }
3317
 
        _tmp29_ = store_a;
3318
 
        _tmp30_ = folks_persona_store_get_is_primary_store (_tmp29_);
3319
 
        _tmp31_ = _tmp30_;
3320
 
        if (_tmp31_) {
3321
 
                FolksPersonaStore* _tmp32_;
3322
 
                gboolean _tmp33_;
3323
 
                gboolean _tmp34_;
3324
 
                _tmp32_ = store_b;
3325
 
                _tmp33_ = folks_persona_store_get_is_primary_store (_tmp32_);
3326
 
                _tmp34_ = _tmp33_;
3327
 
                _tmp28_ = _tmp34_;
3328
 
        } else {
3329
 
                _tmp28_ = FALSE;
3330
 
        }
3331
 
        _tmp35_ = _tmp28_;
3332
 
        if (_tmp35_) {
3333
 
                result = 0;
3334
 
                _g_object_unref0 (store_b);
3335
 
                _g_object_unref0 (store_a);
3336
 
                _g_object_unref0 (persona_b);
3337
 
                _g_object_unref0 (persona_a);
3338
 
                return result;
3339
 
        }
3340
 
        _tmp36_ = store_a;
3341
 
        _tmp37_ = folks_persona_store_get_is_primary_store (_tmp36_);
3342
 
        _tmp38_ = _tmp37_;
3343
 
        if (_tmp38_) {
3344
 
                result = -1;
3345
 
                _g_object_unref0 (store_b);
3346
 
                _g_object_unref0 (store_a);
3347
 
                _g_object_unref0 (persona_b);
3348
 
                _g_object_unref0 (persona_a);
3349
 
                return result;
3350
 
        }
3351
 
        _tmp39_ = store_b;
3352
 
        _tmp40_ = folks_persona_store_get_is_primary_store (_tmp39_);
3353
 
        _tmp41_ = _tmp40_;
3354
 
        if (_tmp41_) {
3355
 
                result = 1;
3356
 
                _g_object_unref0 (store_b);
3357
 
                _g_object_unref0 (store_a);
3358
 
                _g_object_unref0 (persona_b);
3359
 
                _g_object_unref0 (persona_a);
3360
 
                return result;
3361
 
        }
3362
 
        _tmp43_ = store_a;
3363
 
        _tmp44_ = folks_persona_store_get_type_id (_tmp43_);
3364
 
        _tmp45_ = _tmp44_;
3365
 
        if (g_strcmp0 (_tmp45_, "eds") == 0) {
3366
 
                FolksPersonaStore* _tmp46_;
3367
 
                const gchar* _tmp47_;
3368
 
                const gchar* _tmp48_;
3369
 
                _tmp46_ = store_b;
3370
 
                _tmp47_ = folks_persona_store_get_type_id (_tmp46_);
3371
 
                _tmp48_ = _tmp47_;
3372
 
                _tmp42_ = g_strcmp0 (_tmp48_, "eds") == 0;
3373
 
        } else {
3374
 
                _tmp42_ = FALSE;
3375
 
        }
3376
 
        _tmp49_ = _tmp42_;
3377
 
        if (_tmp49_) {
3378
 
                GCompareFunc _tmp50_;
3379
 
                FolksPersonaStore* _tmp51_;
3380
 
                const gchar* _tmp52_;
3381
 
                const gchar* _tmp53_;
3382
 
                FolksPersonaStore* _tmp54_;
3383
 
                const gchar* _tmp55_;
3384
 
                const gchar* _tmp56_;
3385
 
                gint _tmp57_ = 0;
3386
 
                _tmp50_ = g_strcmp0;
3387
 
                _tmp51_ = store_a;
3388
 
                _tmp52_ = folks_persona_store_get_id (_tmp51_);
3389
 
                _tmp53_ = _tmp52_;
3390
 
                _tmp54_ = store_b;
3391
 
                _tmp55_ = folks_persona_store_get_id (_tmp54_);
3392
 
                _tmp56_ = _tmp55_;
3393
 
                _tmp57_ = _tmp50_ (_tmp53_, _tmp56_);
3394
 
                result = _tmp57_;
3395
 
                _g_object_unref0 (store_b);
3396
 
                _g_object_unref0 (store_a);
3397
 
                _g_object_unref0 (persona_b);
3398
 
                _g_object_unref0 (persona_a);
3399
 
                return result;
3400
 
        }
3401
 
        _tmp58_ = store_a;
3402
 
        _tmp59_ = folks_persona_store_get_type_id (_tmp58_);
3403
 
        _tmp60_ = _tmp59_;
3404
 
        if (g_strcmp0 (_tmp60_, "eds") == 0) {
3405
 
                result = -1;
3406
 
                _g_object_unref0 (store_b);
3407
 
                _g_object_unref0 (store_a);
3408
 
                _g_object_unref0 (persona_b);
3409
 
                _g_object_unref0 (persona_a);
3410
 
                return result;
3411
 
        }
3412
 
        _tmp61_ = store_b;
3413
 
        _tmp62_ = folks_persona_store_get_type_id (_tmp61_);
3414
 
        _tmp63_ = _tmp62_;
3415
 
        if (g_strcmp0 (_tmp63_, "eds") == 0) {
3416
 
                result = 1;
3417
 
                _g_object_unref0 (store_b);
3418
 
                _g_object_unref0 (store_a);
3419
 
                _g_object_unref0 (persona_b);
3420
 
                _g_object_unref0 (persona_a);
3421
 
                return result;
3422
 
        }
3423
 
        _tmp64_ = g_strcmp0;
3424
 
        _tmp65_ = store_a;
3425
 
        _tmp66_ = folks_persona_store_get_id (_tmp65_);
3426
 
        _tmp67_ = _tmp66_;
3427
 
        _tmp68_ = store_b;
3428
 
        _tmp69_ = folks_persona_store_get_id (_tmp68_);
3429
 
        _tmp70_ = _tmp69_;
3430
 
        _tmp71_ = _tmp64_ (_tmp67_, _tmp70_);
3431
 
        result = _tmp71_;
3432
 
        _g_object_unref0 (store_b);
3433
 
        _g_object_unref0 (store_a);
3434
 
        _g_object_unref0 (persona_b);
3435
 
        _g_object_unref0 (persona_a);
3436
 
        return result;
3437
 
}
3438
 
 
3439
 
 
3440
 
static gint _contacts_contact_compare_fields_gcompare_func (gconstpointer a, gconstpointer b) {
 
3279
static gint _contacts_contact_compare_fields_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
3441
3280
        gint result;
3442
3281
        result = contacts_contact_compare_fields (a, b);
3443
3282
        return result;
3450
3289
        GeeArrayList* res;
3451
3290
        GeeCollection* _tmp1_;
3452
3291
        g_return_val_if_fail (fields != NULL, NULL);
3453
 
        _tmp0_ = gee_array_list_new (t_type, (GBoxedCopyFunc) t_dup_func, t_destroy_func, NULL);
 
3292
        _tmp0_ = gee_array_list_new (t_type, (GBoxedCopyFunc) t_dup_func, t_destroy_func, NULL, NULL, NULL);
3454
3293
        res = _tmp0_;
3455
3294
        _tmp1_ = fields;
3456
 
        gee_abstract_collection_add_all ((GeeAbstractCollection*) res, _tmp1_);
3457
 
        gee_list_sort ((GeeList*) res, _contacts_contact_compare_fields_gcompare_func);
 
3295
        gee_array_list_add_all (res, _tmp1_);
 
3296
        gee_list_sort ((GeeList*) res, _contacts_contact_compare_fields_gcompare_data_func, NULL, NULL);
3458
3297
        result = res;
3459
3298
        return result;
3460
3299
}
3799
3638
                        _tmp13_ = gee_iterator_get (_tmp12_);
3800
3639
                        p = (FolksPersona*) _tmp13_;
3801
3640
                        _tmp14_ = p;
3802
 
                        _tmp15_ = _g_object_ref0 (TPF_IS_PERSONA (_tmp14_) ? ((TpfPersona*) _tmp14_) : NULL);
 
3641
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp14_) : NULL);
3803
3642
                        tp = _tmp15_;
3804
3643
                        _tmp17_ = tp;
3805
3644
                        if (_tmp17_ != NULL) {
3924
3763
                _tmp1_ = persona;
3925
3764
                _tmp2_ = folks_persona_get_store ((FolksPersona*) _tmp1_);
3926
3765
                _tmp3_ = _tmp2_;
3927
 
                _tmp4_ = tpf_persona_store_get_account (TPF_IS_PERSONA_STORE (_tmp3_) ? ((TpfPersonaStore*) _tmp3_) : NULL);
 
3766
                _tmp4_ = tpf_persona_store_get_account (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TPF_TYPE_PERSONA_STORE) ? ((TpfPersonaStore*) _tmp3_) : NULL);
3928
3767
                _tmp5_ = _tmp4_;
3929
3768
                _tmp6_ = _g_object_ref0 (_tmp5_);
3930
3769
                account = _tmp6_;
4023
3862
GtkWidget* contacts_contact_create_merged_presence_widget (ContactsContact* self) {
4024
3863
        GtkWidget* result = NULL;
4025
3864
        ContactsContactPresence* _tmp0_;
4026
 
        GtkWidget* _tmp1_;
4027
3865
        g_return_val_if_fail (self != NULL, NULL);
4028
3866
        _tmp0_ = contacts_contact_presence_new (self);
4029
 
        _tmp1_ = (GtkWidget*) g_object_ref_sink (_tmp0_);
4030
 
        result = _tmp1_;
 
3867
        g_object_ref_sink (_tmp0_);
 
3868
        result = (GtkWidget*) _tmp0_;
4031
3869
        return result;
4032
3870
}
4033
3871
 
4034
3872
 
4035
 
static Block11Data* block11_data_ref (Block11Data* _data11_) {
4036
 
        g_atomic_int_inc (&_data11_->_ref_count_);
4037
 
        return _data11_;
 
3873
static Block2Data* block2_data_ref (Block2Data* _data2_) {
 
3874
        g_atomic_int_inc (&_data2_->_ref_count_);
 
3875
        return _data2_;
4038
3876
}
4039
3877
 
4040
3878
 
4041
 
static void block11_data_unref (void * _userdata_) {
4042
 
        Block11Data* _data11_;
4043
 
        _data11_ = (Block11Data*) _userdata_;
4044
 
        if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
 
3879
static void block2_data_unref (void * _userdata_) {
 
3880
        Block2Data* _data2_;
 
3881
        _data2_ = (Block2Data*) _userdata_;
 
3882
        if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
4045
3883
                ContactsContact * self;
4046
 
                self = _data11_->self;
4047
 
                _g_free0 (_data11_->last_class);
4048
 
                _g_object_unref0 (_data11_->i);
4049
 
                _g_object_unref0 (_data11_->tp);
 
3884
                self = _data2_->self;
 
3885
                _g_free0 (_data2_->last_class);
 
3886
                _g_object_unref0 (_data2_->i);
 
3887
                _g_object_unref0 (_data2_->tp);
4050
3888
                _g_object_unref0 (self);
4051
 
                g_slice_free (Block11Data, _data11_);
 
3889
                g_slice_free (Block2Data, _data2_);
4052
3890
        }
4053
3891
}
4054
3892
 
4055
3893
 
4056
 
static void __lambda6_ (Block11Data* _data11_, GParamSpec* pspec) {
 
3894
static void __lambda13_ (Block2Data* _data2_, GParamSpec* pspec) {
4057
3895
        ContactsContact * self;
4058
3896
        GtkImage* _tmp0_;
4059
3897
        TpfPersona* _tmp1_;
4071
3909
        GtkImage* _tmp13_;
4072
3910
        GtkStyleContext* _tmp14_ = NULL;
4073
3911
        const gchar* _tmp15_;
4074
 
        self = _data11_->self;
 
3912
        self = _data2_->self;
4075
3913
        g_return_if_fail (pspec != NULL);
4076
 
        _tmp0_ = _data11_->i;
4077
 
        _tmp1_ = _data11_->tp;
 
3914
        _tmp0_ = _data2_->i;
 
3915
        _tmp1_ = _data2_->tp;
4078
3916
        _tmp2_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp1_);
4079
3917
        _tmp3_ = _tmp2_;
4080
3918
        _tmp4_ = contacts_contact_presence_to_icon_full (_tmp3_);
4081
3919
        _tmp5_ = _tmp4_;
4082
3920
        gtk_image_set_from_icon_name (_tmp0_, _tmp5_, GTK_ICON_SIZE_MENU);
4083
3921
        _g_free0 (_tmp5_);
4084
 
        _tmp6_ = _data11_->i;
 
3922
        _tmp6_ = _data2_->i;
4085
3923
        _tmp7_ = gtk_widget_get_style_context ((GtkWidget*) _tmp6_);
4086
 
        _tmp8_ = _data11_->last_class;
 
3924
        _tmp8_ = _data2_->last_class;
4087
3925
        gtk_style_context_remove_class (_tmp7_, _tmp8_);
4088
 
        _tmp9_ = _data11_->tp;
 
3926
        _tmp9_ = _data2_->tp;
4089
3927
        _tmp10_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp9_);
4090
3928
        _tmp11_ = _tmp10_;
4091
3929
        _tmp12_ = contacts_contact_presence_to_class (_tmp11_);
4092
 
        _g_free0 (_data11_->last_class);
4093
 
        _data11_->last_class = _tmp12_;
4094
 
        _tmp13_ = _data11_->i;
 
3930
        _g_free0 (_data2_->last_class);
 
3931
        _data2_->last_class = _tmp12_;
 
3932
        _tmp13_ = _data2_->i;
4095
3933
        _tmp14_ = gtk_widget_get_style_context ((GtkWidget*) _tmp13_);
4096
 
        _tmp15_ = _data11_->last_class;
 
3934
        _tmp15_ = _data2_->last_class;
4097
3935
        gtk_style_context_add_class (_tmp14_, _tmp15_);
4098
3936
}
4099
3937
 
4100
3938
 
4101
 
static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
4102
 
        __lambda6_ (self, pspec);
 
3939
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
 
3940
        __lambda13_ (self, pspec);
4103
3941
}
4104
3942
 
4105
3943
 
4106
 
static void __lambda7_ (Block11Data* _data11_, GParamSpec* pspec) {
 
3944
static void __lambda14_ (Block2Data* _data2_, GParamSpec* pspec) {
4107
3945
        ContactsContact * self;
4108
3946
        GtkImage* _tmp0_;
4109
3947
        TpfPersona* _tmp1_;
4110
3948
        const gchar* _tmp2_;
4111
3949
        const gchar* _tmp3_;
4112
 
        self = _data11_->self;
 
3950
        self = _data2_->self;
4113
3951
        g_return_if_fail (pspec != NULL);
4114
 
        _tmp0_ = _data11_->i;
4115
 
        _tmp1_ = _data11_->tp;
 
3952
        _tmp0_ = _data2_->i;
 
3953
        _tmp1_ = _data2_->tp;
4116
3954
        _tmp2_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp1_);
4117
3955
        _tmp3_ = _tmp2_;
4118
3956
        gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp3_);
4119
3957
}
4120
3958
 
4121
3959
 
4122
 
static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
4123
 
        __lambda7_ (self, pspec);
 
3960
static void ___lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
 
3961
        __lambda14_ (self, pspec);
4124
3962
}
4125
3963
 
4126
3964
 
4127
 
static void __lambda8_ (Block11Data* _data11_) {
 
3965
static void __lambda15_ (Block2Data* _data2_) {
4128
3966
        ContactsContact * self;
4129
3967
        TpfPersona* _tmp0_;
4130
3968
        gulong _tmp1_;
4131
3969
        TpfPersona* _tmp2_;
4132
3970
        gulong _tmp3_;
4133
 
        self = _data11_->self;
4134
 
        _tmp0_ = _data11_->tp;
4135
 
        _tmp1_ = _data11_->id1;
 
3971
        self = _data2_->self;
 
3972
        _tmp0_ = _data2_->tp;
 
3973
        _tmp1_ = _data2_->id1;
4136
3974
        g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
4137
 
        _tmp2_ = _data11_->tp;
4138
 
        _tmp3_ = _data11_->id2;
 
3975
        _tmp2_ = _data2_->tp;
 
3976
        _tmp3_ = _data2_->id2;
4139
3977
        g_signal_handler_disconnect ((GObject*) _tmp2_, _tmp3_);
4140
3978
}
4141
3979
 
4142
3980
 
4143
 
static void ___lambda8__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
4144
 
        __lambda8_ (self);
 
3981
static void ___lambda15__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
 
3982
        __lambda15_ (self);
4145
3983
}
4146
3984
 
4147
3985
 
4148
3986
GtkWidget* contacts_contact_create_presence_widget (ContactsContact* self, const gchar* protocol, const gchar* im_address) {
4149
3987
        GtkWidget* result = NULL;
4150
 
        Block11Data* _data11_;
 
3988
        Block2Data* _data2_;
4151
3989
        const gchar* _tmp0_;
4152
3990
        const gchar* _tmp1_;
4153
3991
        TpfPersona* _tmp2_ = NULL;
4154
3992
        TpfPersona* _tmp3_;
4155
3993
        GtkImage* _tmp4_;
4156
3994
        GtkImage* _tmp5_;
4157
 
        GtkImage* _tmp6_;
4158
 
        TpfPersona* _tmp7_;
 
3995
        TpfPersona* _tmp6_;
 
3996
        FolksPresenceType _tmp7_;
4159
3997
        FolksPresenceType _tmp8_;
4160
 
        FolksPresenceType _tmp9_;
4161
 
        gchar* _tmp10_ = NULL;
4162
 
        gchar* _tmp11_;
4163
 
        TpfPersona* _tmp12_;
 
3998
        gchar* _tmp9_ = NULL;
 
3999
        gchar* _tmp10_;
 
4000
        TpfPersona* _tmp11_;
 
4001
        FolksPresenceType _tmp12_;
4164
4002
        FolksPresenceType _tmp13_;
4165
 
        FolksPresenceType _tmp14_;
4166
 
        gchar* _tmp15_ = NULL;
4167
 
        GtkImage* _tmp16_;
4168
 
        GtkStyleContext* _tmp17_ = NULL;
4169
 
        const gchar* _tmp18_;
4170
 
        GtkImage* _tmp19_;
4171
 
        TpfPersona* _tmp20_;
 
4003
        gchar* _tmp14_ = NULL;
 
4004
        GtkImage* _tmp15_;
 
4005
        GtkStyleContext* _tmp16_ = NULL;
 
4006
        const gchar* _tmp17_;
 
4007
        GtkImage* _tmp18_;
 
4008
        TpfPersona* _tmp19_;
 
4009
        const gchar* _tmp20_;
4172
4010
        const gchar* _tmp21_;
4173
 
        const gchar* _tmp22_;
4174
 
        TpfPersona* _tmp23_;
4175
 
        gulong _tmp24_ = 0UL;
4176
 
        TpfPersona* _tmp25_;
4177
 
        gulong _tmp26_ = 0UL;
 
4011
        TpfPersona* _tmp22_;
 
4012
        gulong _tmp23_ = 0UL;
 
4013
        TpfPersona* _tmp24_;
 
4014
        gulong _tmp25_ = 0UL;
 
4015
        GtkImage* _tmp26_;
4178
4016
        GtkImage* _tmp27_;
4179
 
        GtkImage* _tmp28_;
4180
 
        GtkWidget* _tmp29_;
 
4017
        GtkWidget* _tmp28_;
4181
4018
        g_return_val_if_fail (self != NULL, NULL);
4182
4019
        g_return_val_if_fail (protocol != NULL, NULL);
4183
4020
        g_return_val_if_fail (im_address != NULL, NULL);
4184
 
        _data11_ = g_slice_new0 (Block11Data);
4185
 
        _data11_->_ref_count_ = 1;
4186
 
        _data11_->self = g_object_ref (self);
 
4021
        _data2_ = g_slice_new0 (Block2Data);
 
4022
        _data2_->_ref_count_ = 1;
 
4023
        _data2_->self = g_object_ref (self);
4187
4024
        _tmp0_ = protocol;
4188
4025
        _tmp1_ = im_address;
4189
4026
        _tmp2_ = contacts_contact_find_im_persona (self, _tmp0_, _tmp1_);
4190
 
        _data11_->tp = _tmp2_;
4191
 
        _tmp3_ = _data11_->tp;
 
4027
        _data2_->tp = _tmp2_;
 
4028
        _tmp3_ = _data2_->tp;
4192
4029
        if (_tmp3_ == NULL) {
4193
4030
                result = NULL;
4194
 
                block11_data_unref (_data11_);
4195
 
                _data11_ = NULL;
 
4031
                block2_data_unref (_data2_);
 
4032
                _data2_ = NULL;
4196
4033
                return result;
4197
4034
        }
4198
4035
        _tmp4_ = (GtkImage*) gtk_image_new ();
4199
 
        _tmp5_ = g_object_ref_sink (_tmp4_);
4200
 
        _data11_->i = _tmp5_;
4201
 
        _tmp6_ = _data11_->i;
4202
 
        _tmp7_ = _data11_->tp;
4203
 
        _tmp8_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp7_);
4204
 
        _tmp9_ = _tmp8_;
4205
 
        _tmp10_ = contacts_contact_presence_to_icon_full (_tmp9_);
4206
 
        _tmp11_ = _tmp10_;
4207
 
        gtk_image_set_from_icon_name (_tmp6_, _tmp11_, GTK_ICON_SIZE_MENU);
4208
 
        _g_free0 (_tmp11_);
4209
 
        _tmp12_ = _data11_->tp;
4210
 
        _tmp13_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp12_);
4211
 
        _tmp14_ = _tmp13_;
4212
 
        _tmp15_ = contacts_contact_presence_to_class (_tmp14_);
4213
 
        _data11_->last_class = _tmp15_;
4214
 
        _tmp16_ = _data11_->i;
4215
 
        _tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
4216
 
        _tmp18_ = _data11_->last_class;
4217
 
        gtk_style_context_add_class (_tmp17_, _tmp18_);
4218
 
        _tmp19_ = _data11_->i;
4219
 
        _tmp20_ = _data11_->tp;
4220
 
        _tmp21_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp20_);
4221
 
        _tmp22_ = _tmp21_;
4222
 
        gtk_widget_set_tooltip_text ((GtkWidget*) _tmp19_, _tmp22_);
4223
 
        _tmp23_ = _data11_->tp;
4224
 
        _tmp24_ = g_signal_connect_data ((GObject*) _tmp23_, "notify::presence-type", (GCallback) ___lambda6__g_object_notify, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4225
 
        _data11_->id1 = _tmp24_;
4226
 
        _tmp25_ = _data11_->tp;
4227
 
        _tmp26_ = g_signal_connect_data ((GObject*) _tmp25_, "notify::presence-message", (GCallback) ___lambda7__g_object_notify, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4228
 
        _data11_->id2 = _tmp26_;
4229
 
        _tmp27_ = _data11_->i;
4230
 
        g_signal_connect_data ((GtkWidget*) _tmp27_, "destroy", (GCallback) ___lambda8__gtk_widget_destroy, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4231
 
        _tmp28_ = _data11_->i;
4232
 
        _tmp29_ = _g_object_ref0 ((GtkWidget*) _tmp28_);
4233
 
        result = _tmp29_;
4234
 
        block11_data_unref (_data11_);
4235
 
        _data11_ = NULL;
 
4036
        g_object_ref_sink (_tmp4_);
 
4037
        _data2_->i = _tmp4_;
 
4038
        _tmp5_ = _data2_->i;
 
4039
        _tmp6_ = _data2_->tp;
 
4040
        _tmp7_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp6_);
 
4041
        _tmp8_ = _tmp7_;
 
4042
        _tmp9_ = contacts_contact_presence_to_icon_full (_tmp8_);
 
4043
        _tmp10_ = _tmp9_;
 
4044
        gtk_image_set_from_icon_name (_tmp5_, _tmp10_, GTK_ICON_SIZE_MENU);
 
4045
        _g_free0 (_tmp10_);
 
4046
        _tmp11_ = _data2_->tp;
 
4047
        _tmp12_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp11_);
 
4048
        _tmp13_ = _tmp12_;
 
4049
        _tmp14_ = contacts_contact_presence_to_class (_tmp13_);
 
4050
        _data2_->last_class = _tmp14_;
 
4051
        _tmp15_ = _data2_->i;
 
4052
        _tmp16_ = gtk_widget_get_style_context ((GtkWidget*) _tmp15_);
 
4053
        _tmp17_ = _data2_->last_class;
 
4054
        gtk_style_context_add_class (_tmp16_, _tmp17_);
 
4055
        _tmp18_ = _data2_->i;
 
4056
        _tmp19_ = _data2_->tp;
 
4057
        _tmp20_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp19_);
 
4058
        _tmp21_ = _tmp20_;
 
4059
        gtk_widget_set_tooltip_text ((GtkWidget*) _tmp18_, _tmp21_);
 
4060
        _tmp22_ = _data2_->tp;
 
4061
        _tmp23_ = g_signal_connect_data ((GObject*) _tmp22_, "notify::presence-type", (GCallback) ___lambda13__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
 
4062
        _data2_->id1 = _tmp23_;
 
4063
        _tmp24_ = _data2_->tp;
 
4064
        _tmp25_ = g_signal_connect_data ((GObject*) _tmp24_, "notify::presence-message", (GCallback) ___lambda14__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
 
4065
        _data2_->id2 = _tmp25_;
 
4066
        _tmp26_ = _data2_->i;
 
4067
        g_signal_connect_data ((GtkWidget*) _tmp26_, "destroy", (GCallback) ___lambda15__gtk_widget_destroy, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
 
4068
        _tmp27_ = _data2_->i;
 
4069
        _tmp28_ = _g_object_ref0 ((GtkWidget*) _tmp27_);
 
4070
        result = _tmp28_;
 
4071
        block2_data_unref (_data2_);
 
4072
        _data2_ = NULL;
4236
4073
        return result;
4237
4074
}
4238
4075
 
4310
4147
        if (g_strcmp0 (_tmp1_, "avatar") == 0) {
4311
4148
                _g_object_unref0 (self->priv->_small_avatar);
4312
4149
                self->priv->_small_avatar = NULL;
 
4150
                _g_variant_unref0 (self->priv->_avatar_icon_data);
 
4151
                self->priv->_avatar_icon_data = NULL;
4313
4152
        }
4314
4153
        contacts_contact_queue_changed (self, FALSE);
4315
4154
}
4339
4178
        gboolean _tmp17_;
4340
4179
        g_return_val_if_fail (persona != NULL, FALSE);
4341
4180
        _tmp0_ = persona;
4342
 
        _tmp1_ = _g_object_ref0 (TPF_IS_PERSONA (_tmp0_) ? ((TpfPersona*) _tmp0_) : NULL);
 
4181
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp0_) : NULL);
4343
4182
        tp = _tmp1_;
4344
4183
        _tmp3_ = tp;
4345
4184
        if (_tmp3_ == NULL) {
4363
4202
        _tmp9_ = tpf_persona_get_contact (_tmp8_);
4364
4203
        _tmp10_ = _tmp9_;
4365
4204
        _tmp11_ = tp_contact_get_client_types (_tmp10_);
 
4205
        _tmp11__length1 = _vala_array_length (_tmp11_);
4366
4206
        _tmp12_ = _tmp11_;
4367
4207
        _tmp12__length1 = _tmp11__length1;
4368
4208
        types = _tmp12_;
4422
4262
                        _tmp7_ = gee_iterator_get (_tmp6_);
4423
4263
                        p = (FolksPersona*) _tmp7_;
4424
4264
                        _tmp8_ = p;
4425
 
                        if (FOLKS_IS_PRESENCE_DETAILS (_tmp8_)) {
 
4265
                        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, FOLKS_TYPE_PRESENCE_DETAILS)) {
4426
4266
                                FolksPersona* _tmp9_;
4427
4267
                                FolksPresenceDetails* presence;
4428
4268
                                FolksPersona* _tmp10_;
4436
4276
                                gint _tmp17_ = 0;
4437
4277
                                gboolean _tmp28_;
4438
4278
                                _tmp9_ = p;
4439
 
                                presence = FOLKS_PRESENCE_DETAILS (_tmp9_);
 
4279
                                presence = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails);
4440
4280
                                _tmp10_ = p;
4441
4281
                                _tmp11_ = contacts_contact_get_is_phone (_tmp10_);
4442
4282
                                p_is_phone = _tmp11_;
4840
4680
                        stream = _tmp5_;
4841
4681
                        if (_inner_error_ != NULL) {
4842
4682
                                _g_object_unref0 (c);
4843
 
                                goto __catch4_g_error;
 
4683
                                goto __catch0_g_error;
4844
4684
                        }
4845
4685
                        _tmp6_ = stream;
4846
4686
                        _tmp7_ = size;
4851
4691
                        if (_inner_error_ != NULL) {
4852
4692
                                _g_object_unref0 (stream);
4853
4693
                                _g_object_unref0 (c);
4854
 
                                goto __catch4_g_error;
 
4694
                                goto __catch0_g_error;
4855
4695
                        }
4856
4696
                        _g_object_unref0 (res);
4857
4697
                        res = _tmp11_;
4858
4698
                        _g_object_unref0 (stream);
4859
4699
                        _g_object_unref0 (c);
4860
4700
                }
4861
 
                goto __finally4;
4862
 
                __catch4_g_error:
 
4701
                goto __finally0;
 
4702
                __catch0_g_error:
4863
4703
                {
4864
4704
                        GError* e = NULL;
4865
4705
                        GError* _tmp12_;
4868
4708
                        _inner_error_ = NULL;
4869
4709
                        _tmp12_ = e;
4870
4710
                        _tmp13_ = _tmp12_->message;
4871
 
                        g_warning ("contacts-contact.vala:932: error loading avatar %s\n", _tmp13_);
 
4711
                        g_warning ("contacts-contact.vala:944: error loading avatar %s\n", _tmp13_);
4872
4712
                        _g_error_free0 (e);
4873
4713
                }
4874
 
                __finally4:
 
4714
                __finally0:
4875
4715
                if (_inner_error_ != NULL) {
4876
4716
                        _g_object_unref0 (res);
4877
4717
                        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);
4930
4770
        gint _tmp1_;
4931
4771
        gboolean _tmp3_;
4932
4772
        GdkPixbuf* pixbuf;
4933
 
        gint _tmp43_;
4934
 
        GdkPixbuf* _tmp46_;
4935
 
        gint _tmp47_;
 
4773
        gint _tmp44_;
 
4774
        GdkPixbuf* _tmp47_;
4936
4775
        gint _tmp48_;
4937
 
        cairo_surface_t* _tmp49_;
4938
 
        cairo_surface_t* cst;
 
4776
        gint _tmp49_;
4939
4777
        cairo_surface_t* _tmp50_;
4940
 
        gint _tmp51_;
 
4778
        cairo_surface_t* cst;
 
4779
        cairo_surface_t* _tmp51_;
4941
4780
        gint _tmp52_;
4942
 
        GdkPixbuf* _tmp53_ = NULL;
 
4781
        gint _tmp53_;
 
4782
        GdkPixbuf* _tmp54_ = NULL;
4943
4783
        GError * _inner_error_ = NULL;
4944
4784
        _tmp1_ = size;
4945
4785
        if (_tmp1_ == CONTACTS_CONTACT_SMALL_AVATAR_SIZE) {
4982
4822
                GtkIconInfo* _tmp21_ = NULL;
4983
4823
                GtkIconInfo* icon_info;
4984
4824
                GtkIconInfo* _tmp22_;
4985
 
                GdkPixbuf* _tmp23_ = NULL;
4986
 
                GdkPixbuf* _tmp24_;
4987
 
                cairo_t* _tmp25_;
4988
 
                GdkPixbuf* _tmp26_;
4989
 
                gint _tmp27_;
4990
 
                gint _tmp28_;
4991
 
                gint _tmp29_;
4992
 
                gint _tmp30_;
4993
 
                cairo_t* _tmp31_;
4994
 
                gint _tmp32_;
4995
 
                gint _tmp33_;
4996
 
                gint _tmp34_;
4997
 
                gint _tmp35_;
4998
 
                gint _tmp36_;
4999
 
                gint _tmp37_;
5000
 
                cairo_t* _tmp38_;
5001
 
                cairo_surface_t* _tmp39_;
5002
 
                gint _tmp40_;
 
4825
                cairo_surface_t* _tmp40_;
5003
4826
                gint _tmp41_;
5004
 
                GdkPixbuf* _tmp42_ = NULL;
 
4827
                gint _tmp42_;
 
4828
                GdkPixbuf* _tmp43_ = NULL;
5005
4829
                _tmp6_ = size;
5006
4830
                _tmp7_ = size;
5007
4831
                _tmp8_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp6_, _tmp7_);
5028
4852
                _tmp21_ = gtk_icon_theme_lookup_icon (_tmp19_, "avatar-default-symbolic", _tmp20_, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
5029
4853
                icon_info = _tmp21_;
5030
4854
                _tmp22_ = icon_info;
5031
 
                _tmp23_ = gtk_icon_info_load_icon (_tmp22_, &_inner_error_);
5032
 
                _tmp24_ = _tmp23_;
5033
 
                if (_inner_error_ != NULL) {
5034
 
                        _gtk_icon_info_free0 (icon_info);
5035
 
                        _cairo_pattern_destroy0 (pat);
5036
 
                        _cairo_destroy0 (cr);
5037
 
                        _cairo_surface_destroy0 (cst);
5038
 
                        goto __catch5_g_error;
 
4855
                if (_tmp22_ != NULL) {
 
4856
                        GtkIconInfo* _tmp23_;
 
4857
                        GdkPixbuf* _tmp24_ = NULL;
 
4858
                        GdkPixbuf* _tmp25_;
 
4859
                        cairo_t* _tmp26_;
 
4860
                        GdkPixbuf* _tmp27_;
 
4861
                        gint _tmp28_;
 
4862
                        gint _tmp29_;
 
4863
                        gint _tmp30_;
 
4864
                        gint _tmp31_;
 
4865
                        cairo_t* _tmp32_;
 
4866
                        gint _tmp33_;
 
4867
                        gint _tmp34_;
 
4868
                        gint _tmp35_;
 
4869
                        gint _tmp36_;
 
4870
                        gint _tmp37_;
 
4871
                        gint _tmp38_;
 
4872
                        cairo_t* _tmp39_;
 
4873
                        _tmp23_ = icon_info;
 
4874
                        _tmp24_ = gtk_icon_info_load_icon (_tmp23_, &_inner_error_);
 
4875
                        _tmp25_ = _tmp24_;
 
4876
                        if (_inner_error_ != NULL) {
 
4877
                                _gtk_icon_info_free0 (icon_info);
 
4878
                                _cairo_pattern_destroy0 (pat);
 
4879
                                _cairo_destroy0 (cr);
 
4880
                                _cairo_surface_destroy0 (cst);
 
4881
                                goto __catch1_g_error;
 
4882
                        }
 
4883
                        _tmp26_ = cr;
 
4884
                        _tmp27_ = _tmp25_;
 
4885
                        _tmp28_ = size;
 
4886
                        _tmp29_ = avatar_size;
 
4887
                        _tmp30_ = size;
 
4888
                        _tmp31_ = avatar_size;
 
4889
                        gdk_cairo_set_source_pixbuf (_tmp26_, _tmp27_, (gdouble) ((_tmp28_ - _tmp29_) / 2), (gdouble) ((_tmp30_ - _tmp31_) / 2));
 
4890
                        _g_object_unref0 (_tmp27_);
 
4891
                        _tmp32_ = cr;
 
4892
                        _tmp33_ = size;
 
4893
                        _tmp34_ = avatar_size;
 
4894
                        _tmp35_ = size;
 
4895
                        _tmp36_ = avatar_size;
 
4896
                        _tmp37_ = avatar_size;
 
4897
                        _tmp38_ = avatar_size;
 
4898
                        cairo_rectangle (_tmp32_, (gdouble) ((_tmp33_ - _tmp34_) / 2), (gdouble) ((_tmp35_ - _tmp36_) / 2), (gdouble) _tmp37_, (gdouble) _tmp38_);
 
4899
                        _tmp39_ = cr;
 
4900
                        cairo_fill (_tmp39_);
5039
4901
                }
5040
 
                _tmp25_ = cr;
5041
 
                _tmp26_ = _tmp24_;
5042
 
                _tmp27_ = size;
5043
 
                _tmp28_ = avatar_size;
5044
 
                _tmp29_ = size;
5045
 
                _tmp30_ = avatar_size;
5046
 
                gdk_cairo_set_source_pixbuf (_tmp25_, _tmp26_, (gdouble) ((_tmp27_ - _tmp28_) / 2), (gdouble) ((_tmp29_ - _tmp30_) / 2));
5047
 
                _g_object_unref0 (_tmp26_);
5048
 
                _tmp31_ = cr;
5049
 
                _tmp32_ = size;
5050
 
                _tmp33_ = avatar_size;
5051
 
                _tmp34_ = size;
5052
 
                _tmp35_ = avatar_size;
5053
 
                _tmp36_ = avatar_size;
5054
 
                _tmp37_ = avatar_size;
5055
 
                cairo_rectangle (_tmp31_, (gdouble) ((_tmp32_ - _tmp33_) / 2), (gdouble) ((_tmp34_ - _tmp35_) / 2), (gdouble) _tmp36_, (gdouble) _tmp37_);
5056
 
                _tmp38_ = cr;
5057
 
                cairo_fill (_tmp38_);
5058
 
                _tmp39_ = cst;
5059
 
                _tmp40_ = size;
 
4902
                _tmp40_ = cst;
5060
4903
                _tmp41_ = size;
5061
 
                _tmp42_ = gdk_pixbuf_get_from_surface (_tmp39_, 0, 0, _tmp40_, _tmp41_);
 
4904
                _tmp42_ = size;
 
4905
                _tmp43_ = gdk_pixbuf_get_from_surface (_tmp40_, 0, 0, _tmp41_, _tmp42_);
5062
4906
                _g_object_unref0 (pixbuf);
5063
 
                pixbuf = _tmp42_;
 
4907
                pixbuf = _tmp43_;
5064
4908
                _gtk_icon_info_free0 (icon_info);
5065
4909
                _cairo_pattern_destroy0 (pat);
5066
4910
                _cairo_destroy0 (cr);
5067
4911
                _cairo_surface_destroy0 (cst);
5068
4912
        }
5069
 
        goto __finally5;
5070
 
        __catch5_g_error:
 
4913
        goto __finally1;
 
4914
        __catch1_g_error:
5071
4915
        {
5072
4916
                g_clear_error (&_inner_error_);
5073
4917
                _inner_error_ = NULL;
5074
4918
        }
5075
 
        __finally5:
 
4919
        __finally1:
5076
4920
        if (_inner_error_ != NULL) {
5077
4921
                _g_object_unref0 (pixbuf);
5078
4922
                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);
5079
4923
                g_clear_error (&_inner_error_);
5080
4924
                return NULL;
5081
4925
        }
5082
 
        _tmp43_ = size;
5083
 
        if (_tmp43_ == CONTACTS_CONTACT_SMALL_AVATAR_SIZE) {
5084
 
                GdkPixbuf* _tmp44_;
 
4926
        _tmp44_ = size;
 
4927
        if (_tmp44_ == CONTACTS_CONTACT_SMALL_AVATAR_SIZE) {
5085
4928
                GdkPixbuf* _tmp45_;
5086
 
                _tmp44_ = pixbuf;
5087
 
                _tmp45_ = _g_object_ref0 (_tmp44_);
 
4929
                GdkPixbuf* _tmp46_;
 
4930
                _tmp45_ = pixbuf;
 
4931
                _tmp46_ = _g_object_ref0 (_tmp45_);
5088
4932
                _g_object_unref0 (contacts_contact_fallback_pixbuf_default);
5089
 
                contacts_contact_fallback_pixbuf_default = _tmp45_;
 
4933
                contacts_contact_fallback_pixbuf_default = _tmp46_;
5090
4934
        }
5091
 
        _tmp46_ = pixbuf;
5092
 
        if (_tmp46_ != NULL) {
 
4935
        _tmp47_ = pixbuf;
 
4936
        if (_tmp47_ != NULL) {
5093
4937
                result = pixbuf;
5094
4938
                return result;
5095
4939
        }
5096
 
        _tmp47_ = size;
5097
4940
        _tmp48_ = size;
5098
 
        _tmp49_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp47_, _tmp48_);
5099
 
        cst = _tmp49_;
5100
 
        _tmp50_ = cst;
5101
 
        _tmp51_ = size;
 
4941
        _tmp49_ = size;
 
4942
        _tmp50_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp48_, _tmp49_);
 
4943
        cst = _tmp50_;
 
4944
        _tmp51_ = cst;
5102
4945
        _tmp52_ = size;
5103
 
        _tmp53_ = gdk_pixbuf_get_from_surface (_tmp50_, 0, 0, _tmp51_, _tmp52_);
5104
 
        result = _tmp53_;
 
4946
        _tmp53_ = size;
 
4947
        _tmp54_ = gdk_pixbuf_get_from_surface (_tmp51_, 0, 0, _tmp52_, _tmp53_);
 
4948
        result = _tmp54_;
5105
4949
        _cairo_surface_destroy0 (cst);
5106
4950
        _g_object_unref0 (pixbuf);
5107
4951
        return result;
5413
5257
                        if (_tmp13_ == FOLKS_MAYBE_BOOL_TRUE) {
5414
5258
                                FolksPersona* _tmp14_;
5415
5259
                                _tmp14_ = p;
5416
 
                                _tmp8_ = !TPF_IS_PERSONA (_tmp14_);
 
5260
                                _tmp8_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, TPF_TYPE_PERSONA);
5417
5261
                        } else {
5418
5262
                                _tmp8_ = FALSE;
5419
5263
                        }
5481
5325
                g_assert_not_reached ();
5482
5326
        }
5483
5327
        _state_0:
5484
 
        _data_->_tmp0_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
 
5328
        _data_->_tmp0_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
5485
5329
        _data_->personas = _data_->_tmp0_;
5486
5330
        {
5487
5331
                _data_->_tmp1_ = _data_->self->individual;
5508
5352
                        _data_->_tmp14_ = _data_->_tmp13_;
5509
5353
                        if (_data_->_tmp14_ == FOLKS_MAYBE_BOOL_TRUE) {
5510
5354
                                _data_->_tmp15_ = _data_->p;
5511
 
                                _data_->_tmp9_ = !TPF_IS_PERSONA (_data_->_tmp15_);
 
5355
                                _data_->_tmp9_ = !G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp15_, TPF_TYPE_PERSONA);
5512
5356
                        } else {
5513
5357
                                _data_->_tmp9_ = FALSE;
5514
5358
                        }
5652
5496
                g_object_unref (_data_->_async_result);
5653
5497
                return FALSE;
5654
5498
        }
5655
 
        _data_->_tmp2_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
 
5499
        _data_->_tmp2_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
5656
5500
        _data_->persona_set = _data_->_tmp2_;
5657
5501
        _data_->_tmp3_ = _data_->persona_set;
5658
5502
        _data_->_tmp4_ = _data_->self->individual;
5659
5503
        _data_->_tmp5_ = folks_individual_get_personas (_data_->_tmp4_);
5660
5504
        _data_->_tmp6_ = _data_->_tmp5_;
5661
 
        gee_abstract_collection_add_all ((GeeAbstractCollection*) _data_->_tmp3_, (GeeCollection*) _data_->_tmp6_);
 
5505
        gee_collection_add_all ((GeeCollection*) _data_->_tmp3_, (GeeCollection*) _data_->_tmp6_);
5662
5506
        _data_->_tmp7_ = _data_->persona_set;
5663
5507
        _data_->_tmp8_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp7_);
5664
5508
        _data_->_tmp9_ = _data_->_tmp8_;
5801
5645
}
5802
5646
 
5803
5647
 
5804
 
static gint _contacts_contact_compare_persona_by_store_gcompare_func (gconstpointer a, gconstpointer b) {
 
5648
static gint __lambda3_ (ContactsContact* self, FolksPersona* a, FolksPersona* b) {
 
5649
        gint result = 0;
 
5650
        FolksPersona* _tmp0_;
 
5651
        FolksPersona* _tmp1_;
 
5652
        FolksPersona* persona_a;
 
5653
        FolksPersona* _tmp2_;
 
5654
        FolksPersona* _tmp3_;
 
5655
        FolksPersona* persona_b;
 
5656
        FolksPersona* _tmp4_;
 
5657
        FolksPersonaStore* _tmp5_;
 
5658
        FolksPersonaStore* _tmp6_;
 
5659
        FolksPersonaStore* _tmp7_;
 
5660
        FolksPersonaStore* store_a;
 
5661
        FolksPersona* _tmp8_;
 
5662
        FolksPersonaStore* _tmp9_;
 
5663
        FolksPersonaStore* _tmp10_;
 
5664
        FolksPersonaStore* _tmp11_;
 
5665
        FolksPersonaStore* store_b;
 
5666
        FolksPersonaStore* _tmp12_;
 
5667
        FolksPersonaStore* _tmp13_;
 
5668
        gboolean _tmp28_ = FALSE;
 
5669
        FolksPersonaStore* _tmp29_;
 
5670
        gboolean _tmp30_;
 
5671
        gboolean _tmp31_;
 
5672
        gboolean _tmp35_;
 
5673
        FolksPersonaStore* _tmp36_;
 
5674
        gboolean _tmp37_;
 
5675
        gboolean _tmp38_;
 
5676
        FolksPersonaStore* _tmp39_;
 
5677
        gboolean _tmp40_;
 
5678
        gboolean _tmp41_;
 
5679
        gboolean _tmp42_ = FALSE;
 
5680
        FolksPersonaStore* _tmp43_;
 
5681
        const gchar* _tmp44_;
 
5682
        const gchar* _tmp45_;
 
5683
        gboolean _tmp49_;
 
5684
        FolksPersonaStore* _tmp58_;
 
5685
        const gchar* _tmp59_;
 
5686
        const gchar* _tmp60_;
 
5687
        FolksPersonaStore* _tmp61_;
 
5688
        const gchar* _tmp62_;
 
5689
        const gchar* _tmp63_;
 
5690
        GCompareFunc _tmp64_;
 
5691
        FolksPersonaStore* _tmp65_;
 
5692
        const gchar* _tmp66_;
 
5693
        const gchar* _tmp67_;
 
5694
        FolksPersonaStore* _tmp68_;
 
5695
        const gchar* _tmp69_;
 
5696
        const gchar* _tmp70_;
 
5697
        gint _tmp71_ = 0;
 
5698
        g_return_val_if_fail (a != NULL, 0);
 
5699
        g_return_val_if_fail (b != NULL, 0);
 
5700
        _tmp0_ = a;
 
5701
        _tmp1_ = _g_object_ref0 ((FolksPersona*) _tmp0_);
 
5702
        persona_a = _tmp1_;
 
5703
        _tmp2_ = b;
 
5704
        _tmp3_ = _g_object_ref0 ((FolksPersona*) _tmp2_);
 
5705
        persona_b = _tmp3_;
 
5706
        _tmp4_ = persona_a;
 
5707
        _tmp5_ = folks_persona_get_store (_tmp4_);
 
5708
        _tmp6_ = _tmp5_;
 
5709
        _tmp7_ = _g_object_ref0 (_tmp6_);
 
5710
        store_a = _tmp7_;
 
5711
        _tmp8_ = persona_b;
 
5712
        _tmp9_ = folks_persona_get_store (_tmp8_);
 
5713
        _tmp10_ = _tmp9_;
 
5714
        _tmp11_ = _g_object_ref0 (_tmp10_);
 
5715
        store_b = _tmp11_;
 
5716
        _tmp12_ = store_a;
 
5717
        _tmp13_ = store_b;
 
5718
        if (_tmp12_ == _tmp13_) {
 
5719
                FolksPersona* _tmp14_;
 
5720
                gboolean _tmp15_ = FALSE;
 
5721
                _tmp14_ = persona_a;
 
5722
                _tmp15_ = contacts_contact_persona_is_google (_tmp14_);
 
5723
                if (_tmp15_) {
 
5724
                        gboolean _tmp16_ = FALSE;
 
5725
                        FolksPersona* _tmp17_;
 
5726
                        gboolean _tmp18_ = FALSE;
 
5727
                        gboolean _tmp21_;
 
5728
                        gboolean _tmp22_ = FALSE;
 
5729
                        FolksPersona* _tmp23_;
 
5730
                        gboolean _tmp24_ = FALSE;
 
5731
                        gboolean _tmp27_;
 
5732
                        _tmp17_ = persona_a;
 
5733
                        _tmp18_ = contacts_contact_persona_is_google_other (_tmp17_);
 
5734
                        if (_tmp18_) {
 
5735
                                FolksPersona* _tmp19_;
 
5736
                                gboolean _tmp20_ = FALSE;
 
5737
                                _tmp19_ = persona_b;
 
5738
                                _tmp20_ = contacts_contact_persona_is_google_other (_tmp19_);
 
5739
                                _tmp16_ = !_tmp20_;
 
5740
                        } else {
 
5741
                                _tmp16_ = FALSE;
 
5742
                        }
 
5743
                        _tmp21_ = _tmp16_;
 
5744
                        if (_tmp21_) {
 
5745
                                result = 1;
 
5746
                                _g_object_unref0 (store_b);
 
5747
                                _g_object_unref0 (store_a);
 
5748
                                _g_object_unref0 (persona_b);
 
5749
                                _g_object_unref0 (persona_a);
 
5750
                                return result;
 
5751
                        }
 
5752
                        _tmp23_ = persona_a;
 
5753
                        _tmp24_ = contacts_contact_persona_is_google_other (_tmp23_);
 
5754
                        if (!_tmp24_) {
 
5755
                                FolksPersona* _tmp25_;
 
5756
                                gboolean _tmp26_ = FALSE;
 
5757
                                _tmp25_ = persona_b;
 
5758
                                _tmp26_ = contacts_contact_persona_is_google_other (_tmp25_);
 
5759
                                _tmp22_ = _tmp26_;
 
5760
                        } else {
 
5761
                                _tmp22_ = FALSE;
 
5762
                        }
 
5763
                        _tmp27_ = _tmp22_;
 
5764
                        if (_tmp27_) {
 
5765
                                result = -1;
 
5766
                                _g_object_unref0 (store_b);
 
5767
                                _g_object_unref0 (store_a);
 
5768
                                _g_object_unref0 (persona_b);
 
5769
                                _g_object_unref0 (persona_a);
 
5770
                                return result;
 
5771
                        }
 
5772
                }
 
5773
                result = 0;
 
5774
                _g_object_unref0 (store_b);
 
5775
                _g_object_unref0 (store_a);
 
5776
                _g_object_unref0 (persona_b);
 
5777
                _g_object_unref0 (persona_a);
 
5778
                return result;
 
5779
        }
 
5780
        _tmp29_ = store_a;
 
5781
        _tmp30_ = folks_persona_store_get_is_primary_store (_tmp29_);
 
5782
        _tmp31_ = _tmp30_;
 
5783
        if (_tmp31_) {
 
5784
                FolksPersonaStore* _tmp32_;
 
5785
                gboolean _tmp33_;
 
5786
                gboolean _tmp34_;
 
5787
                _tmp32_ = store_b;
 
5788
                _tmp33_ = folks_persona_store_get_is_primary_store (_tmp32_);
 
5789
                _tmp34_ = _tmp33_;
 
5790
                _tmp28_ = _tmp34_;
 
5791
        } else {
 
5792
                _tmp28_ = FALSE;
 
5793
        }
 
5794
        _tmp35_ = _tmp28_;
 
5795
        if (_tmp35_) {
 
5796
                result = 0;
 
5797
                _g_object_unref0 (store_b);
 
5798
                _g_object_unref0 (store_a);
 
5799
                _g_object_unref0 (persona_b);
 
5800
                _g_object_unref0 (persona_a);
 
5801
                return result;
 
5802
        }
 
5803
        _tmp36_ = store_a;
 
5804
        _tmp37_ = folks_persona_store_get_is_primary_store (_tmp36_);
 
5805
        _tmp38_ = _tmp37_;
 
5806
        if (_tmp38_) {
 
5807
                result = -1;
 
5808
                _g_object_unref0 (store_b);
 
5809
                _g_object_unref0 (store_a);
 
5810
                _g_object_unref0 (persona_b);
 
5811
                _g_object_unref0 (persona_a);
 
5812
                return result;
 
5813
        }
 
5814
        _tmp39_ = store_b;
 
5815
        _tmp40_ = folks_persona_store_get_is_primary_store (_tmp39_);
 
5816
        _tmp41_ = _tmp40_;
 
5817
        if (_tmp41_) {
 
5818
                result = 1;
 
5819
                _g_object_unref0 (store_b);
 
5820
                _g_object_unref0 (store_a);
 
5821
                _g_object_unref0 (persona_b);
 
5822
                _g_object_unref0 (persona_a);
 
5823
                return result;
 
5824
        }
 
5825
        _tmp43_ = store_a;
 
5826
        _tmp44_ = folks_persona_store_get_type_id (_tmp43_);
 
5827
        _tmp45_ = _tmp44_;
 
5828
        if (g_strcmp0 (_tmp45_, "eds") == 0) {
 
5829
                FolksPersonaStore* _tmp46_;
 
5830
                const gchar* _tmp47_;
 
5831
                const gchar* _tmp48_;
 
5832
                _tmp46_ = store_b;
 
5833
                _tmp47_ = folks_persona_store_get_type_id (_tmp46_);
 
5834
                _tmp48_ = _tmp47_;
 
5835
                _tmp42_ = g_strcmp0 (_tmp48_, "eds") == 0;
 
5836
        } else {
 
5837
                _tmp42_ = FALSE;
 
5838
        }
 
5839
        _tmp49_ = _tmp42_;
 
5840
        if (_tmp49_) {
 
5841
                GCompareFunc _tmp50_;
 
5842
                FolksPersonaStore* _tmp51_;
 
5843
                const gchar* _tmp52_;
 
5844
                const gchar* _tmp53_;
 
5845
                FolksPersonaStore* _tmp54_;
 
5846
                const gchar* _tmp55_;
 
5847
                const gchar* _tmp56_;
 
5848
                gint _tmp57_ = 0;
 
5849
                _tmp50_ = g_strcmp0;
 
5850
                _tmp51_ = store_a;
 
5851
                _tmp52_ = folks_persona_store_get_id (_tmp51_);
 
5852
                _tmp53_ = _tmp52_;
 
5853
                _tmp54_ = store_b;
 
5854
                _tmp55_ = folks_persona_store_get_id (_tmp54_);
 
5855
                _tmp56_ = _tmp55_;
 
5856
                _tmp57_ = _tmp50_ (_tmp53_, _tmp56_);
 
5857
                result = _tmp57_;
 
5858
                _g_object_unref0 (store_b);
 
5859
                _g_object_unref0 (store_a);
 
5860
                _g_object_unref0 (persona_b);
 
5861
                _g_object_unref0 (persona_a);
 
5862
                return result;
 
5863
        }
 
5864
        _tmp58_ = store_a;
 
5865
        _tmp59_ = folks_persona_store_get_type_id (_tmp58_);
 
5866
        _tmp60_ = _tmp59_;
 
5867
        if (g_strcmp0 (_tmp60_, "eds") == 0) {
 
5868
                result = -1;
 
5869
                _g_object_unref0 (store_b);
 
5870
                _g_object_unref0 (store_a);
 
5871
                _g_object_unref0 (persona_b);
 
5872
                _g_object_unref0 (persona_a);
 
5873
                return result;
 
5874
        }
 
5875
        _tmp61_ = store_b;
 
5876
        _tmp62_ = folks_persona_store_get_type_id (_tmp61_);
 
5877
        _tmp63_ = _tmp62_;
 
5878
        if (g_strcmp0 (_tmp63_, "eds") == 0) {
 
5879
                result = 1;
 
5880
                _g_object_unref0 (store_b);
 
5881
                _g_object_unref0 (store_a);
 
5882
                _g_object_unref0 (persona_b);
 
5883
                _g_object_unref0 (persona_a);
 
5884
                return result;
 
5885
        }
 
5886
        _tmp64_ = g_strcmp0;
 
5887
        _tmp65_ = store_a;
 
5888
        _tmp66_ = folks_persona_store_get_id (_tmp65_);
 
5889
        _tmp67_ = _tmp66_;
 
5890
        _tmp68_ = store_b;
 
5891
        _tmp69_ = folks_persona_store_get_id (_tmp68_);
 
5892
        _tmp70_ = _tmp69_;
 
5893
        _tmp71_ = _tmp64_ (_tmp67_, _tmp70_);
 
5894
        result = _tmp71_;
 
5895
        _g_object_unref0 (store_b);
 
5896
        _g_object_unref0 (store_a);
 
5897
        _g_object_unref0 (persona_b);
 
5898
        _g_object_unref0 (persona_a);
 
5899
        return result;
 
5900
}
 
5901
 
 
5902
 
 
5903
static gint ___lambda3__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
5805
5904
        gint result;
5806
 
        result = contacts_contact_compare_persona_by_store (a, b);
 
5905
        result = __lambda3_ (self, a, b);
5807
5906
        return result;
5808
5907
}
5809
5908
 
5810
5909
 
5811
5910
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self) {
5812
5911
        GeeList* result = NULL;
 
5912
        GCompareDataFunc compare_persona_by_store;
 
5913
        void* compare_persona_by_store_target;
 
5914
        GDestroyNotify compare_persona_by_store_target_destroy_notify;
5813
5915
        GeeArrayList* _tmp0_;
5814
5916
        GeeArrayList* persona_list;
5815
5917
        gint i;
5818
5920
        GeeSet* _tmp3_;
5819
5921
        GeeSet* _tmp4_;
5820
5922
        GeeArrayList* _tmp23_;
 
5923
        GCompareDataFunc _tmp24_;
 
5924
        void* _tmp24__target;
5821
5925
        g_return_val_if_fail (self != NULL, NULL);
5822
 
        _tmp0_ = gee_array_list_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
 
5926
        compare_persona_by_store = ___lambda3__gcompare_data_func;
 
5927
        compare_persona_by_store_target = g_object_ref (self);
 
5928
        compare_persona_by_store_target_destroy_notify = g_object_unref;
 
5929
        _tmp0_ = gee_array_list_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
5823
5930
        persona_list = _tmp0_;
5824
5931
        i = 0;
5825
5932
        _tmp1_ = persona_list;
5826
5933
        _tmp2_ = self->individual;
5827
5934
        _tmp3_ = folks_individual_get_personas (_tmp2_);
5828
5935
        _tmp4_ = _tmp3_;
5829
 
        gee_abstract_collection_add_all ((GeeAbstractCollection*) _tmp1_, (GeeCollection*) _tmp4_);
 
5936
        gee_array_list_add_all (_tmp1_, (GeeCollection*) _tmp4_);
5830
5937
        while (TRUE) {
5831
5938
                gint _tmp5_;
5832
5939
                GeeArrayList* _tmp6_;
5875
5982
                }
5876
5983
        }
5877
5984
        _tmp23_ = persona_list;
5878
 
        gee_list_sort ((GeeList*) _tmp23_, _contacts_contact_compare_persona_by_store_gcompare_func);
 
5985
        _tmp24_ = compare_persona_by_store;
 
5986
        _tmp24__target = compare_persona_by_store_target;
 
5987
        gee_list_sort ((GeeList*) _tmp23_, _tmp24_, _tmp24__target, NULL);
5879
5988
        result = (GeeList*) persona_list;
 
5989
        (compare_persona_by_store_target_destroy_notify == NULL) ? NULL : (compare_persona_by_store_target_destroy_notify (compare_persona_by_store_target), NULL);
 
5990
        compare_persona_by_store = NULL;
 
5991
        compare_persona_by_store_target = NULL;
 
5992
        compare_persona_by_store_target_destroy_notify = NULL;
5880
5993
        return result;
5881
5994
}
5882
5995
 
5982
6095
}
5983
6096
 
5984
6097
 
5985
 
static void _vala_array_add9 (FolksPersonaStore*** array, int* length, int* size, FolksPersonaStore* value) {
5986
 
        if ((*length) == (*size)) {
5987
 
                *size = (*size) ? (2 * (*size)) : 4;
5988
 
                *array = g_renew (FolksPersonaStore*, *array, (*size) + 1);
5989
 
        }
5990
 
        (*array)[(*length)++] = value;
5991
 
        (*array)[*length] = NULL;
5992
 
}
5993
 
 
5994
 
 
5995
 
FolksPersonaStore** contacts_contact_get_eds_address_books (int* result_length1) {
5996
 
        FolksPersonaStore** result = NULL;
5997
 
        FolksPersonaStore** _tmp0_ = NULL;
5998
 
        FolksPersonaStore** stores;
5999
 
        gint stores_length1;
6000
 
        gint _stores_size_;
6001
 
        FolksPersonaStore** _tmp34_;
6002
 
        gint _tmp34__length1;
6003
 
        _tmp0_ = g_new0 (FolksPersonaStore*, 0 + 1);
6004
 
        stores = _tmp0_;
6005
 
        stores_length1 = 0;
6006
 
        _stores_size_ = stores_length1;
6007
 
        {
6008
 
                ContactsApp* _tmp1_;
6009
 
                ContactsStore* _tmp2_;
6010
 
                FolksBackendStore* _tmp3_;
6011
 
                FolksBackendStore* _tmp4_;
6012
 
                GeeMap* _tmp5_;
6013
 
                GeeMap* _tmp6_;
6014
 
                GeeCollection* _tmp7_;
6015
 
                GeeCollection* _tmp8_;
6016
 
                GeeCollection* _tmp9_;
6017
 
                GeeIterator* _tmp10_ = NULL;
6018
 
                GeeIterator* _tmp11_;
6019
 
                GeeIterator* _backend_it;
6020
 
                _tmp1_ = contacts_app_app;
6021
 
                _tmp2_ = _tmp1_->contacts_store;
6022
 
                _tmp3_ = contacts_store_get_backend_store (_tmp2_);
6023
 
                _tmp4_ = _tmp3_;
6024
 
                _tmp5_ = folks_backend_store_get_enabled_backends (_tmp4_);
6025
 
                _tmp6_ = _tmp5_;
6026
 
                _tmp7_ = gee_map_get_values (_tmp6_);
6027
 
                _tmp8_ = _tmp7_;
6028
 
                _tmp9_ = _tmp8_;
6029
 
                _tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
6030
 
                _tmp11_ = _tmp10_;
6031
 
                _g_object_unref0 (_tmp9_);
6032
 
                _backend_it = _tmp11_;
6033
 
                while (TRUE) {
6034
 
                        GeeIterator* _tmp12_;
6035
 
                        gboolean _tmp13_ = FALSE;
6036
 
                        GeeIterator* _tmp14_;
6037
 
                        gpointer _tmp15_ = NULL;
6038
 
                        FolksBackend* backend;
6039
 
                        _tmp12_ = _backend_it;
6040
 
                        _tmp13_ = gee_iterator_next (_tmp12_);
6041
 
                        if (!_tmp13_) {
6042
 
                                break;
6043
 
                        }
6044
 
                        _tmp14_ = _backend_it;
6045
 
                        _tmp15_ = gee_iterator_get (_tmp14_);
6046
 
                        backend = (FolksBackend*) _tmp15_;
6047
 
                        {
6048
 
                                FolksBackend* _tmp16_;
6049
 
                                GeeMap* _tmp17_;
6050
 
                                GeeMap* _tmp18_;
6051
 
                                GeeCollection* _tmp19_;
6052
 
                                GeeCollection* _tmp20_;
6053
 
                                GeeCollection* _tmp21_;
6054
 
                                GeeIterator* _tmp22_ = NULL;
6055
 
                                GeeIterator* _tmp23_;
6056
 
                                GeeIterator* _persona_store_it;
6057
 
                                _tmp16_ = backend;
6058
 
                                _tmp17_ = folks_backend_get_persona_stores (_tmp16_);
6059
 
                                _tmp18_ = _tmp17_;
6060
 
                                _tmp19_ = gee_map_get_values (_tmp18_);
6061
 
                                _tmp20_ = _tmp19_;
6062
 
                                _tmp21_ = _tmp20_;
6063
 
                                _tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_);
6064
 
                                _tmp23_ = _tmp22_;
6065
 
                                _g_object_unref0 (_tmp21_);
6066
 
                                _persona_store_it = _tmp23_;
6067
 
                                while (TRUE) {
6068
 
                                        GeeIterator* _tmp24_;
6069
 
                                        gboolean _tmp25_ = FALSE;
6070
 
                                        GeeIterator* _tmp26_;
6071
 
                                        gpointer _tmp27_ = NULL;
6072
 
                                        FolksPersonaStore* persona_store;
6073
 
                                        FolksPersonaStore* _tmp28_;
6074
 
                                        const gchar* _tmp29_;
6075
 
                                        const gchar* _tmp30_;
6076
 
                                        _tmp24_ = _persona_store_it;
6077
 
                                        _tmp25_ = gee_iterator_next (_tmp24_);
6078
 
                                        if (!_tmp25_) {
6079
 
                                                break;
6080
 
                                        }
6081
 
                                        _tmp26_ = _persona_store_it;
6082
 
                                        _tmp27_ = gee_iterator_get (_tmp26_);
6083
 
                                        persona_store = (FolksPersonaStore*) _tmp27_;
6084
 
                                        _tmp28_ = persona_store;
6085
 
                                        _tmp29_ = folks_persona_store_get_type_id (_tmp28_);
6086
 
                                        _tmp30_ = _tmp29_;
6087
 
                                        if (g_strcmp0 (_tmp30_, "eds") == 0) {
6088
 
                                                FolksPersonaStore** _tmp31_;
6089
 
                                                gint _tmp31__length1;
6090
 
                                                FolksPersonaStore* _tmp32_;
6091
 
                                                FolksPersonaStore* _tmp33_;
6092
 
                                                _tmp31_ = stores;
6093
 
                                                _tmp31__length1 = stores_length1;
6094
 
                                                _tmp32_ = persona_store;
6095
 
                                                _tmp33_ = _g_object_ref0 (_tmp32_);
6096
 
                                                _vala_array_add9 (&stores, &stores_length1, &_stores_size_, _tmp33_);
6097
 
                                        }
6098
 
                                        _g_object_unref0 (persona_store);
6099
 
                                }
6100
 
                                _g_object_unref0 (_persona_store_it);
6101
 
                        }
6102
 
                        _g_object_unref0 (backend);
6103
 
                }
6104
 
                _g_object_unref0 (_backend_it);
6105
 
        }
6106
 
        _tmp34_ = stores;
6107
 
        _tmp34__length1 = stores_length1;
6108
 
        if (result_length1) {
6109
 
                *result_length1 = _tmp34__length1;
6110
 
        }
6111
 
        result = _tmp34_;
6112
 
        return result;
6113
 
}
6114
 
 
6115
 
 
6116
6098
gchar* contacts_contact_format_persona_store_name (FolksPersonaStore* store) {
6117
6099
        gchar* result = NULL;
6118
6100
        FolksPersonaStore* _tmp0_;
6165
6147
                const gchar* _tmp19_;
6166
6148
                gchar* _tmp20_ = NULL;
6167
6149
                _tmp13_ = store;
6168
 
                _tmp14_ = tpf_persona_store_get_account (TPF_IS_PERSONA_STORE (_tmp13_) ? ((TpfPersonaStore*) _tmp13_) : NULL);
 
6150
                _tmp14_ = tpf_persona_store_get_account (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TPF_TYPE_PERSONA_STORE) ? ((TpfPersonaStore*) _tmp13_) : NULL);
6169
6151
                _tmp15_ = _tmp14_;
6170
6152
                _tmp16_ = _g_object_ref0 (_tmp15_);
6171
6153
                account = _tmp16_;
6314
6296
        gboolean _tmp0_ = FALSE;
6315
6297
        gboolean _tmp1_ = FALSE;
6316
6298
        gboolean _tmp4_;
6317
 
        ContactsApp* _tmp5_;
6318
 
        ContactsStore* _tmp6_;
6319
 
        ContactsContact* _tmp7_;
 
6299
        ContactsStore* _tmp5_;
 
6300
        ContactsContact* _tmp6_;
 
6301
        gboolean _tmp7_ = FALSE;
6320
6302
        gboolean _tmp8_ = FALSE;
6321
 
        gboolean _tmp9_ = FALSE;
6322
 
        gboolean _tmp10_;
6323
 
        gboolean _tmp13_;
 
6303
        gboolean _tmp9_;
 
6304
        gboolean _tmp12_;
6324
6305
        g_return_val_if_fail (self != NULL, FALSE);
6325
6306
        g_return_val_if_fail (other != NULL, FALSE);
6326
6307
        _tmp1_ = contacts_contact_non_linkable (self);
6338
6319
                result = FALSE;
6339
6320
                return result;
6340
6321
        }
6341
 
        _tmp5_ = contacts_app_app;
6342
 
        _tmp6_ = _tmp5_->contacts_store;
6343
 
        _tmp7_ = other;
6344
 
        _tmp8_ = contacts_store_may_suggest_link (_tmp6_, self, _tmp7_);
6345
 
        if (!_tmp8_) {
 
6322
        _tmp5_ = self->store;
 
6323
        _tmp6_ = other;
 
6324
        _tmp7_ = contacts_store_may_suggest_link (_tmp5_, self, _tmp6_);
 
6325
        if (!_tmp7_) {
6346
6326
                result = FALSE;
6347
6327
                return result;
6348
6328
        }
6349
 
        _tmp10_ = self->is_main;
6350
 
        if (!_tmp10_) {
6351
 
                _tmp9_ = TRUE;
 
6329
        _tmp9_ = self->is_main;
 
6330
        if (!_tmp9_) {
 
6331
                _tmp8_ = TRUE;
6352
6332
        } else {
6353
 
                ContactsContact* _tmp11_;
6354
 
                gboolean _tmp12_ = FALSE;
6355
 
                _tmp11_ = other;
6356
 
                _tmp12_ = contacts_contact_has_mainable_persona (_tmp11_);
6357
 
                _tmp9_ = !_tmp12_;
 
6333
                ContactsContact* _tmp10_;
 
6334
                gboolean _tmp11_ = FALSE;
 
6335
                _tmp10_ = other;
 
6336
                _tmp11_ = contacts_contact_has_mainable_persona (_tmp10_);
 
6337
                _tmp8_ = !_tmp11_;
6358
6338
        }
6359
 
        _tmp13_ = _tmp9_;
6360
 
        result = _tmp13_;
 
6339
        _tmp12_ = _tmp8_;
 
6340
        result = _tmp12_;
6361
6341
        return result;
6362
6342
}
6363
6343
 
6408
6388
}
6409
6389
 
6410
6390
 
 
6391
/**
 
6392
   * Return true only for personas which are in a Google address book, but which
 
6393
   * are not in the user's "My Contacts" group in the address book.
 
6394
   */
6411
6395
gboolean contacts_contact_persona_is_google_other (FolksPersona* persona) {
6412
6396
        gboolean result = FALSE;
6413
6397
        FolksPersona* _tmp0_;
6414
6398
        gboolean _tmp1_ = FALSE;
6415
6399
        FolksPersona* _tmp2_;
6416
 
        FolksGroupDetails* _tmp3_;
6417
 
        FolksGroupDetails* g;
6418
 
        gboolean _tmp4_ = FALSE;
6419
 
        FolksGroupDetails* _tmp5_;
6420
 
        gboolean _tmp11_;
 
6400
        EdsfPersona* _tmp3_;
 
6401
        EdsfPersona* p;
 
6402
        EdsfPersona* _tmp4_;
6421
6403
        g_return_val_if_fail (persona != NULL, FALSE);
6422
6404
        _tmp0_ = persona;
6423
6405
        _tmp1_ = contacts_contact_persona_is_google (_tmp0_);
6426
6408
                return result;
6427
6409
        }
6428
6410
        _tmp2_ = persona;
6429
 
        _tmp3_ = _g_object_ref0 (FOLKS_IS_GROUP_DETAILS (_tmp2_) ? ((FolksGroupDetails*) _tmp2_) : NULL);
6430
 
        g = _tmp3_;
6431
 
        _tmp5_ = g;
6432
 
        if (_tmp5_ != NULL) {
6433
 
                FolksGroupDetails* _tmp6_;
6434
 
                GeeSet* _tmp7_;
6435
 
                GeeSet* _tmp8_;
6436
 
                const gchar* _tmp9_ = NULL;
6437
 
                gboolean _tmp10_ = FALSE;
6438
 
                _tmp6_ = g;
6439
 
                _tmp7_ = folks_group_details_get_groups (_tmp6_);
6440
 
                _tmp8_ = _tmp7_;
6441
 
                _tmp9_ = eds_personal_google_group_name ();
6442
 
                _tmp10_ = gee_collection_contains ((GeeCollection*) _tmp8_, _tmp9_);
6443
 
                _tmp4_ = !_tmp10_;
6444
 
        } else {
6445
 
                _tmp4_ = FALSE;
6446
 
        }
6447
 
        _tmp11_ = _tmp4_;
6448
 
        if (_tmp11_) {
6449
 
                result = TRUE;
6450
 
                _g_object_unref0 (g);
 
6411
        _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EDSF_TYPE_PERSONA) ? ((EdsfPersona*) _tmp2_) : NULL);
 
6412
        p = _tmp3_;
 
6413
        _tmp4_ = p;
 
6414
        if (_tmp4_ != NULL) {
 
6415
                EdsfPersona* _tmp5_;
 
6416
                gboolean _tmp6_;
 
6417
                gboolean _tmp7_;
 
6418
                _tmp5_ = p;
 
6419
                _tmp6_ = edsf_persona_get_in_google_personal_group (_tmp5_);
 
6420
                _tmp7_ = _tmp6_;
 
6421
                result = !_tmp7_;
 
6422
                _g_object_unref0 (p);
6451
6423
                return result;
6452
6424
        }
6453
6425
        result = FALSE;
6454
 
        _g_object_unref0 (g);
 
6426
        _g_object_unref0 (p);
6455
6427
        return result;
6456
6428
}
6457
6429
 
6474
6446
                return result;
6475
6447
        }
6476
6448
        _tmp2_ = persona;
6477
 
        _tmp3_ = _g_object_ref0 (FOLKS_IS_URL_DETAILS (_tmp2_) ? ((FolksUrlDetails*) _tmp2_) : NULL);
 
6449
        _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _tmp2_) : NULL);
6478
6450
        u = _tmp3_;
6479
6451
        _tmp5_ = u;
6480
6452
        if (_tmp5_ != NULL) {
6635
6607
                const gchar* _tmp31_;
6636
6608
                gchar* _tmp32_ = NULL;
6637
6609
                _tmp25_ = store;
6638
 
                _tmp26_ = tpf_persona_store_get_account (TPF_IS_PERSONA_STORE (_tmp25_) ? ((TpfPersonaStore*) _tmp25_) : NULL);
 
6610
                _tmp26_ = tpf_persona_store_get_account (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, TPF_TYPE_PERSONA_STORE) ? ((TpfPersonaStore*) _tmp25_) : NULL);
6639
6611
                _tmp27_ = _tmp26_;
6640
6612
                _tmp28_ = _g_object_ref0 (_tmp27_);
6641
6613
                account = _tmp28_;
6658
6630
}
6659
6631
 
6660
6632
 
6661
 
static gint g_ptr_array_get_length (GPtrArray* self) {
 
6633
static gint __lambda16_ (const gchar* a, const gchar* b) {
 
6634
        gint result = 0;
 
6635
        GeeHashMap* _tmp0_;
 
6636
        GeeHashMap* sorted_map;
 
6637
        gint i;
 
6638
        gchar** _tmp1_;
 
6639
        gint _tmp1__length1;
 
6640
        const gchar* _tmp7_;
 
6641
        gchar* _tmp8_;
 
6642
        gchar* a_str;
 
6643
        const gchar* _tmp9_;
 
6644
        gchar* _tmp10_;
 
6645
        gchar* b_str;
 
6646
        gboolean _tmp11_ = FALSE;
 
6647
        GeeHashMap* _tmp12_;
 
6648
        const gchar* _tmp13_;
 
6649
        gboolean _tmp14_ = FALSE;
 
6650
        gboolean _tmp18_;
 
6651
        g_return_val_if_fail (a != NULL, 0);
 
6652
        g_return_val_if_fail (b != NULL, 0);
 
6653
        _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
6654
        sorted_map = _tmp0_;
 
6655
        i = 0;
 
6656
        _tmp1_ = contacts_contact_sorted_properties;
 
6657
        _tmp1__length1 = contacts_contact_sorted_properties_length1;
 
6658
        {
 
6659
                gchar** p_collection = NULL;
 
6660
                gint p_collection_length1 = 0;
 
6661
                gint _p_collection_size_ = 0;
 
6662
                gint p_it = 0;
 
6663
                p_collection = _tmp1_;
 
6664
                p_collection_length1 = _tmp1__length1;
 
6665
                for (p_it = 0; p_it < _tmp1__length1; p_it = p_it + 1) {
 
6666
                        gchar* _tmp2_;
 
6667
                        gchar* p = NULL;
 
6668
                        _tmp2_ = g_strdup (p_collection[p_it]);
 
6669
                        p = _tmp2_;
 
6670
                        {
 
6671
                                GeeHashMap* _tmp3_;
 
6672
                                const gchar* _tmp4_;
 
6673
                                gint _tmp5_;
 
6674
                                gint _tmp6_;
 
6675
                                _tmp3_ = sorted_map;
 
6676
                                _tmp4_ = p;
 
6677
                                _tmp5_ = i;
 
6678
                                i = _tmp5_ + 1;
 
6679
                                _tmp6_ = i;
 
6680
                                gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp4_, _tmp6_);
 
6681
                                _g_free0 (p);
 
6682
                        }
 
6683
                }
 
6684
        }
 
6685
        _tmp7_ = a;
 
6686
        _tmp8_ = g_strdup ((const gchar*) _tmp7_);
 
6687
        a_str = _tmp8_;
 
6688
        _tmp9_ = b;
 
6689
        _tmp10_ = g_strdup ((const gchar*) _tmp9_);
 
6690
        b_str = _tmp10_;
 
6691
        _tmp12_ = sorted_map;
 
6692
        _tmp13_ = a_str;
 
6693
        _tmp14_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp12_, _tmp13_);
 
6694
        if (_tmp14_) {
 
6695
                GeeHashMap* _tmp15_;
 
6696
                const gchar* _tmp16_;
 
6697
                gboolean _tmp17_ = FALSE;
 
6698
                _tmp15_ = sorted_map;
 
6699
                _tmp16_ = b_str;
 
6700
                _tmp17_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp15_, _tmp16_);
 
6701
                _tmp11_ = _tmp17_;
 
6702
        } else {
 
6703
                _tmp11_ = FALSE;
 
6704
        }
 
6705
        _tmp18_ = _tmp11_;
 
6706
        if (_tmp18_) {
 
6707
                GeeHashMap* _tmp19_;
 
6708
                const gchar* _tmp20_;
 
6709
                gpointer _tmp21_ = NULL;
 
6710
                GeeHashMap* _tmp22_;
 
6711
                const gchar* _tmp23_;
 
6712
                gpointer _tmp24_ = NULL;
 
6713
                GeeHashMap* _tmp25_;
 
6714
                const gchar* _tmp26_;
 
6715
                gpointer _tmp27_ = NULL;
 
6716
                GeeHashMap* _tmp28_;
 
6717
                const gchar* _tmp29_;
 
6718
                gpointer _tmp30_ = NULL;
 
6719
                _tmp19_ = sorted_map;
 
6720
                _tmp20_ = a_str;
 
6721
                _tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp20_);
 
6722
                _tmp22_ = sorted_map;
 
6723
                _tmp23_ = b_str;
 
6724
                _tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
 
6725
                if (((gint) ((gintptr) _tmp21_)) < ((gint) ((gintptr) _tmp24_))) {
 
6726
                        result = -1;
 
6727
                        _g_free0 (b_str);
 
6728
                        _g_free0 (a_str);
 
6729
                        _g_object_unref0 (sorted_map);
 
6730
                        return result;
 
6731
                }
 
6732
                _tmp25_ = sorted_map;
 
6733
                _tmp26_ = a_str;
 
6734
                _tmp27_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp25_, _tmp26_);
 
6735
                _tmp28_ = sorted_map;
 
6736
                _tmp29_ = b_str;
 
6737
                _tmp30_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp28_, _tmp29_);
 
6738
                if (((gint) ((gintptr) _tmp27_)) > ((gint) ((gintptr) _tmp30_))) {
 
6739
                        result = 1;
 
6740
                        _g_free0 (b_str);
 
6741
                        _g_free0 (a_str);
 
6742
                        _g_object_unref0 (sorted_map);
 
6743
                        return result;
 
6744
                }
 
6745
                result = 0;
 
6746
                _g_free0 (b_str);
 
6747
                _g_free0 (a_str);
 
6748
                _g_object_unref0 (sorted_map);
 
6749
                return result;
 
6750
        } else {
 
6751
                GeeHashMap* _tmp31_;
 
6752
                const gchar* _tmp32_;
 
6753
                gboolean _tmp33_ = FALSE;
 
6754
                _tmp31_ = sorted_map;
 
6755
                _tmp32_ = a_str;
 
6756
                _tmp33_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp31_, _tmp32_);
 
6757
                if (_tmp33_) {
 
6758
                        result = -1;
 
6759
                        _g_free0 (b_str);
 
6760
                        _g_free0 (a_str);
 
6761
                        _g_object_unref0 (sorted_map);
 
6762
                        return result;
 
6763
                } else {
 
6764
                        GeeHashMap* _tmp34_;
 
6765
                        const gchar* _tmp35_;
 
6766
                        gboolean _tmp36_ = FALSE;
 
6767
                        _tmp34_ = sorted_map;
 
6768
                        _tmp35_ = b_str;
 
6769
                        _tmp36_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp34_, _tmp35_);
 
6770
                        if (_tmp36_) {
 
6771
                                result = 1;
 
6772
                                _g_free0 (b_str);
 
6773
                                _g_free0 (a_str);
 
6774
                                _g_object_unref0 (sorted_map);
 
6775
                                return result;
 
6776
                        } else {
 
6777
                                const gchar* _tmp37_;
 
6778
                                const gchar* _tmp38_;
 
6779
                                const gchar* _tmp39_;
 
6780
                                const gchar* _tmp40_;
 
6781
                                _tmp37_ = a_str;
 
6782
                                _tmp38_ = b_str;
 
6783
                                if (g_strcmp0 (_tmp37_, _tmp38_) < 0) {
 
6784
                                        result = -1;
 
6785
                                        _g_free0 (b_str);
 
6786
                                        _g_free0 (a_str);
 
6787
                                        _g_object_unref0 (sorted_map);
 
6788
                                        return result;
 
6789
                                }
 
6790
                                _tmp39_ = a_str;
 
6791
                                _tmp40_ = b_str;
 
6792
                                if (g_strcmp0 (_tmp39_, _tmp40_) > 0) {
 
6793
                                        result = 1;
 
6794
                                        _g_free0 (b_str);
 
6795
                                        _g_free0 (a_str);
 
6796
                                        _g_object_unref0 (sorted_map);
 
6797
                                        return result;
 
6798
                                }
 
6799
                                result = 0;
 
6800
                                _g_free0 (b_str);
 
6801
                                _g_free0 (a_str);
 
6802
                                _g_object_unref0 (sorted_map);
 
6803
                                return result;
 
6804
                        }
 
6805
                }
 
6806
        }
 
6807
        _g_free0 (b_str);
 
6808
        _g_free0 (a_str);
 
6809
        _g_object_unref0 (sorted_map);
 
6810
}
 
6811
 
 
6812
 
 
6813
static gint ___lambda16__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
6662
6814
        gint result;
6663
 
        guint _tmp0_;
6664
 
        g_return_val_if_fail (self != NULL, 0);
6665
 
        _tmp0_ = self->len;
6666
 
        result = (gint) _tmp0_;
6667
 
        return result;
6668
 
}
6669
 
 
6670
 
 
6671
 
static void g_ptr_array_set_length (GPtrArray* self, gint value) {
6672
 
        gint _tmp0_;
6673
 
        g_return_if_fail (self != NULL);
6674
 
        _tmp0_ = value;
6675
 
        g_ptr_array_set_size (self, _tmp0_);
 
6815
        result = __lambda16_ (a, b);
 
6816
        return result;
 
6817
}
 
6818
 
 
6819
 
 
6820
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1) {
 
6821
        gchar** result = NULL;
 
6822
        GCompareDataFunc compare_properties;
 
6823
        void* compare_properties_target;
 
6824
        GDestroyNotify compare_properties_target_destroy_notify;
 
6825
        GeeArrayList* _tmp0_;
 
6826
        GeeArrayList* sorted_props;
 
6827
        gchar** _tmp1_;
 
6828
        gint _tmp1__length1;
 
6829
        GeeArrayList* _tmp5_;
 
6830
        GCompareDataFunc _tmp6_;
 
6831
        void* _tmp6__target;
 
6832
        GeeArrayList* _tmp7_;
 
6833
        gint _tmp8_ = 0;
 
6834
        gpointer* _tmp9_ = NULL;
 
6835
        gchar** _tmp10_;
 
6836
        gint _tmp10__length1;
 
6837
        compare_properties = ___lambda16__gcompare_data_func;
 
6838
        compare_properties_target = NULL;
 
6839
        compare_properties_target_destroy_notify = NULL;
 
6840
        _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
 
6841
        sorted_props = _tmp0_;
 
6842
        _tmp1_ = props;
 
6843
        _tmp1__length1 = props_length1;
 
6844
        {
 
6845
                gchar** s_collection = NULL;
 
6846
                gint s_collection_length1 = 0;
 
6847
                gint _s_collection_size_ = 0;
 
6848
                gint s_it = 0;
 
6849
                s_collection = _tmp1_;
 
6850
                s_collection_length1 = _tmp1__length1;
 
6851
                for (s_it = 0; s_it < _tmp1__length1; s_it = s_it + 1) {
 
6852
                        gchar* _tmp2_;
 
6853
                        gchar* s = NULL;
 
6854
                        _tmp2_ = g_strdup (s_collection[s_it]);
 
6855
                        s = _tmp2_;
 
6856
                        {
 
6857
                                GeeArrayList* _tmp3_;
 
6858
                                const gchar* _tmp4_;
 
6859
                                _tmp3_ = sorted_props;
 
6860
                                _tmp4_ = s;
 
6861
                                gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _tmp4_);
 
6862
                                _g_free0 (s);
 
6863
                        }
 
6864
                }
 
6865
        }
 
6866
        _tmp5_ = sorted_props;
 
6867
        _tmp6_ = compare_properties;
 
6868
        _tmp6__target = compare_properties_target;
 
6869
        gee_list_sort ((GeeList*) _tmp5_, _tmp6_, _tmp6__target, NULL);
 
6870
        _tmp7_ = sorted_props;
 
6871
        _tmp9_ = gee_collection_to_array ((GeeCollection*) _tmp7_, &_tmp8_);
 
6872
        _tmp10_ = _tmp9_;
 
6873
        _tmp10__length1 = _tmp8_;
 
6874
        if (result_length1) {
 
6875
                *result_length1 = _tmp10__length1;
 
6876
        }
 
6877
        result = _tmp10_;
 
6878
        _g_object_unref0 (sorted_props);
 
6879
        (compare_properties_target_destroy_notify == NULL) ? NULL : (compare_properties_target_destroy_notify (compare_properties_target), NULL);
 
6880
        compare_properties = NULL;
 
6881
        compare_properties_target = NULL;
 
6882
        compare_properties_target_destroy_notify = NULL;
 
6883
        return result;
 
6884
}
 
6885
 
 
6886
 
 
6887
static void contacts_contact_set_individual_property_data_free (gpointer _data) {
 
6888
        ContactsContactSetIndividualPropertyData* _data_;
 
6889
        _data_ = _data;
 
6890
        _g_object_unref0 (_data_->contact);
 
6891
        _g_free0 (_data_->property_name);
 
6892
        G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
 
6893
        _g_object_unref0 (_data_->result);
 
6894
        g_slice_free (ContactsContactSetIndividualPropertyData, _data_);
 
6895
}
 
6896
 
 
6897
 
 
6898
void contacts_contact_set_individual_property (ContactsContact* contact, const gchar* property_name, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 
6899
        ContactsContactSetIndividualPropertyData* _data_;
 
6900
        ContactsContact* _tmp0_;
 
6901
        ContactsContact* _tmp1_;
 
6902
        const gchar* _tmp2_;
 
6903
        gchar* _tmp3_;
 
6904
        GValue _tmp4_;
 
6905
        GValue _tmp5_ = {0};
 
6906
        _data_ = g_slice_new0 (ContactsContactSetIndividualPropertyData);
 
6907
        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, contacts_contact_set_individual_property);
 
6908
        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, contacts_contact_set_individual_property_data_free);
 
6909
        _tmp0_ = contact;
 
6910
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
6911
        _g_object_unref0 (_data_->contact);
 
6912
        _data_->contact = _tmp1_;
 
6913
        _tmp2_ = property_name;
 
6914
        _tmp3_ = g_strdup (_tmp2_);
 
6915
        _g_free0 (_data_->property_name);
 
6916
        _data_->property_name = _tmp3_;
 
6917
        _tmp4_ = *value;
 
6918
        if (G_IS_VALUE (&_tmp4_)) {
 
6919
                g_value_init (&_tmp5_, G_VALUE_TYPE (&_tmp4_));
 
6920
                g_value_copy (&_tmp4_, &_tmp5_);
 
6921
        } else {
 
6922
                _tmp5_ = _tmp4_;
 
6923
        }
 
6924
        G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
 
6925
        _data_->value = _tmp5_;
 
6926
        contacts_contact_set_individual_property_co (_data_);
 
6927
}
 
6928
 
 
6929
 
 
6930
FolksPersona* contacts_contact_set_individual_property_finish (GAsyncResult* _res_, GError** error) {
 
6931
        FolksPersona* result;
 
6932
        ContactsContactSetIndividualPropertyData* _data_;
 
6933
        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
 
6934
                return NULL;
 
6935
        }
 
6936
        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 
6937
        result = _data_->result;
 
6938
        _data_->result = NULL;
 
6939
        return result;
 
6940
}
 
6941
 
 
6942
 
 
6943
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
 
6944
        int i;
 
6945
        for (i = 0; i < stack_length; i++) {
 
6946
                if (g_strcmp0 (stack[i], needle) == 0) {
 
6947
                        return TRUE;
 
6948
                }
 
6949
        }
 
6950
        return FALSE;
 
6951
}
 
6952
 
 
6953
 
 
6954
static void contacts_contact_set_individual_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
 
6955
        ContactsContactSetIndividualPropertyData* _data_;
 
6956
        _data_ = _user_data_;
 
6957
        _data_->_source_object_ = source_object;
 
6958
        _data_->_res_ = _res_;
 
6959
        contacts_contact_set_individual_property_co (_data_);
 
6960
}
 
6961
 
 
6962
 
 
6963
static gboolean contacts_contact_set_individual_property_co (ContactsContactSetIndividualPropertyData* _data_) {
 
6964
        switch (_data_->_state_) {
 
6965
                case 0:
 
6966
                goto _state_0;
 
6967
                case 1:
 
6968
                goto _state_1;
 
6969
                case 2:
 
6970
                goto _state_2;
 
6971
                default:
 
6972
                g_assert_not_reached ();
 
6973
        }
 
6974
        _state_0:
 
6975
        _data_->did_set = FALSE;
 
6976
        _data_->_tmp0_ = _data_->contact;
 
6977
        _data_->_tmp1_ = _data_->_tmp0_->individual;
 
6978
        _data_->_tmp2_ = folks_individual_get_personas (_data_->_tmp1_);
 
6979
        _data_->_tmp3_ = _data_->_tmp2_;
 
6980
        _data_->_tmp4_ = 0;
 
6981
        _data_->_tmp5_ = NULL;
 
6982
        _data_->_tmp5_ = gee_collection_to_array ((GeeCollection*) _data_->_tmp3_, &_data_->_tmp4_);
 
6983
        _data_->personas_copy = _data_->_tmp5_;
 
6984
        _data_->personas_copy_length1 = _data_->_tmp4_;
 
6985
        _data_->_personas_copy_size_ = _data_->personas_copy_length1;
 
6986
        _data_->_tmp6_ = _data_->personas_copy;
 
6987
        _data_->_tmp6__length1 = _data_->personas_copy_length1;
 
6988
        {
 
6989
                _data_->p_collection_length1 = 0;
 
6990
                _data_->_p_collection_size_ = 0;
 
6991
                _data_->p_collection = _data_->_tmp6_;
 
6992
                _data_->p_collection_length1 = _data_->_tmp6__length1;
 
6993
                for (_data_->p_it = 0; _data_->p_it < _data_->_tmp6__length1; _data_->p_it = _data_->p_it + 1) {
 
6994
                        _data_->_tmp7_ = _g_object_ref0 (_data_->p_collection[_data_->p_it]);
 
6995
                        _data_->p = _data_->_tmp7_;
 
6996
                        {
 
6997
                                _data_->_tmp8_ = _data_->property_name;
 
6998
                                _data_->_tmp9_ = _data_->p;
 
6999
                                _data_->_tmp10_ = folks_persona_get_writeable_properties (_data_->_tmp9_, &_data_->_tmp10__length1);
 
7000
                                _data_->_tmp11_ = _data_->_tmp10_;
 
7001
                                _data_->_tmp11__length1 = _data_->_tmp10__length1;
 
7002
                                if (_vala_string_array_contains (_data_->_tmp11_, _data_->_tmp11__length1, _data_->_tmp8_)) {
 
7003
                                        _data_->did_set = TRUE;
 
7004
                                        _data_->_tmp12_ = _data_->p;
 
7005
                                        _data_->_tmp13_ = _data_->property_name;
 
7006
                                        _data_->_tmp14_ = _data_->value;
 
7007
                                        _data_->_state_ = 1;
 
7008
                                        contacts_contact_set_persona_property (_data_->_tmp12_, _data_->_tmp13_, &_data_->_tmp14_, contacts_contact_set_individual_property_ready, _data_);
 
7009
                                        return FALSE;
 
7010
                                        _state_1:
 
7011
                                        contacts_contact_set_persona_property_finish (_data_->_res_, &_data_->_inner_error_);
 
7012
                                        if (_data_->_inner_error_ != NULL) {
 
7013
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
 
7014
                                                g_error_free (_data_->_inner_error_);
 
7015
                                                _g_object_unref0 (_data_->p);
 
7016
                                                _data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
 
7017
                                                if (_data_->_state_ == 0) {
 
7018
                                                        g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7019
                                                } else {
 
7020
                                                        g_simple_async_result_complete (_data_->_async_result);
 
7021
                                                }
 
7022
                                                g_object_unref (_data_->_async_result);
 
7023
                                                return FALSE;
 
7024
                                        }
 
7025
                                }
 
7026
                                _g_object_unref0 (_data_->p);
 
7027
                        }
 
7028
                }
 
7029
        }
 
7030
        _data_->_tmp15_ = _data_->did_set;
 
7031
        if (!_data_->_tmp15_) {
 
7032
                _data_->_tmp16_ = _data_->contact;
 
7033
                _data_->_tmp17_ = contacts_fake_persona_new (_data_->_tmp16_);
 
7034
                _data_->fake = _data_->_tmp17_;
 
7035
                _data_->_tmp18_ = _data_->fake;
 
7036
                _data_->_tmp19_ = _data_->property_name;
 
7037
                _data_->_tmp20_ = _data_->value;
 
7038
                _data_->_state_ = 2;
 
7039
                contacts_fake_persona_make_real_and_set (_data_->_tmp18_, _data_->_tmp19_, &_data_->_tmp20_, contacts_contact_set_individual_property_ready, _data_);
 
7040
                return FALSE;
 
7041
                _state_2:
 
7042
                _data_->_tmp21_ = NULL;
 
7043
                _data_->_tmp21_ = contacts_fake_persona_make_real_and_set_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
 
7044
                _data_->_tmp22_ = _data_->_tmp21_;
 
7045
                if (_data_->_inner_error_ != NULL) {
 
7046
                        g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
 
7047
                        g_error_free (_data_->_inner_error_);
 
7048
                        _g_object_unref0 (_data_->fake);
 
7049
                        _data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
 
7050
                        if (_data_->_state_ == 0) {
 
7051
                                g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7052
                        } else {
 
7053
                                g_simple_async_result_complete (_data_->_async_result);
 
7054
                        }
 
7055
                        g_object_unref (_data_->_async_result);
 
7056
                        return FALSE;
 
7057
                }
 
7058
                _data_->result = _data_->_tmp22_;
 
7059
                _g_object_unref0 (_data_->fake);
 
7060
                _data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
 
7061
                if (_data_->_state_ == 0) {
 
7062
                        g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7063
                } else {
 
7064
                        g_simple_async_result_complete (_data_->_async_result);
 
7065
                }
 
7066
                g_object_unref (_data_->_async_result);
 
7067
                return FALSE;
 
7068
        }
 
7069
        _data_->result = NULL;
 
7070
        _data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
 
7071
        if (_data_->_state_ == 0) {
 
7072
                g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7073
        } else {
 
7074
                g_simple_async_result_complete (_data_->_async_result);
 
7075
        }
 
7076
        g_object_unref (_data_->_async_result);
 
7077
        return FALSE;
 
7078
        _data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
 
7079
        if (_data_->_state_ == 0) {
 
7080
                g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7081
        } else {
 
7082
                g_simple_async_result_complete (_data_->_async_result);
 
7083
        }
 
7084
        g_object_unref (_data_->_async_result);
 
7085
        return FALSE;
6676
7086
}
6677
7087
 
6678
7088
 
6712
7122
                TpCapabilities* _tmp12_ = NULL;
6713
7123
                TpCapabilities* caps;
6714
7124
                TpCapabilities* _tmp13_;
6715
 
                GPtrArray* _tmp14_ = NULL;
6716
 
                GPtrArray* classes;
 
7125
                gboolean _tmp14_ = FALSE;
6717
7126
                _tmp9_ = t_persona;
6718
7127
                _tmp10_ = tpf_persona_get_contact (_tmp9_);
6719
7128
                _tmp11_ = _tmp10_;
6720
7129
                _tmp12_ = tp_contact_get_capabilities (_tmp11_);
6721
7130
                caps = _tmp12_;
6722
7131
                _tmp13_ = caps;
6723
 
                _tmp14_ = tp_capabilities_get_channel_classes (_tmp13_);
6724
 
                classes = (GPtrArray*) _tmp14_;
6725
 
                {
6726
 
                        gint i;
6727
 
                        i = 0;
6728
 
                        {
6729
 
                                gboolean _tmp15_;
6730
 
                                _tmp15_ = TRUE;
6731
 
                                while (TRUE) {
6732
 
                                        gboolean _tmp16_;
6733
 
                                        gint _tmp18_;
6734
 
                                        GPtrArray* _tmp19_;
6735
 
                                        gint _tmp20_;
6736
 
                                        gint _tmp21_;
6737
 
                                        GPtrArray* _tmp22_;
6738
 
                                        gint _tmp23_;
6739
 
                                        gconstpointer _tmp24_ = NULL;
6740
 
                                        GValueArray* clazz;
6741
 
                                        GValueArray* _tmp25_;
6742
 
                                        guint _tmp26_;
6743
 
                                        GValueArray* _tmp27_;
6744
 
                                        GValue* _tmp28_ = NULL;
6745
 
                                        GValue fixed_prop_val;
6746
 
                                        void* _tmp29_ = NULL;
6747
 
                                        GHashTable* fixed_prop;
6748
 
                                        GValueArray* _tmp30_;
6749
 
                                        GValue* _tmp31_ = NULL;
6750
 
                                        GValue allowed_prop_val;
6751
 
                                        void* _tmp32_ = NULL;
6752
 
                                        gchar** allowed_prop;
6753
 
                                        gint allowed_prop_length1;
6754
 
                                        gint _allowed_prop_size_;
6755
 
                                        gboolean _tmp33_ = FALSE;
6756
 
                                        GHashTable* _tmp34_;
6757
 
                                        gboolean _tmp36_;
6758
 
                                        GHashTable* _tmp37_;
6759
 
                                        gconstpointer _tmp38_ = NULL;
6760
 
                                        const gchar* _tmp39_ = NULL;
6761
 
                                        gchar* _tmp40_;
6762
 
                                        gchar* chan_type;
6763
 
                                        GHashTable* _tmp41_;
6764
 
                                        gconstpointer _tmp42_ = NULL;
6765
 
                                        guint _tmp43_ = 0U;
6766
 
                                        guint handle_type;
6767
 
                                        guint _tmp44_;
6768
 
                                        const gchar* _tmp45_;
6769
 
                                        _tmp16_ = _tmp15_;
6770
 
                                        if (!_tmp16_) {
6771
 
                                                gint _tmp17_;
6772
 
                                                _tmp17_ = i;
6773
 
                                                i = _tmp17_ + 1;
6774
 
                                        }
6775
 
                                        _tmp15_ = FALSE;
6776
 
                                        _tmp18_ = i;
6777
 
                                        _tmp19_ = classes;
6778
 
                                        _tmp20_ = g_ptr_array_get_length (_tmp19_);
6779
 
                                        _tmp21_ = _tmp20_;
6780
 
                                        if (!(_tmp18_ < _tmp21_)) {
6781
 
                                                break;
6782
 
                                        }
6783
 
                                        _tmp22_ = classes;
6784
 
                                        _tmp23_ = i;
6785
 
                                        _tmp24_ = g_ptr_array_index (_tmp22_, (guint) _tmp23_);
6786
 
                                        clazz = (GValueArray*) _tmp24_;
6787
 
                                        _tmp25_ = clazz;
6788
 
                                        _tmp26_ = _tmp25_->n_values;
6789
 
                                        if (_tmp26_ != ((guint) 2)) {
6790
 
                                                continue;
6791
 
                                        }
6792
 
                                        _tmp27_ = clazz;
6793
 
                                        _tmp28_ = g_value_array_get_nth (_tmp27_, (guint) 0);
6794
 
                                        fixed_prop_val = *_tmp28_;
6795
 
                                        _tmp29_ = g_value_get_boxed (&fixed_prop_val);
6796
 
                                        fixed_prop = (GHashTable*) _tmp29_;
6797
 
                                        _tmp30_ = clazz;
6798
 
                                        _tmp31_ = g_value_array_get_nth (_tmp30_, (guint) 1);
6799
 
                                        allowed_prop_val = *_tmp31_;
6800
 
                                        _tmp32_ = g_value_get_boxed (&allowed_prop_val);
6801
 
                                        allowed_prop = (gchar**) _tmp32_;
6802
 
                                        allowed_prop_length1 = -1;
6803
 
                                        _allowed_prop_size_ = allowed_prop_length1;
6804
 
                                        _tmp34_ = fixed_prop;
6805
 
                                        if (_tmp34_ == NULL) {
6806
 
                                                _tmp33_ = TRUE;
6807
 
                                        } else {
6808
 
                                                gchar** _tmp35_;
6809
 
                                                gint _tmp35__length1;
6810
 
                                                _tmp35_ = allowed_prop;
6811
 
                                                _tmp35__length1 = allowed_prop_length1;
6812
 
                                                _tmp33_ = _tmp35_ == NULL;
6813
 
                                        }
6814
 
                                        _tmp36_ = _tmp33_;
6815
 
                                        if (_tmp36_) {
6816
 
                                                continue;
6817
 
                                        }
6818
 
                                        _tmp37_ = fixed_prop;
6819
 
                                        _tmp38_ = g_hash_table_lookup (_tmp37_, TP_PROP_CHANNEL_CHANNEL_TYPE);
6820
 
                                        _tmp39_ = g_value_get_string ((GValue*) _tmp38_);
6821
 
                                        _tmp40_ = g_strdup (_tmp39_);
6822
 
                                        chan_type = _tmp40_;
6823
 
                                        _tmp41_ = fixed_prop;
6824
 
                                        _tmp42_ = g_hash_table_lookup (_tmp41_, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE);
6825
 
                                        _tmp43_ = g_value_get_uint ((GValue*) _tmp42_);
6826
 
                                        handle_type = _tmp43_;
6827
 
                                        _tmp44_ = handle_type;
6828
 
                                        if (_tmp44_ != ((guint) ((gint) TP_HANDLE_TYPE_CONTACT))) {
6829
 
                                                _g_free0 (chan_type);
6830
 
                                                continue;
6831
 
                                        }
6832
 
                                        _tmp45_ = chan_type;
6833
 
                                        if (g_strcmp0 (_tmp45_, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA) == 0) {
6834
 
                                                {
6835
 
                                                        guint j;
6836
 
                                                        j = (guint) 0;
6837
 
                                                        {
6838
 
                                                                gboolean _tmp46_;
6839
 
                                                                _tmp46_ = TRUE;
6840
 
                                                                while (TRUE) {
6841
 
                                                                        gboolean _tmp47_;
6842
 
                                                                        gchar** _tmp49_;
6843
 
                                                                        gint _tmp49__length1;
6844
 
                                                                        guint _tmp50_;
6845
 
                                                                        const gchar* _tmp51_;
6846
 
                                                                        gchar** _tmp52_;
6847
 
                                                                        gint _tmp52__length1;
6848
 
                                                                        guint _tmp53_;
6849
 
                                                                        const gchar* _tmp54_;
6850
 
                                                                        gchar* _tmp55_;
6851
 
                                                                        gchar* prop;
6852
 
                                                                        const gchar* _tmp56_;
6853
 
                                                                        _tmp47_ = _tmp46_;
6854
 
                                                                        if (!_tmp47_) {
6855
 
                                                                                guint _tmp48_;
6856
 
                                                                                _tmp48_ = j;
6857
 
                                                                                j = _tmp48_ + 1;
6858
 
                                                                        }
6859
 
                                                                        _tmp46_ = FALSE;
6860
 
                                                                        _tmp49_ = allowed_prop;
6861
 
                                                                        _tmp49__length1 = allowed_prop_length1;
6862
 
                                                                        _tmp50_ = j;
6863
 
                                                                        _tmp51_ = _tmp49_[_tmp50_];
6864
 
                                                                        if (!(_tmp51_ != NULL)) {
6865
 
                                                                                break;
6866
 
                                                                        }
6867
 
                                                                        _tmp52_ = allowed_prop;
6868
 
                                                                        _tmp52__length1 = allowed_prop_length1;
6869
 
                                                                        _tmp53_ = j;
6870
 
                                                                        _tmp54_ = _tmp52_[_tmp53_];
6871
 
                                                                        _tmp55_ = g_strdup (_tmp54_);
6872
 
                                                                        prop = _tmp55_;
6873
 
                                                                        _tmp56_ = prop;
6874
 
                                                                        if (g_strcmp0 (_tmp56_, TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO) == 0) {
6875
 
                                                                                TpfPersona* _tmp57_;
6876
 
                                                                                FolksPersonaStore* _tmp58_;
6877
 
                                                                                FolksPersonaStore* _tmp59_;
6878
 
                                                                                TpAccount* _tmp60_;
6879
 
                                                                                TpAccount* _tmp61_;
6880
 
                                                                                TpAccount* _tmp62_;
6881
 
                                                                                _tmp57_ = t_persona;
6882
 
                                                                                _tmp58_ = folks_persona_get_store ((FolksPersona*) _tmp57_);
6883
 
                                                                                _tmp59_ = _tmp58_;
6884
 
                                                                                _tmp60_ = tpf_persona_store_get_account (TPF_IS_PERSONA_STORE (_tmp59_) ? ((TpfPersonaStore*) _tmp59_) : NULL);
6885
 
                                                                                _tmp61_ = _tmp60_;
6886
 
                                                                                _tmp62_ = _g_object_ref0 (_tmp61_);
6887
 
                                                                                result = _tmp62_;
6888
 
                                                                                _g_free0 (prop);
6889
 
                                                                                _g_free0 (chan_type);
6890
 
                                                                                _g_object_unref0 (t_persona);
6891
 
                                                                                return result;
6892
 
                                                                        }
6893
 
                                                                        _g_free0 (prop);
6894
 
                                                                }
6895
 
                                                        }
6896
 
                                                }
6897
 
                                        }
6898
 
                                        _g_free0 (chan_type);
6899
 
                                }
6900
 
                        }
 
7132
                _tmp14_ = tp_capabilities_supports_audio_call (_tmp13_, TP_HANDLE_TYPE_CONTACT);
 
7133
                if (_tmp14_) {
 
7134
                        TpfPersona* _tmp15_;
 
7135
                        FolksPersonaStore* _tmp16_;
 
7136
                        FolksPersonaStore* _tmp17_;
 
7137
                        TpAccount* _tmp18_;
 
7138
                        TpAccount* _tmp19_;
 
7139
                        TpAccount* _tmp20_;
 
7140
                        _tmp15_ = t_persona;
 
7141
                        _tmp16_ = folks_persona_get_store ((FolksPersona*) _tmp15_);
 
7142
                        _tmp17_ = _tmp16_;
 
7143
                        _tmp18_ = tpf_persona_store_get_account (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, TPF_TYPE_PERSONA_STORE) ? ((TpfPersonaStore*) _tmp17_) : NULL);
 
7144
                        _tmp19_ = _tmp18_;
 
7145
                        _tmp20_ = _g_object_ref0 (_tmp19_);
 
7146
                        result = _tmp20_;
 
7147
                        _g_object_unref0 (t_persona);
 
7148
                        return result;
6901
7149
                }
6902
7150
        }
6903
7151
        result = NULL;
6909
7157
static void contacts_contact_create_primary_persona_for_details_data_free (gpointer _data) {
6910
7158
        ContactsContactCreatePrimaryPersonaForDetailsData* _data_;
6911
7159
        _data_ = _data;
 
7160
        _g_object_unref0 (_data_->store);
6912
7161
        _g_hash_table_unref0 (_data_->details);
6913
7162
        _g_object_unref0 (_data_->result);
6914
7163
        g_slice_free (ContactsContactCreatePrimaryPersonaForDetailsData, _data_);
6920
7169
}
6921
7170
 
6922
7171
 
6923
 
void contacts_contact_create_primary_persona_for_details (GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 
7172
void contacts_contact_create_primary_persona_for_details (FolksPersonaStore* store, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_) {
6924
7173
        ContactsContactCreatePrimaryPersonaForDetailsData* _data_;
6925
 
        GHashTable* _tmp0_;
6926
 
        GHashTable* _tmp1_;
 
7174
        FolksPersonaStore* _tmp0_;
 
7175
        FolksPersonaStore* _tmp1_;
 
7176
        GHashTable* _tmp2_;
 
7177
        GHashTable* _tmp3_;
6927
7178
        _data_ = g_slice_new0 (ContactsContactCreatePrimaryPersonaForDetailsData);
6928
7179
        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, contacts_contact_create_primary_persona_for_details);
6929
7180
        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, contacts_contact_create_primary_persona_for_details_data_free);
6930
 
        _tmp0_ = details;
6931
 
        _tmp1_ = _g_hash_table_ref0 (_tmp0_);
6932
 
        _data_->details = _tmp1_;
 
7181
        _tmp0_ = store;
 
7182
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
7183
        _g_object_unref0 (_data_->store);
 
7184
        _data_->store = _tmp1_;
 
7185
        _tmp2_ = details;
 
7186
        _tmp3_ = _g_hash_table_ref0 (_tmp2_);
 
7187
        _g_hash_table_unref0 (_data_->details);
 
7188
        _data_->details = _tmp3_;
6933
7189
        contacts_contact_create_primary_persona_for_details_co (_data_);
6934
7190
}
6935
7191
 
6962
7218
                goto _state_0;
6963
7219
                case 1:
6964
7220
                goto _state_1;
6965
 
                case 2:
6966
 
                goto _state_2;
6967
7221
                default:
6968
7222
                g_assert_not_reached ();
6969
7223
        }
6970
7224
        _state_0:
6971
 
        _data_->_tmp0_ = contacts_app_app;
6972
 
        _data_->_tmp1_ = _data_->_tmp0_->contacts_store;
6973
 
        _data_->_tmp2_ = contacts_store_get_aggregator (_data_->_tmp1_);
6974
 
        _data_->_tmp3_ = _data_->_tmp2_;
6975
 
        _data_->_tmp4_ = folks_individual_aggregator_get_primary_store (_data_->_tmp3_);
6976
 
        _data_->_tmp5_ = _data_->_tmp4_;
6977
 
        _data_->_tmp6_ = _g_object_ref0 (_data_->_tmp5_);
6978
 
        _data_->primary_store = _data_->_tmp6_;
6979
 
        _data_->_tmp7_ = _data_->primary_store;
6980
 
        _data_->_tmp8_ = _data_->details;
 
7225
        _data_->_tmp0_ = _data_->store;
 
7226
        _data_->_tmp1_ = _data_->details;
6981
7227
        _data_->_state_ = 1;
6982
 
        folks_persona_store_add_persona_from_details (_data_->_tmp7_, _data_->_tmp8_, contacts_contact_create_primary_persona_for_details_ready, _data_);
 
7228
        folks_persona_store_add_persona_from_details (_data_->_tmp0_, _data_->_tmp1_, contacts_contact_create_primary_persona_for_details_ready, _data_);
6983
7229
        return FALSE;
6984
7230
        _state_1:
6985
 
        _data_->_tmp9_ = NULL;
6986
 
        _data_->_tmp9_ = folks_persona_store_add_persona_from_details_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error_);
6987
 
        _data_->p = _data_->_tmp9_;
 
7231
        _data_->_tmp2_ = NULL;
 
7232
        _data_->_tmp2_ = folks_persona_store_add_persona_from_details_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
 
7233
        _data_->p = _data_->_tmp2_;
6988
7234
        if (_data_->_inner_error_ != NULL) {
6989
7235
                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
6990
7236
                g_error_free (_data_->_inner_error_);
6991
 
                _g_object_unref0 (_data_->primary_store);
6992
7237
                if (_data_->_state_ == 0) {
6993
7238
                        g_simple_async_result_complete_in_idle (_data_->_async_result);
6994
7239
                } else {
6997
7242
                g_object_unref (_data_->_async_result);
6998
7243
                return FALSE;
6999
7244
        }
7000
 
        _data_->_tmp11_ = _data_->p;
7001
 
        if (_data_->_tmp11_ != NULL) {
7002
 
                _data_->_tmp12_ = _data_->p;
7003
 
                _data_->_tmp13_ = FALSE;
7004
 
                _data_->_tmp13_ = contacts_contact_persona_is_google (_data_->_tmp12_);
7005
 
                _data_->_tmp10_ = _data_->_tmp13_;
7006
 
        } else {
7007
 
                _data_->_tmp10_ = FALSE;
7008
 
        }
7009
 
        _data_->_tmp14_ = _data_->_tmp10_;
7010
 
        if (_data_->_tmp14_) {
7011
 
                _data_->_tmp15_ = _data_->p;
7012
 
                _data_->_tmp16_ = _g_object_ref0 (FOLKS_IS_GROUP_DETAILS (_data_->_tmp15_) ? ((FolksGroupDetails*) _data_->_tmp15_) : NULL);
7013
 
                _data_->g = _data_->_tmp16_;
7014
 
                _data_->_tmp17_ = _data_->g;
7015
 
                _data_->_tmp18_ = NULL;
7016
 
                _data_->_tmp18_ = eds_personal_google_group_name ();
7017
 
                _data_->_state_ = 2;
7018
 
                folks_group_details_change_group (_data_->_tmp17_, _data_->_tmp18_, TRUE, contacts_contact_create_primary_persona_for_details_ready, _data_);
7019
 
                return FALSE;
7020
 
                _state_2:
7021
 
                folks_group_details_change_group_finish (_data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
7022
 
                if (_data_->_inner_error_ != NULL) {
7023
 
                        g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7024
 
                        g_error_free (_data_->_inner_error_);
7025
 
                        _g_object_unref0 (_data_->g);
7026
 
                        _g_object_unref0 (_data_->p);
7027
 
                        _g_object_unref0 (_data_->primary_store);
7028
 
                        if (_data_->_state_ == 0) {
7029
 
                                g_simple_async_result_complete_in_idle (_data_->_async_result);
7030
 
                        } else {
7031
 
                                g_simple_async_result_complete (_data_->_async_result);
7032
 
                        }
7033
 
                        g_object_unref (_data_->_async_result);
7034
 
                        return FALSE;
7035
 
                }
7036
 
                _g_object_unref0 (_data_->g);
7037
 
        }
7038
7245
        _data_->result = _data_->p;
7039
 
        _g_object_unref0 (_data_->primary_store);
7040
7246
        if (_data_->_state_ == 0) {
7041
7247
                g_simple_async_result_complete_in_idle (_data_->_async_result);
7042
7248
        } else {
7045
7251
        g_object_unref (_data_->_async_result);
7046
7252
        return FALSE;
7047
7253
        _g_object_unref0 (_data_->p);
7048
 
        _g_object_unref0 (_data_->primary_store);
7049
7254
        if (_data_->_state_ == 0) {
7050
7255
                g_simple_async_result_complete_in_idle (_data_->_async_result);
7051
7256
        } else {
7079
7284
        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, contacts_contact_set_persona_property_data_free);
7080
7285
        _tmp0_ = persona;
7081
7286
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
7287
        _g_object_unref0 (_data_->persona);
7082
7288
        _data_->persona = _tmp1_;
7083
7289
        _tmp2_ = property_name;
7084
7290
        _tmp3_ = g_strdup (_tmp2_);
 
7291
        _g_free0 (_data_->property_name);
7085
7292
        _data_->property_name = _tmp3_;
7086
7293
        _tmp4_ = *new_value;
7087
7294
        if (G_IS_VALUE (&_tmp4_)) {
7090
7297
        } else {
7091
7298
                _tmp5_ = _tmp4_;
7092
7299
        }
 
7300
        G_IS_VALUE (&_data_->new_value) ? (g_value_unset (&_data_->new_value), NULL) : NULL;
7093
7301
        _data_->new_value = _tmp5_;
7094
7302
        contacts_contact_set_persona_property_co (_data_);
7095
7303
}
7181
7389
        }
7182
7390
        _state_0:
7183
7391
        _data_->_tmp0_ = _data_->persona;
7184
 
        if (CONTACTS_IS_FAKE_PERSONA (_data_->_tmp0_)) {
 
7392
        if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp0_, CONTACTS_TYPE_FAKE_PERSONA)) {
7185
7393
                _data_->_tmp1_ = _data_->persona;
7186
 
                _data_->_tmp2_ = _g_object_ref0 (CONTACTS_IS_FAKE_PERSONA (_data_->_tmp1_) ? ((ContactsFakePersona*) _data_->_tmp1_) : NULL);
 
7394
                _data_->_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp1_, CONTACTS_TYPE_FAKE_PERSONA) ? ((ContactsFakePersona*) _data_->_tmp1_) : NULL);
7187
7395
                _data_->fake = _data_->_tmp2_;
7188
7396
                _data_->_tmp3_ = _data_->fake;
7189
7397
                _data_->_tmp4_ = _data_->property_name;
7216
7424
                        }
7217
7425
                }
7218
7426
                _g_object_unref0 (_data_->fake);
 
7427
                if (_data_->_state_ == 0) {
 
7428
                        g_simple_async_result_complete_in_idle (_data_->_async_result);
 
7429
                } else {
 
7430
                        g_simple_async_result_complete (_data_->_async_result);
 
7431
                }
 
7432
                g_object_unref (_data_->_async_result);
 
7433
                return FALSE;
7219
7434
        }
7220
7435
        _data_->_tmp8_ = _data_->property_name;
7221
7436
        _data_->_tmp11_ = 0U;
7228
7443
                                _data_->_tmp12_ = _data_->persona;
7229
7444
                                _data_->_tmp13_ = _data_->new_value;
7230
7445
                                _data_->_state_ = 2;
7231
 
                                folks_alias_details_change_alias (FOLKS_IS_ALIAS_DETAILS (_data_->_tmp12_) ? ((FolksAliasDetails*) _data_->_tmp12_) : NULL, g_value_get_string (&_data_->_tmp13_), contacts_contact_set_persona_property_ready, _data_);
 
7446
                                folks_alias_details_change_alias (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp12_, FOLKS_TYPE_ALIAS_DETAILS) ? ((FolksAliasDetails*) _data_->_tmp12_) : NULL, g_value_get_string (&_data_->_tmp13_), contacts_contact_set_persona_property_ready, _data_);
7232
7447
                                return FALSE;
7233
7448
                                _state_2:
7234
 
                                folks_alias_details_change_alias_finish (FOLKS_IS_ALIAS_DETAILS (_data_->_tmp12_) ? ((FolksAliasDetails*) _data_->_tmp12_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7449
                                folks_alias_details_change_alias_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp12_, FOLKS_TYPE_ALIAS_DETAILS) ? ((FolksAliasDetails*) _data_->_tmp12_) : NULL, _data_->_res_, &_data_->_inner_error_);
7235
7450
                                if (_data_->_inner_error_ != NULL) {
7236
7451
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7237
7452
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7259
7474
                                _data_->_tmp14_ = _data_->persona;
7260
7475
                                _data_->_tmp15_ = _data_->new_value;
7261
7476
                                _data_->_state_ = 3;
7262
 
                                folks_avatar_details_change_avatar (FOLKS_IS_AVATAR_DETAILS (_data_->_tmp14_) ? ((FolksAvatarDetails*) _data_->_tmp14_) : NULL, g_value_get_object (&_data_->_tmp15_), contacts_contact_set_persona_property_ready, _data_);
 
7477
                                folks_avatar_details_change_avatar (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp14_, FOLKS_TYPE_AVATAR_DETAILS) ? ((FolksAvatarDetails*) _data_->_tmp14_) : NULL, g_value_get_object (&_data_->_tmp15_), contacts_contact_set_persona_property_ready, _data_);
7263
7478
                                return FALSE;
7264
7479
                                _state_3:
7265
 
                                folks_avatar_details_change_avatar_finish (FOLKS_IS_AVATAR_DETAILS (_data_->_tmp14_) ? ((FolksAvatarDetails*) _data_->_tmp14_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7480
                                folks_avatar_details_change_avatar_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp14_, FOLKS_TYPE_AVATAR_DETAILS) ? ((FolksAvatarDetails*) _data_->_tmp14_) : NULL, _data_->_res_, &_data_->_inner_error_);
7266
7481
                                if (_data_->_inner_error_ != NULL) {
7267
7482
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7268
7483
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7290
7505
                                _data_->_tmp16_ = _data_->persona;
7291
7506
                                _data_->_tmp17_ = _data_->new_value;
7292
7507
                                _data_->_state_ = 4;
7293
 
                                folks_birthday_details_change_birthday (FOLKS_IS_BIRTHDAY_DETAILS (_data_->_tmp16_) ? ((FolksBirthdayDetails*) _data_->_tmp16_) : NULL, g_value_get_boxed (&_data_->_tmp17_), contacts_contact_set_persona_property_ready, _data_);
 
7508
                                folks_birthday_details_change_birthday (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp16_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _data_->_tmp16_) : NULL, g_value_get_boxed (&_data_->_tmp17_), contacts_contact_set_persona_property_ready, _data_);
7294
7509
                                return FALSE;
7295
7510
                                _state_4:
7296
 
                                folks_birthday_details_change_birthday_finish (FOLKS_IS_BIRTHDAY_DETAILS (_data_->_tmp16_) ? ((FolksBirthdayDetails*) _data_->_tmp16_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7511
                                folks_birthday_details_change_birthday_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp16_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _data_->_tmp16_) : NULL, _data_->_res_, &_data_->_inner_error_);
7297
7512
                                if (_data_->_inner_error_ != NULL) {
7298
7513
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7299
7514
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7321
7536
                                _data_->_tmp18_ = _data_->persona;
7322
7537
                                _data_->_tmp19_ = _data_->new_value;
7323
7538
                                _data_->_state_ = 5;
7324
 
                                folks_birthday_details_change_calendar_event_id (FOLKS_IS_BIRTHDAY_DETAILS (_data_->_tmp18_) ? ((FolksBirthdayDetails*) _data_->_tmp18_) : NULL, g_value_get_string (&_data_->_tmp19_), contacts_contact_set_persona_property_ready, _data_);
 
7539
                                folks_birthday_details_change_calendar_event_id (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp18_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _data_->_tmp18_) : NULL, g_value_get_string (&_data_->_tmp19_), contacts_contact_set_persona_property_ready, _data_);
7325
7540
                                return FALSE;
7326
7541
                                _state_5:
7327
 
                                folks_birthday_details_change_calendar_event_id_finish (FOLKS_IS_BIRTHDAY_DETAILS (_data_->_tmp18_) ? ((FolksBirthdayDetails*) _data_->_tmp18_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7542
                                folks_birthday_details_change_calendar_event_id_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp18_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _data_->_tmp18_) : NULL, _data_->_res_, &_data_->_inner_error_);
7328
7543
                                if (_data_->_inner_error_ != NULL) {
7329
7544
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7330
7545
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7352
7567
                                _data_->_tmp20_ = _data_->persona;
7353
7568
                                _data_->_tmp21_ = _data_->new_value;
7354
7569
                                _data_->_state_ = 6;
7355
 
                                folks_email_details_change_email_addresses (FOLKS_IS_EMAIL_DETAILS (_data_->_tmp20_) ? ((FolksEmailDetails*) _data_->_tmp20_) : NULL, g_value_get_object (&_data_->_tmp21_), contacts_contact_set_persona_property_ready, _data_);
 
7570
                                folks_email_details_change_email_addresses (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp20_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _data_->_tmp20_) : NULL, g_value_get_object (&_data_->_tmp21_), contacts_contact_set_persona_property_ready, _data_);
7356
7571
                                return FALSE;
7357
7572
                                _state_6:
7358
 
                                folks_email_details_change_email_addresses_finish (FOLKS_IS_EMAIL_DETAILS (_data_->_tmp20_) ? ((FolksEmailDetails*) _data_->_tmp20_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7573
                                folks_email_details_change_email_addresses_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp20_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _data_->_tmp20_) : NULL, _data_->_res_, &_data_->_inner_error_);
7359
7574
                                if (_data_->_inner_error_ != NULL) {
7360
7575
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7361
7576
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7383
7598
                                _data_->_tmp22_ = _data_->persona;
7384
7599
                                _data_->_tmp23_ = _data_->new_value;
7385
7600
                                _data_->_state_ = 7;
7386
 
                                folks_favourite_details_change_is_favourite (FOLKS_IS_FAVOURITE_DETAILS (_data_->_tmp22_) ? ((FolksFavouriteDetails*) _data_->_tmp22_) : NULL, g_value_get_boolean (&_data_->_tmp23_), contacts_contact_set_persona_property_ready, _data_);
 
7601
                                folks_favourite_details_change_is_favourite (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp22_, FOLKS_TYPE_FAVOURITE_DETAILS) ? ((FolksFavouriteDetails*) _data_->_tmp22_) : NULL, g_value_get_boolean (&_data_->_tmp23_), contacts_contact_set_persona_property_ready, _data_);
7387
7602
                                return FALSE;
7388
7603
                                _state_7:
7389
 
                                folks_favourite_details_change_is_favourite_finish (FOLKS_IS_FAVOURITE_DETAILS (_data_->_tmp22_) ? ((FolksFavouriteDetails*) _data_->_tmp22_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7604
                                folks_favourite_details_change_is_favourite_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp22_, FOLKS_TYPE_FAVOURITE_DETAILS) ? ((FolksFavouriteDetails*) _data_->_tmp22_) : NULL, _data_->_res_, &_data_->_inner_error_);
7390
7605
                                if (_data_->_inner_error_ != NULL) {
7391
7606
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7392
7607
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7414
7629
                                _data_->_tmp24_ = _data_->persona;
7415
7630
                                _data_->_tmp25_ = _data_->new_value;
7416
7631
                                _data_->_state_ = 8;
7417
 
                                folks_gender_details_change_gender (FOLKS_IS_GENDER_DETAILS (_data_->_tmp24_) ? ((FolksGenderDetails*) _data_->_tmp24_) : NULL, g_value_get_enum (&_data_->_tmp25_), contacts_contact_set_persona_property_ready, _data_);
 
7632
                                folks_gender_details_change_gender (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp24_, FOLKS_TYPE_GENDER_DETAILS) ? ((FolksGenderDetails*) _data_->_tmp24_) : NULL, g_value_get_enum (&_data_->_tmp25_), contacts_contact_set_persona_property_ready, _data_);
7418
7633
                                return FALSE;
7419
7634
                                _state_8:
7420
 
                                folks_gender_details_change_gender_finish (FOLKS_IS_GENDER_DETAILS (_data_->_tmp24_) ? ((FolksGenderDetails*) _data_->_tmp24_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7635
                                folks_gender_details_change_gender_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp24_, FOLKS_TYPE_GENDER_DETAILS) ? ((FolksGenderDetails*) _data_->_tmp24_) : NULL, _data_->_res_, &_data_->_inner_error_);
7421
7636
                                if (_data_->_inner_error_ != NULL) {
7422
7637
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7423
7638
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7445
7660
                                _data_->_tmp26_ = _data_->persona;
7446
7661
                                _data_->_tmp27_ = _data_->new_value;
7447
7662
                                _data_->_state_ = 9;
7448
 
                                folks_group_details_change_groups (FOLKS_IS_GROUP_DETAILS (_data_->_tmp26_) ? ((FolksGroupDetails*) _data_->_tmp26_) : NULL, g_value_get_object (&_data_->_tmp27_), contacts_contact_set_persona_property_ready, _data_);
 
7663
                                folks_group_details_change_groups (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp26_, FOLKS_TYPE_GROUP_DETAILS) ? ((FolksGroupDetails*) _data_->_tmp26_) : NULL, g_value_get_object (&_data_->_tmp27_), contacts_contact_set_persona_property_ready, _data_);
7449
7664
                                return FALSE;
7450
7665
                                _state_9:
7451
 
                                folks_group_details_change_groups_finish (FOLKS_IS_GROUP_DETAILS (_data_->_tmp26_) ? ((FolksGroupDetails*) _data_->_tmp26_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7666
                                folks_group_details_change_groups_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp26_, FOLKS_TYPE_GROUP_DETAILS) ? ((FolksGroupDetails*) _data_->_tmp26_) : NULL, _data_->_res_, &_data_->_inner_error_);
7452
7667
                                if (_data_->_inner_error_ != NULL) {
7453
7668
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7454
7669
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7476
7691
                                _data_->_tmp28_ = _data_->persona;
7477
7692
                                _data_->_tmp29_ = _data_->new_value;
7478
7693
                                _data_->_state_ = 10;
7479
 
                                folks_im_details_change_im_addresses (FOLKS_IS_IM_DETAILS (_data_->_tmp28_) ? ((FolksImDetails*) _data_->_tmp28_) : NULL, g_value_get_object (&_data_->_tmp29_), contacts_contact_set_persona_property_ready, _data_);
 
7694
                                folks_im_details_change_im_addresses (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp28_, FOLKS_TYPE_IM_DETAILS) ? ((FolksImDetails*) _data_->_tmp28_) : NULL, g_value_get_object (&_data_->_tmp29_), contacts_contact_set_persona_property_ready, _data_);
7480
7695
                                return FALSE;
7481
7696
                                _state_10:
7482
 
                                folks_im_details_change_im_addresses_finish (FOLKS_IS_IM_DETAILS (_data_->_tmp28_) ? ((FolksImDetails*) _data_->_tmp28_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7697
                                folks_im_details_change_im_addresses_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp28_, FOLKS_TYPE_IM_DETAILS) ? ((FolksImDetails*) _data_->_tmp28_) : NULL, _data_->_res_, &_data_->_inner_error_);
7483
7698
                                if (_data_->_inner_error_ != NULL) {
7484
7699
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7485
7700
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7507
7722
                                _data_->_tmp30_ = _data_->persona;
7508
7723
                                _data_->_tmp31_ = _data_->new_value;
7509
7724
                                _data_->_state_ = 11;
7510
 
                                folks_local_id_details_change_local_ids (FOLKS_IS_LOCAL_ID_DETAILS (_data_->_tmp30_) ? ((FolksLocalIdDetails*) _data_->_tmp30_) : NULL, g_value_get_object (&_data_->_tmp31_), contacts_contact_set_persona_property_ready, _data_);
 
7725
                                folks_local_id_details_change_local_ids (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp30_, FOLKS_TYPE_LOCAL_ID_DETAILS) ? ((FolksLocalIdDetails*) _data_->_tmp30_) : NULL, g_value_get_object (&_data_->_tmp31_), contacts_contact_set_persona_property_ready, _data_);
7511
7726
                                return FALSE;
7512
7727
                                _state_11:
7513
 
                                folks_local_id_details_change_local_ids_finish (FOLKS_IS_LOCAL_ID_DETAILS (_data_->_tmp30_) ? ((FolksLocalIdDetails*) _data_->_tmp30_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7728
                                folks_local_id_details_change_local_ids_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp30_, FOLKS_TYPE_LOCAL_ID_DETAILS) ? ((FolksLocalIdDetails*) _data_->_tmp30_) : NULL, _data_->_res_, &_data_->_inner_error_);
7514
7729
                                if (_data_->_inner_error_ != NULL) {
7515
7730
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7516
7731
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7538
7753
                                _data_->_tmp32_ = _data_->persona;
7539
7754
                                _data_->_tmp33_ = _data_->new_value;
7540
7755
                                _data_->_state_ = 12;
7541
 
                                folks_name_details_change_structured_name (FOLKS_IS_NAME_DETAILS (_data_->_tmp32_) ? ((FolksNameDetails*) _data_->_tmp32_) : NULL, g_value_get_object (&_data_->_tmp33_), contacts_contact_set_persona_property_ready, _data_);
 
7756
                                folks_name_details_change_structured_name (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp32_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp32_) : NULL, g_value_get_object (&_data_->_tmp33_), contacts_contact_set_persona_property_ready, _data_);
7542
7757
                                return FALSE;
7543
7758
                                _state_12:
7544
 
                                folks_name_details_change_structured_name_finish (FOLKS_IS_NAME_DETAILS (_data_->_tmp32_) ? ((FolksNameDetails*) _data_->_tmp32_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7759
                                folks_name_details_change_structured_name_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp32_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp32_) : NULL, _data_->_res_, &_data_->_inner_error_);
7545
7760
                                if (_data_->_inner_error_ != NULL) {
7546
7761
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7547
7762
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7569
7784
                                _data_->_tmp34_ = _data_->persona;
7570
7785
                                _data_->_tmp35_ = _data_->new_value;
7571
7786
                                _data_->_state_ = 13;
7572
 
                                folks_name_details_change_full_name (FOLKS_IS_NAME_DETAILS (_data_->_tmp34_) ? ((FolksNameDetails*) _data_->_tmp34_) : NULL, g_value_get_string (&_data_->_tmp35_), contacts_contact_set_persona_property_ready, _data_);
 
7787
                                folks_name_details_change_full_name (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp34_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp34_) : NULL, g_value_get_string (&_data_->_tmp35_), contacts_contact_set_persona_property_ready, _data_);
7573
7788
                                return FALSE;
7574
7789
                                _state_13:
7575
 
                                folks_name_details_change_full_name_finish (FOLKS_IS_NAME_DETAILS (_data_->_tmp34_) ? ((FolksNameDetails*) _data_->_tmp34_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7790
                                folks_name_details_change_full_name_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp34_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp34_) : NULL, _data_->_res_, &_data_->_inner_error_);
7576
7791
                                if (_data_->_inner_error_ != NULL) {
7577
7792
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7578
7793
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7600
7815
                                _data_->_tmp36_ = _data_->persona;
7601
7816
                                _data_->_tmp37_ = _data_->new_value;
7602
7817
                                _data_->_state_ = 14;
7603
 
                                folks_name_details_change_nickname (FOLKS_IS_NAME_DETAILS (_data_->_tmp36_) ? ((FolksNameDetails*) _data_->_tmp36_) : NULL, g_value_get_string (&_data_->_tmp37_), contacts_contact_set_persona_property_ready, _data_);
 
7818
                                folks_name_details_change_nickname (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp36_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp36_) : NULL, g_value_get_string (&_data_->_tmp37_), contacts_contact_set_persona_property_ready, _data_);
7604
7819
                                return FALSE;
7605
7820
                                _state_14:
7606
 
                                folks_name_details_change_nickname_finish (FOLKS_IS_NAME_DETAILS (_data_->_tmp36_) ? ((FolksNameDetails*) _data_->_tmp36_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7821
                                folks_name_details_change_nickname_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp36_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp36_) : NULL, _data_->_res_, &_data_->_inner_error_);
7607
7822
                                if (_data_->_inner_error_ != NULL) {
7608
7823
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7609
7824
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7631
7846
                                _data_->_tmp38_ = _data_->persona;
7632
7847
                                _data_->_tmp39_ = _data_->new_value;
7633
7848
                                _data_->_state_ = 15;
7634
 
                                folks_note_details_change_notes (FOLKS_IS_NOTE_DETAILS (_data_->_tmp38_) ? ((FolksNoteDetails*) _data_->_tmp38_) : NULL, g_value_get_object (&_data_->_tmp39_), contacts_contact_set_persona_property_ready, _data_);
 
7849
                                folks_note_details_change_notes (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp38_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _data_->_tmp38_) : NULL, g_value_get_object (&_data_->_tmp39_), contacts_contact_set_persona_property_ready, _data_);
7635
7850
                                return FALSE;
7636
7851
                                _state_15:
7637
 
                                folks_note_details_change_notes_finish (FOLKS_IS_NOTE_DETAILS (_data_->_tmp38_) ? ((FolksNoteDetails*) _data_->_tmp38_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7852
                                folks_note_details_change_notes_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp38_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _data_->_tmp38_) : NULL, _data_->_res_, &_data_->_inner_error_);
7638
7853
                                if (_data_->_inner_error_ != NULL) {
7639
7854
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7640
7855
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7662
7877
                                _data_->_tmp40_ = _data_->persona;
7663
7878
                                _data_->_tmp41_ = _data_->new_value;
7664
7879
                                _data_->_state_ = 16;
7665
 
                                folks_phone_details_change_phone_numbers (FOLKS_IS_PHONE_DETAILS (_data_->_tmp40_) ? ((FolksPhoneDetails*) _data_->_tmp40_) : NULL, g_value_get_object (&_data_->_tmp41_), contacts_contact_set_persona_property_ready, _data_);
 
7880
                                folks_phone_details_change_phone_numbers (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp40_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _data_->_tmp40_) : NULL, g_value_get_object (&_data_->_tmp41_), contacts_contact_set_persona_property_ready, _data_);
7666
7881
                                return FALSE;
7667
7882
                                _state_16:
7668
 
                                folks_phone_details_change_phone_numbers_finish (FOLKS_IS_PHONE_DETAILS (_data_->_tmp40_) ? ((FolksPhoneDetails*) _data_->_tmp40_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7883
                                folks_phone_details_change_phone_numbers_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp40_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _data_->_tmp40_) : NULL, _data_->_res_, &_data_->_inner_error_);
7669
7884
                                if (_data_->_inner_error_ != NULL) {
7670
7885
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7671
7886
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7693
7908
                                _data_->_tmp42_ = _data_->persona;
7694
7909
                                _data_->_tmp43_ = _data_->new_value;
7695
7910
                                _data_->_state_ = 17;
7696
 
                                folks_postal_address_details_change_postal_addresses (FOLKS_IS_POSTAL_ADDRESS_DETAILS (_data_->_tmp42_) ? ((FolksPostalAddressDetails*) _data_->_tmp42_) : NULL, g_value_get_object (&_data_->_tmp43_), contacts_contact_set_persona_property_ready, _data_);
 
7911
                                folks_postal_address_details_change_postal_addresses (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp42_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS) ? ((FolksPostalAddressDetails*) _data_->_tmp42_) : NULL, g_value_get_object (&_data_->_tmp43_), contacts_contact_set_persona_property_ready, _data_);
7697
7912
                                return FALSE;
7698
7913
                                _state_17:
7699
 
                                folks_postal_address_details_change_postal_addresses_finish (FOLKS_IS_POSTAL_ADDRESS_DETAILS (_data_->_tmp42_) ? ((FolksPostalAddressDetails*) _data_->_tmp42_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7914
                                folks_postal_address_details_change_postal_addresses_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp42_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS) ? ((FolksPostalAddressDetails*) _data_->_tmp42_) : NULL, _data_->_res_, &_data_->_inner_error_);
7700
7915
                                if (_data_->_inner_error_ != NULL) {
7701
7916
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7702
7917
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7724
7939
                                _data_->_tmp44_ = _data_->persona;
7725
7940
                                _data_->_tmp45_ = _data_->new_value;
7726
7941
                                _data_->_state_ = 18;
7727
 
                                folks_role_details_change_roles (FOLKS_IS_ROLE_DETAILS (_data_->_tmp44_) ? ((FolksRoleDetails*) _data_->_tmp44_) : NULL, g_value_get_object (&_data_->_tmp45_), contacts_contact_set_persona_property_ready, _data_);
 
7942
                                folks_role_details_change_roles (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp44_, FOLKS_TYPE_ROLE_DETAILS) ? ((FolksRoleDetails*) _data_->_tmp44_) : NULL, g_value_get_object (&_data_->_tmp45_), contacts_contact_set_persona_property_ready, _data_);
7728
7943
                                return FALSE;
7729
7944
                                _state_18:
7730
 
                                folks_role_details_change_roles_finish (FOLKS_IS_ROLE_DETAILS (_data_->_tmp44_) ? ((FolksRoleDetails*) _data_->_tmp44_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7945
                                folks_role_details_change_roles_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp44_, FOLKS_TYPE_ROLE_DETAILS) ? ((FolksRoleDetails*) _data_->_tmp44_) : NULL, _data_->_res_, &_data_->_inner_error_);
7731
7946
                                if (_data_->_inner_error_ != NULL) {
7732
7947
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7733
7948
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7755
7970
                                _data_->_tmp46_ = _data_->persona;
7756
7971
                                _data_->_tmp47_ = _data_->new_value;
7757
7972
                                _data_->_state_ = 19;
7758
 
                                folks_url_details_change_urls (FOLKS_IS_URL_DETAILS (_data_->_tmp46_) ? ((FolksUrlDetails*) _data_->_tmp46_) : NULL, g_value_get_object (&_data_->_tmp47_), contacts_contact_set_persona_property_ready, _data_);
 
7973
                                folks_url_details_change_urls (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp46_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _data_->_tmp46_) : NULL, g_value_get_object (&_data_->_tmp47_), contacts_contact_set_persona_property_ready, _data_);
7759
7974
                                return FALSE;
7760
7975
                                _state_19:
7761
 
                                folks_url_details_change_urls_finish (FOLKS_IS_URL_DETAILS (_data_->_tmp46_) ? ((FolksUrlDetails*) _data_->_tmp46_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
7976
                                folks_url_details_change_urls_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp46_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _data_->_tmp46_) : NULL, _data_->_res_, &_data_->_inner_error_);
7762
7977
                                if (_data_->_inner_error_ != NULL) {
7763
7978
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7764
7979
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7786
8001
                                _data_->_tmp48_ = _data_->persona;
7787
8002
                                _data_->_tmp49_ = _data_->new_value;
7788
8003
                                _data_->_state_ = 20;
7789
 
                                folks_web_service_details_change_web_service_addresses (FOLKS_IS_WEB_SERVICE_DETAILS (_data_->_tmp48_) ? ((FolksWebServiceDetails*) _data_->_tmp48_) : NULL, g_value_get_object (&_data_->_tmp49_), contacts_contact_set_persona_property_ready, _data_);
 
8004
                                folks_web_service_details_change_web_service_addresses (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp48_, FOLKS_TYPE_WEB_SERVICE_DETAILS) ? ((FolksWebServiceDetails*) _data_->_tmp48_) : NULL, g_value_get_object (&_data_->_tmp49_), contacts_contact_set_persona_property_ready, _data_);
7790
8005
                                return FALSE;
7791
8006
                                _state_20:
7792
 
                                folks_web_service_details_change_web_service_addresses_finish (FOLKS_IS_WEB_SERVICE_DETAILS (_data_->_tmp48_) ? ((FolksWebServiceDetails*) _data_->_tmp48_) : NULL, _data_->_res_, &_data_->_inner_error_);
 
8007
                                folks_web_service_details_change_web_service_addresses_finish (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp48_, FOLKS_TYPE_WEB_SERVICE_DETAILS) ? ((FolksWebServiceDetails*) _data_->_tmp48_) : NULL, _data_->_res_, &_data_->_inner_error_);
7793
8008
                                if (_data_->_inner_error_ != NULL) {
7794
8009
                                        if ((((_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) || (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR)) || (_data_->_inner_error_->domain == CONTACT_ERROR)) || (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR)) {
7795
8010
                                                g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7815
8030
                        default:
7816
8031
                        {
7817
8032
                                _data_->_tmp50_ = _data_->property_name;
7818
 
                                g_critical ("contacts-contact.vala:1355: Unknown property '%s' in Contact.set_perso" \
 
8033
                                g_critical ("contacts-contact.vala:1429: Unknown property '%s' in Contact.set_perso" \
7819
8034
"na_property().", _data_->_tmp50_);
7820
8035
                                break;
7821
8036
                        }
7831
8046
}
7832
8047
 
7833
8048
 
7834
 
static Block12Data* block12_data_ref (Block12Data* _data12_) {
7835
 
        g_atomic_int_inc (&_data12_->_ref_count_);
7836
 
        return _data12_;
 
8049
static Block3Data* block3_data_ref (Block3Data* _data3_) {
 
8050
        g_atomic_int_inc (&_data3_->_ref_count_);
 
8051
        return _data3_;
7837
8052
}
7838
8053
 
7839
8054
 
7840
 
static void block12_data_unref (void * _userdata_) {
7841
 
        Block12Data* _data12_;
7842
 
        _data12_ = (Block12Data*) _userdata_;
7843
 
        if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
 
8055
static void block3_data_unref (void * _userdata_) {
 
8056
        Block3Data* _data3_;
 
8057
        _data3_ = (Block3Data*) _userdata_;
 
8058
        if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
7844
8059
                ContactsContact * self;
7845
 
                self = _data12_->self;
7846
 
                _g_object_unref0 (_data12_->w);
 
8060
                self = _data3_->self;
 
8061
                _g_object_unref0 (_data3_->w);
7847
8062
                _g_object_unref0 (self);
7848
 
                g_slice_free (Block12Data, _data12_);
 
8063
                g_slice_free (Block3Data, _data3_);
7849
8064
        }
7850
8065
}
7851
8066
 
7852
8067
 
7853
 
static void __lambda9_ (Block12Data* _data12_) {
 
8068
static void __lambda17_ (Block3Data* _data3_) {
7854
8069
        ContactsContact * self;
7855
8070
        GtkCallback _tmp0_;
7856
8071
        void* _tmp0__target;
7857
8072
        GtkWidget* _tmp1_;
7858
 
        self = _data12_->self;
7859
 
        _tmp0_ = _data12_->callback;
7860
 
        _tmp0__target = _data12_->callback_target;
7861
 
        _tmp1_ = _data12_->w;
 
8073
        self = _data3_->self;
 
8074
        _tmp0_ = _data3_->callback;
 
8075
        _tmp0__target = _data3_->callback_target;
 
8076
        _tmp1_ = _data3_->w;
7862
8077
        _tmp0_ (_tmp1_, _tmp0__target);
7863
8078
}
7864
8079
 
7865
8080
 
7866
 
static void ___lambda9__contacts_contact_changed (ContactsContact* _sender, gpointer self) {
7867
 
        __lambda9_ (self);
 
8081
static void ___lambda17__contacts_contact_changed (ContactsContact* _sender, gpointer self) {
 
8082
        __lambda17_ (self);
7868
8083
}
7869
8084
 
7870
8085
 
7871
 
static void __lambda10_ (Block12Data* _data12_) {
 
8086
static void __lambda18_ (Block3Data* _data3_) {
7872
8087
        ContactsContact * self;
7873
 
        self = _data12_->self;
7874
 
        g_signal_handler_disconnect ((GObject*) self, _data12_->id);
 
8088
        self = _data3_->self;
 
8089
        g_signal_handler_disconnect ((GObject*) self, _data3_->id);
7875
8090
}
7876
8091
 
7877
8092
 
7878
 
static void ___lambda10__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
7879
 
        __lambda10_ (self);
 
8093
static void ___lambda18__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
 
8094
        __lambda18_ (self);
7880
8095
}
7881
8096
 
7882
8097
 
7883
8098
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target) {
7884
 
        Block12Data* _data12_;
 
8099
        Block3Data* _data3_;
7885
8100
        GtkWidget* _tmp0_;
7886
8101
        GtkWidget* _tmp1_;
7887
8102
        GtkCallback _tmp2_;
7893
8108
        GtkWidget* _tmp6_;
7894
8109
        g_return_if_fail (self != NULL);
7895
8110
        g_return_if_fail (w != NULL);
7896
 
        _data12_ = g_slice_new0 (Block12Data);
7897
 
        _data12_->_ref_count_ = 1;
7898
 
        _data12_->self = g_object_ref (self);
 
8111
        _data3_ = g_slice_new0 (Block3Data);
 
8112
        _data3_->_ref_count_ = 1;
 
8113
        _data3_->self = g_object_ref (self);
7899
8114
        _tmp0_ = w;
7900
8115
        _tmp1_ = _g_object_ref0 (_tmp0_);
7901
 
        _data12_->w = _tmp1_;
 
8116
        _g_object_unref0 (_data3_->w);
 
8117
        _data3_->w = _tmp1_;
7902
8118
        _tmp2_ = callback;
7903
8119
        _tmp2__target = callback_target;
7904
 
        _data12_->callback = _tmp2_;
7905
 
        _data12_->callback_target = _tmp2__target;
7906
 
        _tmp3_ = _data12_->callback;
7907
 
        _tmp3__target = _data12_->callback_target;
7908
 
        _tmp4_ = _data12_->w;
 
8120
        _data3_->callback = _tmp2_;
 
8121
        _data3_->callback_target = _tmp2__target;
 
8122
        _tmp3_ = _data3_->callback;
 
8123
        _tmp3__target = _data3_->callback_target;
 
8124
        _tmp4_ = _data3_->w;
7909
8125
        _tmp3_ (_tmp4_, _tmp3__target);
7910
 
        _tmp5_ = g_signal_connect_data (self, "changed", (GCallback) ___lambda9__contacts_contact_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
7911
 
        _data12_->id = _tmp5_;
7912
 
        _tmp6_ = _data12_->w;
7913
 
        g_signal_connect_data (_tmp6_, "destroy", (GCallback) ___lambda10__gtk_widget_destroy, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
7914
 
        block12_data_unref (_data12_);
7915
 
        _data12_ = NULL;
 
8126
        _tmp5_ = g_signal_connect_data (self, "changed", (GCallback) ___lambda17__contacts_contact_changed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
 
8127
        _data3_->id = _tmp5_;
 
8128
        _tmp6_ = _data3_->w;
 
8129
        g_signal_connect_data (_tmp6_, "destroy", (GCallback) ___lambda18__gtk_widget_destroy, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
 
8130
        block3_data_unref (_data3_);
 
8131
        _data3_ = NULL;
 
8132
}
 
8133
 
 
8134
 
 
8135
void contacts_contact_fetch_contact_info (ContactsContact* self) {
 
8136
        g_return_if_fail (self != NULL);
 
8137
        {
 
8138
                FolksIndividual* _tmp0_;
 
8139
                GeeSet* _tmp1_;
 
8140
                GeeSet* _tmp2_;
 
8141
                GeeIterator* _tmp3_ = NULL;
 
8142
                GeeIterator* _p_it;
 
8143
                _tmp0_ = self->individual;
 
8144
                _tmp1_ = folks_individual_get_personas (_tmp0_);
 
8145
                _tmp2_ = _tmp1_;
 
8146
                _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
 
8147
                _p_it = _tmp3_;
 
8148
                while (TRUE) {
 
8149
                        GeeIterator* _tmp4_;
 
8150
                        gboolean _tmp5_ = FALSE;
 
8151
                        GeeIterator* _tmp6_;
 
8152
                        gpointer _tmp7_ = NULL;
 
8153
                        FolksPersona* p;
 
8154
                        FolksPersona* _tmp8_;
 
8155
                        TpfPersona* _tmp9_;
 
8156
                        TpfPersona* tp;
 
8157
                        TpfPersona* _tmp10_;
 
8158
                        _tmp4_ = _p_it;
 
8159
                        _tmp5_ = gee_iterator_next (_tmp4_);
 
8160
                        if (!_tmp5_) {
 
8161
                                break;
 
8162
                        }
 
8163
                        _tmp6_ = _p_it;
 
8164
                        _tmp7_ = gee_iterator_get (_tmp6_);
 
8165
                        p = (FolksPersona*) _tmp7_;
 
8166
                        _tmp8_ = p;
 
8167
                        _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp8_) : NULL);
 
8168
                        tp = _tmp9_;
 
8169
                        _tmp10_ = tp;
 
8170
                        if (_tmp10_ != NULL) {
 
8171
                                TpfPersona* _tmp11_;
 
8172
                                TpContact* _tmp12_;
 
8173
                                TpContact* _tmp13_;
 
8174
                                _tmp11_ = tp;
 
8175
                                _tmp12_ = tpf_persona_get_contact (_tmp11_);
 
8176
                                _tmp13_ = _tmp12_;
 
8177
                                tp_contact_request_contact_info_async (_tmp13_, NULL, NULL, NULL);
 
8178
                        }
 
8179
                        _g_object_unref0 (tp);
 
8180
                        _g_object_unref0 (p);
 
8181
                }
 
8182
                _g_object_unref0 (_p_it);
 
8183
        }
7916
8184
}
7917
8185
 
7918
8186
 
7955
8223
}
7956
8224
 
7957
8225
 
 
8226
GIcon* contacts_contact_get_serializable_avatar_icon (ContactsContact* self) {
 
8227
        GIcon* result;
 
8228
        gboolean _tmp0_ = FALSE;
 
8229
        FolksIndividual* _tmp1_;
 
8230
        GLoadableIcon* _tmp2_;
 
8231
        GLoadableIcon* _tmp3_;
 
8232
        gboolean _tmp9_;
 
8233
        g_return_val_if_fail (self != NULL, NULL);
 
8234
        _tmp1_ = self->individual;
 
8235
        _tmp2_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp1_);
 
8236
        _tmp3_ = _tmp2_;
 
8237
        if (_tmp3_ != NULL) {
 
8238
                FolksIndividual* _tmp4_;
 
8239
                GLoadableIcon* _tmp5_;
 
8240
                GLoadableIcon* _tmp6_;
 
8241
                gchar* _tmp7_ = NULL;
 
8242
                gchar* _tmp8_;
 
8243
                _tmp4_ = self->individual;
 
8244
                _tmp5_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp4_);
 
8245
                _tmp6_ = _tmp5_;
 
8246
                _tmp7_ = g_icon_to_string ((GIcon*) _tmp6_);
 
8247
                _tmp8_ = _tmp7_;
 
8248
                _tmp0_ = _tmp8_ != NULL;
 
8249
                _g_free0 (_tmp8_);
 
8250
        } else {
 
8251
                _tmp0_ = FALSE;
 
8252
        }
 
8253
        _tmp9_ = _tmp0_;
 
8254
        if (_tmp9_) {
 
8255
                FolksIndividual* _tmp10_;
 
8256
                GLoadableIcon* _tmp11_;
 
8257
                GLoadableIcon* _tmp12_;
 
8258
                _tmp10_ = self->individual;
 
8259
                _tmp11_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp10_);
 
8260
                _tmp12_ = _tmp11_;
 
8261
                result = (GIcon*) _tmp12_;
 
8262
                return result;
 
8263
        }
 
8264
        result = NULL;
 
8265
        return result;
 
8266
}
 
8267
 
 
8268
 
 
8269
GVariant* contacts_contact_get_avatar_icon_data (ContactsContact* self) {
 
8270
        GVariant* result;
 
8271
        FolksIndividual* _tmp0_;
 
8272
        GLoadableIcon* _tmp1_;
 
8273
        GLoadableIcon* _tmp2_;
 
8274
        FolksIndividual* _tmp3_;
 
8275
        GLoadableIcon* _tmp4_;
 
8276
        GLoadableIcon* _tmp5_;
 
8277
        gchar* _tmp6_ = NULL;
 
8278
        gchar* _tmp7_;
 
8279
        gboolean _tmp8_;
 
8280
        GVariant* _tmp9_;
 
8281
        GVariant* _tmp41_;
 
8282
        g_return_val_if_fail (self != NULL, NULL);
 
8283
        _tmp0_ = self->individual;
 
8284
        _tmp1_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp0_);
 
8285
        _tmp2_ = _tmp1_;
 
8286
        if (_tmp2_ == NULL) {
 
8287
                result = NULL;
 
8288
                return result;
 
8289
        }
 
8290
        _tmp3_ = self->individual;
 
8291
        _tmp4_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp3_);
 
8292
        _tmp5_ = _tmp4_;
 
8293
        _tmp6_ = g_icon_to_string ((GIcon*) _tmp5_);
 
8294
        _tmp7_ = _tmp6_;
 
8295
        _tmp8_ = _tmp7_ != NULL;
 
8296
        _g_free0 (_tmp7_);
 
8297
        if (_tmp8_) {
 
8298
                result = NULL;
 
8299
                return result;
 
8300
        }
 
8301
        _tmp9_ = self->priv->_avatar_icon_data;
 
8302
        if (_tmp9_ == NULL) {
 
8303
                GdkPixbuf* _tmp10_;
 
8304
                GdkPixbuf* _tmp11_;
 
8305
                const GVariantType* _tmp12_;
 
8306
                GdkPixbuf* _tmp13_;
 
8307
                GdkPixbuf* _tmp14_;
 
8308
                guint _tmp15_;
 
8309
                guint8* _tmp16_ = NULL;
 
8310
                GdkPixbuf* _tmp17_;
 
8311
                GdkPixbuf* _tmp18_;
 
8312
                GdkPixbuf* _tmp19_;
 
8313
                GVariant* _tmp20_ = NULL;
 
8314
                GVariant* pixel_data;
 
8315
                GdkPixbuf* _tmp21_;
 
8316
                GdkPixbuf* _tmp22_;
 
8317
                gint _tmp23_ = 0;
 
8318
                GdkPixbuf* _tmp24_;
 
8319
                GdkPixbuf* _tmp25_;
 
8320
                gint _tmp26_ = 0;
 
8321
                GdkPixbuf* _tmp27_;
 
8322
                GdkPixbuf* _tmp28_;
 
8323
                gint _tmp29_ = 0;
 
8324
                GdkPixbuf* _tmp30_;
 
8325
                GdkPixbuf* _tmp31_;
 
8326
                gboolean _tmp32_ = FALSE;
 
8327
                GdkPixbuf* _tmp33_;
 
8328
                GdkPixbuf* _tmp34_;
 
8329
                gint _tmp35_ = 0;
 
8330
                GdkPixbuf* _tmp36_;
 
8331
                GdkPixbuf* _tmp37_;
 
8332
                gint _tmp38_ = 0;
 
8333
                GVariant* _tmp39_;
 
8334
                GVariant* _tmp40_;
 
8335
                _tmp10_ = contacts_contact_get_small_avatar (self);
 
8336
                _tmp11_ = _tmp10_;
 
8337
                if (_tmp11_ == NULL) {
 
8338
                        result = NULL;
 
8339
                        return result;
 
8340
                }
 
8341
                _tmp12_ = G_VARIANT_TYPE_BYTESTRING;
 
8342
                _tmp13_ = contacts_contact_get_small_avatar (self);
 
8343
                _tmp14_ = _tmp13_;
 
8344
                _tmp16_ = gdk_pixbuf_get_pixels_with_length (_tmp14_, &_tmp15_);
 
8345
                _tmp17_ = contacts_contact_get_small_avatar (self);
 
8346
                _tmp18_ = _tmp17_;
 
8347
                _tmp19_ = _g_object_ref0 (_tmp18_);
 
8348
                _tmp20_ = g_variant_new_from_data (_tmp12_, _tmp16_, _tmp15_, TRUE, g_object_unref, _tmp19_);
 
8349
                g_variant_ref_sink (_tmp20_);
 
8350
                pixel_data = _tmp20_;
 
8351
                _tmp21_ = contacts_contact_get_small_avatar (self);
 
8352
                _tmp22_ = _tmp21_;
 
8353
                _tmp23_ = gdk_pixbuf_get_width (_tmp22_);
 
8354
                _tmp24_ = contacts_contact_get_small_avatar (self);
 
8355
                _tmp25_ = _tmp24_;
 
8356
                _tmp26_ = gdk_pixbuf_get_height (_tmp25_);
 
8357
                _tmp27_ = contacts_contact_get_small_avatar (self);
 
8358
                _tmp28_ = _tmp27_;
 
8359
                _tmp29_ = gdk_pixbuf_get_rowstride (_tmp28_);
 
8360
                _tmp30_ = contacts_contact_get_small_avatar (self);
 
8361
                _tmp31_ = _tmp30_;
 
8362
                _tmp32_ = gdk_pixbuf_get_has_alpha (_tmp31_);
 
8363
                _tmp33_ = contacts_contact_get_small_avatar (self);
 
8364
                _tmp34_ = _tmp33_;
 
8365
                _tmp35_ = gdk_pixbuf_get_bits_per_sample (_tmp34_);
 
8366
                _tmp36_ = contacts_contact_get_small_avatar (self);
 
8367
                _tmp37_ = _tmp36_;
 
8368
                _tmp38_ = gdk_pixbuf_get_n_channels (_tmp37_);
 
8369
                _tmp39_ = pixel_data;
 
8370
                _tmp40_ = g_variant_new ("(iiibii@ay)", _tmp23_, _tmp26_, _tmp29_, _tmp32_, _tmp35_, _tmp38_, _tmp39_, NULL);
 
8371
                g_variant_ref_sink (_tmp40_);
 
8372
                _g_variant_unref0 (self->priv->_avatar_icon_data);
 
8373
                self->priv->_avatar_icon_data = _tmp40_;
 
8374
                _g_variant_unref0 (pixel_data);
 
8375
        }
 
8376
        _tmp41_ = self->priv->_avatar_icon_data;
 
8377
        result = _tmp41_;
 
8378
        return result;
 
8379
}
 
8380
 
 
8381
 
7958
8382
const gchar* contacts_contact_get_display_name (ContactsContact* self) {
7959
8383
        const gchar* result;
7960
8384
        FolksIndividual* _tmp0_;
8210
8634
        const gchar* _tmp20_ = NULL;
8211
8635
        gchar* _tmp21_;
8212
8636
        gchar** _tmp22_ = NULL;
 
8637
        gchar* _tmp23_;
 
8638
        gchar* _tmp24_;
 
8639
        gchar* _tmp25_;
 
8640
        gchar* _tmp26_;
 
8641
        gchar* _tmp27_;
 
8642
        gchar* _tmp28_;
 
8643
        gchar* _tmp29_;
 
8644
        gchar* _tmp30_;
 
8645
        gchar** _tmp31_ = NULL;
8213
8646
        contacts_contact_parent_class = g_type_class_peek_parent (klass);
8214
8647
        g_type_class_add_private (klass, sizeof (ContactsContactPrivate));
8215
8648
        G_OBJECT_CLASS (klass)->get_property = _vala_contacts_contact_get_property;
8216
8649
        G_OBJECT_CLASS (klass)->finalize = contacts_contact_finalize;
8217
8650
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_SMALL_AVATAR, g_param_spec_object ("small-avatar", "small-avatar", "small-avatar", GDK_TYPE_PIXBUF, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
 
8651
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_SERIALIZABLE_AVATAR_ICON, g_param_spec_object ("serializable-avatar-icon", "serializable-avatar-icon", "serializable-avatar-icon", G_TYPE_ICON, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
 
8652
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_AVATAR_ICON_DATA, g_param_spec_variant ("avatar-icon-data", "avatar-icon-data", "avatar-icon-data", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
8218
8653
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_DISPLAY_NAME, g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
8219
8654
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_INITIAL_LETTER, g_param_spec_uint ("initial-letter", "initial-letter", "initial-letter", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
8220
8655
        g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_IS_HIDDEN, g_param_spec_boolean ("is-hidden", "is-hidden", "is-hidden", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
8262
8697
        _tmp22_[6] = _tmp21_;
8263
8698
        contacts_contact_postal_element_names = _tmp22_;
8264
8699
        contacts_contact_postal_element_names_length1 = 7;
 
8700
        _tmp23_ = g_strdup ("email-addresses");
 
8701
        _tmp24_ = g_strdup ("phone-numbers");
 
8702
        _tmp25_ = g_strdup ("im-addresses");
 
8703
        _tmp26_ = g_strdup ("urls");
 
8704
        _tmp27_ = g_strdup ("nickname");
 
8705
        _tmp28_ = g_strdup ("birthday");
 
8706
        _tmp29_ = g_strdup ("notes");
 
8707
        _tmp30_ = g_strdup ("postal-addresses");
 
8708
        _tmp31_ = g_new0 (gchar*, 8 + 1);
 
8709
        _tmp31_[0] = _tmp23_;
 
8710
        _tmp31_[1] = _tmp24_;
 
8711
        _tmp31_[2] = _tmp25_;
 
8712
        _tmp31_[3] = _tmp26_;
 
8713
        _tmp31_[4] = _tmp27_;
 
8714
        _tmp31_[5] = _tmp28_;
 
8715
        _tmp31_[6] = _tmp29_;
 
8716
        _tmp31_[7] = _tmp30_;
 
8717
        contacts_contact_sorted_properties = _tmp31_;
 
8718
        contacts_contact_sorted_properties_length1 = 8;
8265
8719
}
8266
8720
 
8267
8721
 
8272
8726
 
8273
8727
static void contacts_contact_finalize (GObject* obj) {
8274
8728
        ContactsContact * self;
8275
 
        self = CONTACTS_CONTACT (obj);
 
8729
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT, ContactsContact);
8276
8730
        _g_object_unref0 (self->store);
8277
8731
        _g_free0 (self->presence_message);
8278
8732
        self->priv->refs = (g_free (self->priv->refs), NULL);
8279
8733
        _g_object_unref0 (self->individual);
8280
8734
        _g_object_unref0 (self->priv->_small_avatar);
 
8735
        _g_variant_unref0 (self->priv->_avatar_icon_data);
8281
8736
        _g_free0 (self->priv->filter_data);
8282
8737
        G_OBJECT_CLASS (contacts_contact_parent_class)->finalize (obj);
8283
8738
}
8297
8752
 
8298
8753
static void _vala_contacts_contact_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
8299
8754
        ContactsContact * self;
8300
 
        self = CONTACTS_CONTACT (object);
 
8755
        self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_CONTACT, ContactsContact);
8301
8756
        switch (property_id) {
8302
8757
                case CONTACTS_CONTACT_SMALL_AVATAR:
8303
8758
                g_value_set_object (value, contacts_contact_get_small_avatar (self));
8304
8759
                break;
 
8760
                case CONTACTS_CONTACT_SERIALIZABLE_AVATAR_ICON:
 
8761
                g_value_set_object (value, contacts_contact_get_serializable_avatar_icon (self));
 
8762
                break;
 
8763
                case CONTACTS_CONTACT_AVATAR_ICON_DATA:
 
8764
                g_value_set_variant (value, contacts_contact_get_avatar_icon_data (self));
 
8765
                break;
8305
8766
                case CONTACTS_CONTACT_DISPLAY_NAME:
8306
8767
                g_value_set_string (value, contacts_contact_get_display_name (self));
8307
8768
                break;
8344
8805
        GeeMap* _tmp2_;
8345
8806
        GeeMap* _tmp3_;
8346
8807
        self = (ContactsFakePersonaStore*) g_object_new (object_type, "id", "uri", "display-name", "fake store", NULL);
8347
 
        _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
 
8808
        _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
8348
8809
        _g_object_unref0 (self->priv->_personas);
8349
8810
        self->priv->_personas = _tmp0_;
8350
8811
        _tmp1_ = self->priv->_personas;
8434
8895
        _data_->self = _tmp0_;
8435
8896
        _tmp1_ = details;
8436
8897
        _tmp2_ = _g_hash_table_ref0 (_tmp1_);
 
8898
        _g_hash_table_unref0 (_data_->details);
8437
8899
        _data_->details = _tmp2_;
8438
8900
        contacts_fake_persona_store_real_add_persona_from_details_co (_data_);
8439
8901
}
8501
8963
        _data_->self = _tmp0_;
8502
8964
        _tmp1_ = persona;
8503
8965
        _tmp2_ = _g_object_ref0 (_tmp1_);
 
8966
        _g_object_unref0 (_data_->persona);
8504
8967
        _data_->persona = _tmp2_;
8505
8968
        contacts_fake_persona_store_real_remove_persona_co (_data_);
8506
8969
}
8671
9134
 
8672
9135
static void contacts_fake_persona_store_finalize (GObject* obj) {
8673
9136
        ContactsFakePersonaStore * self;
8674
 
        self = CONTACTS_FAKE_PERSONA_STORE (obj);
 
9137
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_FAKE_PERSONA_STORE, ContactsFakePersonaStore);
8675
9138
        _g_object_unref0 (self->priv->_personas);
8676
9139
        _g_object_unref0 (self->priv->_personas_ro);
8677
9140
        self->priv->_always_writeable_properties = (_vala_array_free (self->priv->_always_writeable_properties, self->priv->_always_writeable_properties_length1, (GDestroyNotify) g_free), NULL);
8693
9156
 
8694
9157
static void _vala_contacts_fake_persona_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
8695
9158
        ContactsFakePersonaStore * self;
8696
 
        self = CONTACTS_FAKE_PERSONA_STORE (object);
 
9159
        self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_FAKE_PERSONA_STORE, ContactsFakePersonaStore);
8697
9160
        switch (property_id) {
8698
9161
                case CONTACTS_FAKE_PERSONA_STORE_TYPE_ID:
8699
9162
                g_value_set_string (value, folks_persona_store_get_type_id ((FolksPersonaStore*) self));
8867
9330
        _data_->self = _tmp0_;
8868
9331
        _tmp1_ = property;
8869
9332
        _tmp2_ = g_strdup (_tmp1_);
 
9333
        _g_free0 (_data_->property);
8870
9334
        _data_->property = _tmp2_;
8871
9335
        _tmp3_ = *value;
8872
9336
        if (G_IS_VALUE (&_tmp3_)) {
8875
9339
        } else {
8876
9340
                _tmp4_ = _tmp3_;
8877
9341
        }
 
9342
        G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
8878
9343
        _data_->value = _tmp4_;
8879
9344
        contacts_fake_persona_make_real_and_set_co (_data_);
8880
9345
}
8938
9403
        }
8939
9404
        _data_->_tmp8_ = _data_->self->priv->prop_vals;
8940
9405
        if (_data_->_tmp8_ == NULL) {
8941
 
                _data_->_tmp9_ = gee_array_list_new (CONTACTS_FAKE_PERSONA_TYPE_PROP_VAL, (GBoxedCopyFunc) contacts_fake_persona_prop_val_ref, contacts_fake_persona_prop_val_unref, NULL);
 
9406
                _data_->_tmp9_ = gee_array_list_new (CONTACTS_FAKE_PERSONA_TYPE_PROP_VAL, (GBoxedCopyFunc) contacts_fake_persona_prop_val_ref, contacts_fake_persona_prop_val_unref, NULL, NULL, NULL);
8942
9407
                _g_object_unref0 (_data_->self->priv->prop_vals);
8943
9408
                _data_->self->priv->prop_vals = _data_->_tmp9_;
8944
9409
                _data_->_tmp10_ = _data_->self->priv->prop_vals;
9052
9517
                return FALSE;
9053
9518
        } else {
9054
9519
                _data_->_tmp35_ = _data_->self->priv->now_real;
9055
 
                g_assert (!_data_->_tmp35_);
 
9520
                _vala_assert (!_data_->_tmp35_, "!now_real");
9056
9521
                _data_->_tmp36_ = _data_->self->priv->prop_vals;
9057
9522
                _data_->_tmp37_ = _data_->v;
9058
9523
                gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp36_, _data_->_tmp37_);
9290
9755
 
9291
9756
static void contacts_fake_persona_prop_val_finalize (ContactsFakePersonaPropVal* obj) {
9292
9757
        ContactsFakePersonaPropVal * self;
9293
 
        self = CONTACTS_FAKE_PERSONA_PROP_VAL (obj);
 
9758
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_FAKE_PERSONA_TYPE_PROP_VAL, ContactsFakePersonaPropVal);
9294
9759
        _g_free0 (self->property);
9295
9760
        G_IS_VALUE (&self->value) ? (g_value_unset (&self->value), NULL) : NULL;
9296
9761
}
9347
9812
 
9348
9813
static void contacts_fake_persona_finalize (GObject* obj) {
9349
9814
        ContactsFakePersona * self;
9350
 
        self = CONTACTS_FAKE_PERSONA (obj);
 
9815
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersona);
9351
9816
        _g_object_unref0 (self->contact);
9352
9817
        _g_object_unref0 (self->priv->prop_vals);
9353
9818
        G_OBJECT_CLASS (contacts_fake_persona_parent_class)->finalize (obj);
9368
9833
 
9369
9834
static void _vala_contacts_fake_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
9370
9835
        ContactsFakePersona * self;
9371
 
        self = CONTACTS_FAKE_PERSONA (object);
 
9836
        self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersona);
9372
9837
        switch (property_id) {
9373
9838
                case CONTACTS_FAKE_PERSONA_LINKABLE_PROPERTIES:
9374
9839
                {
9407
9872
}
9408
9873
 
9409
9874
 
 
9875
static gint _vala_array_length (gpointer array) {
 
9876
        int length;
 
9877
        length = 0;
 
9878
        if (array) {
 
9879
                while (((gpointer*) array)[length]) {
 
9880
                        length++;
 
9881
                }
 
9882
        }
 
9883
        return length;
 
9884
}
 
9885
 
 
9886
 
9410
9887