From c1b7707c628cb16b44d2159fff993b44e1a5b946 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 2 Sep 2010 13:26:31 +0100 Subject: Add empathy_contact_dup_best_for_action() This takes a FolksIndividual and returns an EmpathyContact corresponding to the FolksPersona in the Individual which is most suited to having a given action performed on it. Helps: bgo#628338 --- libempathy/empathy-contact.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libempathy/empathy-contact.h') diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index c1ef55d6b..005cf1e7a 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -100,6 +100,17 @@ gboolean empathy_contact_can_voip_video (EmpathyContact *contact); gboolean empathy_contact_can_send_files (EmpathyContact *contact); gboolean empathy_contact_can_use_rfb_stream_tube (EmpathyContact *contact); +typedef enum { + EMPATHY_ACTION_CHAT, + EMPATHY_ACTION_AUDIO_CALL, + EMPATHY_ACTION_VIDEO_CALL, + EMPATHY_ACTION_VIEW_LOGS, + EMPATHY_ACTION_SEND_FILE, + EMPATHY_ACTION_SHARE_MY_DESKTOP, +} EmpathyActionType; + +gboolean empathy_contact_can_do_action (EmpathyContact *self, + EmpathyActionType action_type); #define EMPATHY_TYPE_AVATAR (empathy_avatar_get_type ()) GType empathy_avatar_get_type (void) G_GNUC_CONST; @@ -118,6 +129,9 @@ gboolean empathy_contact_equal (gconstpointer contact1, gconstpointer contact2); EmpathyContact *empathy_contact_dup_from_tp_contact (TpContact *tp_contact); +EmpathyContact * empathy_contact_dup_best_for_action ( + FolksIndividual *individual, + EmpathyActionType action_type); G_END_DECLS -- cgit v1.2.3