- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = contact_finalize;
- object_class->get_property = contact_get_property;
- object_class->set_property = contact_set_property;
-
- g_object_class_install_property (object_class,
- PROP_ID,
- g_param_spec_string ("id",
- "Contact id",
- "String identifying contact",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_NAME,
- g_param_spec_string ("name",
- "Contact Name",
- "The name of the contact",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_AVATAR,
- g_param_spec_boxed ("avatar",
- "Avatar image",
- "The avatar image",
- EMPATHY_TYPE_AVATAR,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_ACCOUNT,
- g_param_spec_object ("account",
- "Contact Account",
- "The account associated with the contact",
- MC_TYPE_ACCOUNT,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_PRESENCE,
- g_param_spec_uint ("presence",
- "Contact presence",
- "Presence of contact",
- MC_PRESENCE_UNSET,
- LAST_MC_PRESENCE,
- MC_PRESENCE_UNSET,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_PRESENCE_MESSAGE,
- g_param_spec_string ("presence-message",
- "Contact presence message",
- "Presence message of contact",
- NULL,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
- PROP_HANDLE,
- g_param_spec_uint ("handle",
- "Contact Handle",
- "The handle of the contact",
- 0,
- G_MAXUINT,
- 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_CAPABILITIES,
- g_param_spec_flags ("capabilities",
- "Contact Capabilities",
- "Capabilities of the contact",
- EMPATHY_TYPE_CAPABILITIES,
- EMPATHY_CAPABILITIES_UNKNOWN,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_IS_USER,
- g_param_spec_boolean ("is-user",
- "Contact is-user",
- "Is contact the user",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_READY,
- g_param_spec_flags ("ready",
- "Contact ready flags",
- "Flags for ready properties",
- EMPATHY_TYPE_CONTACT_READY,
- EMPATHY_CONTACT_READY_NONE,
- G_PARAM_READABLE));
-
- g_type_class_add_private (object_class, sizeof (EmpathyContactPriv));
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = contact_finalize;
+ object_class->dispose = contact_dispose;
+ object_class->get_property = contact_get_property;
+ object_class->set_property = contact_set_property;
+
+ g_object_class_install_property (object_class,
+ PROP_TP_CONTACT,
+ g_param_spec_object ("tp-contact",
+ "TpContact",
+ "The TpContact associated with the contact",
+ TP_TYPE_CONTACT,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_ACCOUNT,
+ g_param_spec_object ("account",
+ "The account",
+ "The account associated with the contact",
+ MC_TYPE_ACCOUNT,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_ID,
+ g_param_spec_string ("id",
+ "Contact id",
+ "String identifying contact",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_NAME,
+ g_param_spec_string ("name",
+ "Contact Name",
+ "The name of the contact",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_AVATAR,
+ g_param_spec_boxed ("avatar",
+ "Avatar image",
+ "The avatar image",
+ EMPATHY_TYPE_AVATAR,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_PRESENCE,
+ g_param_spec_uint ("presence",
+ "Contact presence",
+ "Presence of contact",
+ MC_PRESENCE_UNSET,
+ LAST_MC_PRESENCE,
+ MC_PRESENCE_UNSET,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_PRESENCE_MESSAGE,
+ g_param_spec_string ("presence-message",
+ "Contact presence message",
+ "Presence message of contact",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_HANDLE,
+ g_param_spec_uint ("handle",
+ "Contact Handle",
+ "The handle of the contact",
+ 0,
+ G_MAXUINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_CAPABILITIES,
+ g_param_spec_flags ("capabilities",
+ "Contact Capabilities",
+ "Capabilities of the contact",
+ EMPATHY_TYPE_CAPABILITIES,
+ EMPATHY_CAPABILITIES_UNKNOWN,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_IS_USER,
+ g_param_spec_boolean ("is-user",
+ "Contact is-user",
+ "Is contact the user",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ signals[PRESENCE_CHANGED] =
+ g_signal_new ("presence-changed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ _empathy_marshal_VOID__ENUM_ENUM,
+ G_TYPE_NONE,
+ 2, MC_TYPE_PRESENCE,
+ MC_TYPE_PRESENCE);
+
+ g_type_class_add_private (object_class, sizeof (EmpathyContactPriv));