com.skype
Class ContactList

java.lang.Object
  extended by com.skype.ContactList

public final class ContactList
extends Object

This object can be used for all actions normal to a contactlist, like searching users and friends.

Author:
Koji Hisano.

Method Summary
 Friend addFriend(String skypeId, String messageForAuthorization)
          Add user to contactlist.
 Friend addFriend(User user, String messageForAuthorization)
          Add user to contactlist.
 Group addGroup(String name)
          Add group to contactlist.
 Friend[] getAllFriends()
          Get all authorized users.
 Group[] getAllGroups()
          Search for CUSTOM groups.
 Group[] getAllSystemGroups()
          Search for HARDWIRED groups.
 Friend[] getAllUserWaitingForAuthorization()
          Get all users waiting for AUTHORIZATION.
 Friend getFriend(String skypeId)
          Get the Friend object for one of the authorized users.
 Group getGroup(String displayName)
          Search for group with displayname.
 Group getSystemGroup(Group.Type type)
          Search for a group based on it's type.
 void removeFriend(Friend friend)
          Removes friend from this contact list.
 void removeGroup(Group group)
          Remove group from contactlist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAllFriends

public Friend[] getAllFriends()
                       throws SkypeException
Get all authorized users.

Returns:
array of friends.
Throws:
SkypeException - when the connection has gone bad.

getAllUserWaitingForAuthorization

public Friend[] getAllUserWaitingForAuthorization()
                                           throws SkypeException
Get all users waiting for AUTHORIZATION.

Returns:
array of users.
Throws:
SkypeException - when the connection has gone bad.

getFriend

public Friend getFriend(String skypeId)
                 throws SkypeException
Get the Friend object for one of the authorized users.

Parameters:
skypeId - Skype ID of the friend.
Returns:
the friend or null if friend isn't found.
Throws:
SkypeException - when a connection has gone bad.

getAllSystemGroups

public Group[] getAllSystemGroups()
                           throws SkypeException
Search for HARDWIRED groups.

Returns:
array of found groups or null if groups could not be found.
Throws:
SkypeException - when connection has gone bad.

getSystemGroup

public Group getSystemGroup(Group.Type type)
                     throws SkypeException
Search for a group based on it's type.

Parameters:
type - Group type to find.
Returns:
group or null if group isn't found.
Throws:
SkypeException - when connection has gone bad or type isn't correct, like CUSTOM_GROUP.

getAllGroups

public Group[] getAllGroups()
                     throws SkypeException
Search for CUSTOM groups.

Returns:
Array of found groups.
Throws:
SkypeException - when connection has gone bad.

getGroup

public Group getGroup(String displayName)
               throws SkypeException
Search for group with displayname.

Parameters:
displayName - name of the group.
Returns:
found Group or null if none is found.
Throws:
SkypeException - when connection has gone bad.

addGroup

public Group addGroup(String name)
               throws SkypeException
Add group to contactlist.

Parameters:
name - Name of the group.
Returns:
the Group object created.
Throws:
SkypeException - when connection has gone bad.

addFriend

public Friend addFriend(User user,
                        String messageForAuthorization)
                 throws SkypeException
Add user to contactlist.

Parameters:
user - user to be added.
Returns:
Added friend.
Throws:
SkypeException - when connection has gone bad.

addFriend

public Friend addFriend(String skypeId,
                        String messageForAuthorization)
                 throws SkypeException
Add user to contactlist.

Parameters:
skypeId - skype id of user to be added.
Returns:
Added friend.
Throws:
SkypeException - when connection has gone bad.

removeFriend

public void removeFriend(Friend friend)
                  throws SkypeException
Removes friend from this contact list.

Parameters:
friend - friend to be removed.
Throws:
SkypeException - when connection has gone bad.

removeGroup

public void removeGroup(Group group)
                 throws SkypeException
Remove group from contactlist.

Parameters:
group - Group to remove.
Throws:
SkypeException - when connection has gone bad.


Copyright © 2004-2011. All Rights Reserved.