Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.skype.api
Class ContactGroup

    java.lang.Object
      com.skype.api.SkypeObject
          com.skype.api.ContactGroup

    public class ContactGroup

extends SkypeObject

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.

Nested Class Summary
`static interface` | `ContactGroup.ContactGroupListener`
`static class` | `ContactGroup.PROPERTY` Properties of the ContactGroup class
`static class` | `ContactGroup.TYPE` The list of all possible ContactGroup types.

Field Summary

Fields inherited from class com.skype.api.SkypeObject
`mObjectId, mPropCache, skype`

Constructor Summary
`ContactGroup(int oid, Skype skype)`

Method Summary
`void` | `AddContact(Contact contact)` Adds contact to a contact group.
`void` | `AddConversation(Conversation conversation)` Adds given conversation to the ContactGroup.
`boolean` | `CanAddContact(Contact contact)` Checks if the current user can add given contact to the ContactGroup.
`boolean` | `CanAddConversation(Conversation conversation)` Checks if the current user can add given conversation to the ContactGroup.
`boolean` | `CanRemoveContact()` Checks if the current user can remove given contact from the ContactGroup.
`boolean` | `CanRemoveConversation()` Checks if the current user can remove given conversation from the ContactGroup.
`boolean` | `Delete()` Removes the contact group.
`byte[]` | `GetBinProperty(ContactGroup.PROPERTY prop)`
`boolean` | `GetBooleanProperty(ContactGroup.PROPERTY prop)`
`Contact[]` | `GetContacts()` Retrieves contact list.
`Conversation[]` | `GetConversations()` Returns list of conversations in the ContactGroup.
`int` | `GetIntProperty(ContactGroup.PROPERTY prop)`
`java.lang.Object` | `GetPropertyAsEnum(int propid)`
`java.lang.String` | `GetStrProperty(ContactGroup.PROPERTY prop)`
`void` | `GiveDisplayName(java.lang.String name)` Setter for ContactGroup class GIVEN_DISPLAYNAME property.
`static int` | `moduleID()`
`void` | `RemoveContact(Contact contact)` Removes contact from the ContactGroup.
`void` | `RemoveConversation(Conversation conversation)` Removes given conversation from the ContactGroup.

Methods inherited from class com.skype.api.SkypeObject
`close, getOid`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContactGroup

    public ContactGroup(int oid,
                        Skype skype)

Method Detail

### moduleID

    public static final int moduleID()

### GetPropertyAsEnum

    public java.lang.Object GetPropertyAsEnum(int propid)

  Specified by:
    `GetPropertyAsEnum` in class `SkypeObject`

### GetStrProperty

    public java.lang.String GetStrProperty(ContactGroup.PROPERTY prop)

### GetIntProperty

    public int GetIntProperty(ContactGroup.PROPERTY prop)

### GetBooleanProperty

    public boolean GetBooleanProperty(ContactGroup.PROPERTY prop)

### GetBinProperty

    public byte[] GetBinProperty(ContactGroup.PROPERTY prop)

### GiveDisplayName

    public void GiveDisplayName(java.lang.String name)

  Setter for ContactGroup class GIVEN_DISPLAYNAME property.

  Parameters:
    `name` -

### Delete

    public boolean Delete()

  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.

  Returns:
    result

### GetConversations

    public Conversation[] GetConversations()

  Returns list of conversations in the ContactGroup.

  Returns:
    conversations

### CanAddConversation

    public boolean CanAddConversation(Conversation conversation)

  Checks if the current user can add given conversation to the ContactGroup. Returns false for most of the hardwired contact groups for example.

  Parameters:
    `conversation` - Conversation to be checked.
  Returns:
    result Returns true if Conversation can be added to this ContactGroup.

### AddConversation

    public void AddConversation(Conversation conversation)

  Adds given conversation to the ContactGroup.

  Parameters:
    `conversation` -

### CanRemoveConversation

    public boolean CanRemoveConversation()

  Checks if the current user can remove given conversation from the ContactGroup. Again, returns false for most hardwired contact groups.

  Returns:
    result true if RemoveConversation(contact) works on this group

### RemoveConversation

    public void RemoveConversation(Conversation conversation)

  Removes given conversation from the ContactGroup.

  Parameters:
    `conversation` -

### GetContacts

    public Contact[] GetContacts()

  Retrieves contact list.

  Returns:
    contacts

### CanAddContact

    public boolean CanAddContact(Contact contact)

  Checks if the current user can add given contact to the ContactGroup.

  Parameters:
    `contact` - Contact to be checked.
  Returns:
    result returns true if AddContact(contact) works on this group.

### AddContact

    public void AddContact(Contact contact)

  Adds contact to a contact group. This only works for non-hardwired contact groups.

  Parameters:
    `contact` -

### CanRemoveContact

    public boolean CanRemoveContact()

  Checks if the current user can remove given contact from the ContactGroup.

  Returns:
    result true if RemoveContact(contact) works on this group

### RemoveContact

    public void RemoveContact(Contact contact)

  Removes contact from the ContactGroup.

  Parameters:
    `contact` -

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.