Package | com.smartfoxserver.v2.entities.managers |
Interface | public interface IBuddyManager |
Implementors | SFSBuddyManager |
In the SmartFoxServer 2X client API this interface is implemented by the SFSBuddyManager class. Read the class description for additional informations.
See also
Property | Defined By | ||
---|---|---|---|
buddyList : Array [read-only]
Returns a list of Buddy objects representing all the buddies in the user's buddies list. | IBuddyManager | ||
buddyStates : Array [read-only]
Returns a list of strings representing the available custom buddy states. | IBuddyManager | ||
isInited : Boolean [read-only]
Indicates whether the client's Buddy List system is initialized or not. | IBuddyManager | ||
myNickName : String [read-only]
Returns the current user's nickname (if set). | IBuddyManager | ||
myOnlineState : Boolean [read-only]
Returns the current user's online/offline state. | IBuddyManager | ||
myState : String [read-only]
Returns the current user's custom state (if set). | IBuddyManager | ||
myVariables : Array [read-only]
Returns all the Buddy Variables associated with the current user. | IBuddyManager | ||
offlineBuddies : Array [read-only]
Returns a list of Buddy objects representing all the offline buddies in the user's buddies list. | IBuddyManager | ||
onlineBuddies : Array [read-only]
Returns a list of Buddy objects representing all the online buddies in the user's buddies list. | IBuddyManager |
Method | Defined By | ||
---|---|---|---|
containsBuddy(name:String):Boolean
Indicates whether a buddy exists in user's buddies list or not. | IBuddyManager | ||
getBuddyById(id:int):Buddy
Retrieves a Buddy object from its id property. | IBuddyManager | ||
getBuddyByName(name:String):Buddy
Retrieves a Buddy object from its name property. | IBuddyManager | ||
getBuddyByNickName(nickName:String):Buddy
Retrieves a Buddy object from its nickName property (if set). | IBuddyManager | ||
getMyVariable(varName:String):BuddyVariable
Retrieves a Buddy Variable from its name. | IBuddyManager |
buddyList | property |
buddyList:Array
[read-only]
Returns a list of Buddy objects representing all the buddies in the user's buddies list.
The list is null
if the Buddy List system is not initialized.
public function get buddyList():Array
See also
buddyStates | property |
buddyStates:Array
[read-only] Returns a list of strings representing the available custom buddy states. The custom states are received by the client upon initialization of the Buddy List system. They can be configured by means of the SmartFoxServer 2X Administration Tool.
public function get buddyStates():Array
See also
isInited | property |
isInited:Boolean
[read-only] Indicates whether the client's Buddy List system is initialized or not. If not, an InitBuddyListRequest request should be sent to the server in order to retrieve the persistent Buddy List data.
No Buddy List related operations are allowed until the system is initialized.
public function get isInited():Boolean
See also
myNickName | property |
myNickName:String
[read-only]
Returns the current user's nickname (if set).
If the nickname was never set before, null
is returned.
As the nickname of a user in a buddy list is handled by means of a reserved Buddy Variable (see ReservedBuddyVariables class), it can be set using the SetBuddyVariablesRequest request.
public function get myNickName():String
See also
myOnlineState | property |
myOnlineState:Boolean
[read-only]
Returns the current user's online/offline state.
If true
, the user appears to be online in the buddies list of other users who have him as a buddy.
The online state of a user in a buddy list is handled by means of a reserved Buddy Variable (see ReservedBuddyVariables class); it can be changed using the dedicated GoOnlineRequest request.
public function get myOnlineState():Boolean
See also
myState | property |
myState:String
[read-only]
Returns the current user's custom state (if set).
Examples of custom states are "Available", "Busy", "Be right back", etc. If the custom state was never set before, null
is returned.
As the custom state of a user in a buddy list is handled by means of a reserved Buddy Variable (see ReservedBuddyVariables class), it can be set using the SetBuddyVariablesRequest request.
public function get myState():String
See also
myVariables | property |
myVariables:Array
[read-only] Returns all the Buddy Variables associated with the current user.
public function get myVariables():Array
See also
offlineBuddies | property |
offlineBuddies:Array
[read-only] Returns a list of Buddy objects representing all the offline buddies in the user's buddies list.
public function get offlineBuddies():Array
See also
onlineBuddies | property |
onlineBuddies:Array
[read-only] Returns a list of Buddy objects representing all the online buddies in the user's buddies list.
public function get onlineBuddies():Array
See also
containsBuddy | () | method |
public function containsBuddy(name:String):Boolean
Indicates whether a buddy exists in user's buddies list or not.
Parameters
name:String — The name of the buddy whose presence in the buddies list is to be tested.
|
Boolean — true if the specified buddy exists in the buddies list.
|
See also
getBuddyById | () | method |
public function getBuddyById(id:int):Buddy
Retrieves a Buddy object from its id property.
Parameters
id:int — The id of the buddy to be found.
|
Buddy — The Buddy object representing the buddy, or null if no buddy with the passed id exists in the buddies list.
|
See also
getBuddyByName | () | method |
public function getBuddyByName(name:String):Buddy
Retrieves a Buddy object from its name property.
Parameters
name:String — The name of the buddy to be found.
|
Buddy — The Buddy object representing the buddy, or null if no buddy with the passed name exists in the buddies list.
|
See also
getBuddyByNickName | () | method |
public function getBuddyByNickName(nickName:String):Buddy
Retrieves a Buddy object from its nickName property (if set).
Parameters
nickName:String — The nickName of the buddy to be found.
|
Buddy — The Buddy object representing the buddy, or null if no buddy with the passed nickName exists in the buddies list.
|
See also
getMyVariable | () | method |
public function getMyVariable(varName:String):BuddyVariable
Retrieves a Buddy Variable from its name.
Parameters
varName:String — The name of the Buddy Variable to be retrieved.
|
BuddyVariable — The BuddyVariable object representing the Buddy Variable, or null if no Buddy Variable with the passed name is associated with the current user.
|
See also