Collects and manages Contacts related by type, status, or some other arbitrary criteria. More...
#include <skype-embedded_2.h>
Collects and manages Contacts related by type, status, or some other arbitrary criteria.
SkypeKit recognizes two distinct ContactGroup flavors - "hardwired" and "custom". SkypeKit both defines the criteria for and dynamically manages all "hardwired" ContactGroups. Individual users explicitly create and manage all "custom" ContactGroups.
"Hardwired" groups are primarily organizational tools, for example, they enable you to display a list of all Contacts awaiting authorization by you. "Custom" groups are also organizational tools, for example, they enable you to display a list of all Contacts in a particular geographical area or belonging to a particular professional association, social clubs, and so forth. Primarily, though, "custom" groups are functional tools that enable you to establish conference calls, group chats, and so forth.
"Hardwired" ContactGroups are defined for and available to all users. SkypeKit determines membership in a particular "hardwired" group dynamically whenever a user invokes Skype.GetHardwiredContactGroup for that group. Subsequent changes to a Contact's status might result in its being added to (for example, the Contact is now authorized) or removed from (for example, the Contact is now removed or blocked) one or more "hardwired" groups.
SkypeKit fires OnChange events for all affected ContractGroup instances. Essentially all ContactGroup methods related to explicitly adding and removing members and conversations from the group return false, and CanAdd and CanRemove additionally return a false result.
"Custom" ContactGroups can be defined by a particular Skype user through the UI. Your UI should implement Creation, deletion and filtering contact list by custom contact groups, as well as adding and removing contacts in those groups.
A Contact can belong to multiple non-mutually exclusive "hardwired" groups at the same time, for example, an authorized contact is typically in your "buddy" group, but a Contact cannot belong to CONTACTS_AUTHORIZED_BY_ME if they are awaiting authorization. Similarly, a Contact can belong to multiple "custom" groups and mutual exclusivity is typically not an issue.
tutorial_4.cpp, and tutorial_9.cpp.
Definition at line 53 of file skype-embedded_2.h.
| typedef ContactGroupRef ContactGroup::Ref |
Definition at line 62 of file skype-embedded_2.h.
| typedef ContactGroupRefs ContactGroup::Refs |
Definition at line 63 of file skype-embedded_2.h.
| anonymous enum |
Definition at line 64 of file skype-embedded_2.h.
Properties of the ContactGroup class
| P_TYPE |
ContactGroup::TYPE, type: TYPE |
| P_CUSTOM_GROUP_ID |
unique 32-bit ID for custom groups, type: uint |
| P_GIVEN_DISPLAYNAME |
change via ContactGroup::GiveDisplayname(), type: Sid::String |
| P_NROFCONTACTS |
Number of contacts in the group. NB! The value of this property does not get updated until 5 seconds after account login. During these initial 5 seconds, the value of this property remains 0. The reason for this 5 second delay is to reduce the flurry of property update traffic that occurs during the CBL synchronization phase, following successful login. Note that if you absolutely need to have this value immediately after login, you can still get it by retrieving the contact list with ContactGroup::GetContacts method and examining its size. |
| P_NROFCONTACTS_ONLINE |
number of contacts online in the group, type: uint |
Definition at line 78 of file skype-embedded_2.h.
| enum ContactGroup::TYPE |
The list of all possible ContactGroup types. A value of this type can be passed to Skype class GetHardwiredContactGroup to retrieve the relevant ContactGroup object.
| ALL_KNOWN_CONTACTS |
The superset of all "hardwired" contact groups. |
| ALL_BUDDIES |
The set of all authorized contacts, that is, contacts that were last the target of Contact::SetBuddyStatus(false) plus all SkypeOut contacts. |
| SKYPE_BUDDIES |
The set of all authorized Skype contacts (Contact:_SKYPENAME is non-null). |
| SKYPEOUT_BUDDIES |
The set of all SkypeOut contacts (Contact:_PSTNNUMBER is non-null). PSTN contacts can be added to the contact list by retrieving a new contact object with Skype::GetContact, passing in the phone number as string, and then either using Contact::SetBuddyStatus(true) or adding the contact to the SKYPEOUT_BUDDIES group with ContactGroup::AddContact. |
| ONLINE_BUDDIES |
The subset of ALL_BUDDIES that are currently online, including those currently marked as DO_NOT_DISTURBED and AWAY. |
| UNKNOWN_OR_PENDINGAUTH_BUDDIES |
The set of all contacts whose Contact:_TYPE reflects UNRECOGNIZED OR have not authorized the local user yet. |
| RECENTLY_CONTACTED_CONTACTS |
This filter returns top 10 most recently contacted contacts, based on Contact::P_LASTUSED_TIMESTAMP property values. This is not configurable. Note that the P_LASTUSED_TIMESTAMP property does not propagate between different Skype instances - thus this filter only works in context of the local database. Recent contacts that were in touch with the user on some other Skype installation will not show up in this filter. |
| CONTACTS_WAITING_MY_AUTHORIZATION |
Contacts to whose authorization request the user has not responded yet. The UI should enable the user to accept, decline the authorization request and in case of decline, optionally block further incoming communication from the contact. See: Contact::SetBuddyStatus, Contact::SetBlocked and Contact::IgnoreAuthRequest for more information. |
| CONTACTS_AUTHORIZED_BY_ME |
All contacts authorized by the user. |
| CONTACTS_BLOCKED_BY_ME |
Group of contacts the user has blocked from further incoming communications. If the UI enables contact blocking, it should also provide interface for the user to unblock the blocked contacts. Note that a contact can simultaneously be in both CONTACTS_BLOCKED_BY_ME and CONTACTS_AUTHORIZED_BY_ME groups. |
| UNGROUPED_BUDDIES |
The set of all "buddies" that are not also a member of a custom group. |
| CUSTOM_GROUP |
A custom group defined by user. |
| PROPOSED_SHARED_GROUP |
The shared contact group functionality is no longer supported. This contact group type can be ignored. |
| SHARED_GROUP |
The shared contact group functionality is no longer supported. This contact group type can be ignored. |
| EXTERNAL_CONTACTS |
The set of all contacts that were originally imported from an external address book. |
Definition at line 87 of file skype-embedded_2.h.
| ContactGroup::~ContactGroup | ( | ) | [virtual] |
Definition at line 14 of file skype-embedded_2.cpp.
| bool ContactGroup::AddContact | ( | const ContactRef & | contact | ) |
Adds contact to a contact group. This only works for non-hardwired contact groups.
| bool ContactGroup::AddConversation | ( | const ConversationRef & | conversation | ) |
Adds given conversation to the ContactGroup.
| bool ContactGroup::CanAddContact | ( | bool & | result, | |
| const ContactRef | contact = 0 | |||
| ) |
Checks if the current user can add given contact to the ContactGroup.
| result | returns true if AddContact(contact) works on this group. | |
| contact | Contact to be checked. |
| bool ContactGroup::CanAddConversation | ( | bool & | result, | |
| const ConversationRef | conversation = 0 | |||
| ) |
Checks if the current user can add given conversation to the ContactGroup. Returns false for most of the hardwired contact groups for example.
| result | Returns true if Conversation can be added to this ContactGroup. | |
| conversation | Conversation to be checked. |
| bool ContactGroup::CanRemoveContact | ( | bool & | result | ) |
Checks if the current user can remove given contact from the ContactGroup.
| result | true if RemoveContact(contact) works on this group |
| bool ContactGroup::CanRemoveConversation | ( | bool & | result | ) |
Checks if the current user can remove given conversation from the ContactGroup. Again, returns false for most hardwired contact groups.
| result | true if RemoveConversation(contact) works on this group |
| bool ContactGroup::Delete | ( | bool & | result | ) |
Removes the contact group. This is synced across instances logged in with the same account - which can take several minutes for the sync to happen.
| bool ContactGroup::GetContacts | ( | ContactRefs & | contacts | ) |
Retrieves contact list.
| bool ContactGroup::GetConversations | ( | ConversationRefs & | conversations | ) |
Returns list of conversations in the ContactGroup.
| bool ContactGroup::GetPropCustomGroupId | ( | uint & | custom_group_id | ) |
ContactGroup::P_CUSTOM_GROUP_ID property get accessor
| bool ContactGroup::GetPropGivenDisplayname | ( | Sid::String & | given_displayname | ) |
ContactGroup::P_GIVEN_DISPLAYNAME property get accessor
| bool ContactGroup::GetPropNrofcontacts | ( | uint & | nrofcontacts | ) |
ContactGroup::P_NROFCONTACTS property get accessor
| bool ContactGroup::GetPropNrofcontactsOnline | ( | uint & | nrofcontacts_online | ) |
ContactGroup::P_NROFCONTACTS_ONLINE property get accessor
| bool ContactGroup::GetPropType | ( | TYPE & | type | ) |
ContactGroup::P_TYPE property get accessor
| bool ContactGroup::GiveDisplayName | ( | const Sid::String & | name | ) |
Setter for ContactGroup class GIVEN_DISPLAYNAME property.
| virtual void ContactGroup::OnChange | ( | const ContactRef & | contact | ) | [virtual] |
A contact has been added or removed to this ContactGroup.
NB! On rare occasions, the ContectRef argument to this callback can be NULL. You should always check whether the reference is valid, before accessing methods or properties.
| virtual void ContactGroup::OnChangeConversation | ( | const ConversationRef & | conversation | ) | [virtual] |
conversation added or removed from this group
| ContactGroupRef ContactGroup::ref | ( | ) | [inline] |
Definition at line 65 of file skype-embedded_2.h.
| bool ContactGroup::RemoveContact | ( | const ContactRef & | contact | ) |
Removes contact from the ContactGroup.
| bool ContactGroup::RemoveConversation | ( | const ConversationRef & | conversation | ) |
Removes given conversation from the ContactGroup.
(c) Skype Technologies S.A. Confidential/Proprietary
Last updated: Fri Jan 27 2012