Packagecom.smartfoxserver.v2.entities
Interfacepublic interface Buddy
Implementors SFSBuddy

The Buddy interface defines all the methods and properties that an object representing a SmartFoxServer Buddy entity exposes.

In the SmartFoxServer 2X client API this interface is implemented by the SFSBuddy class. Read the class description for additional informations.

See also

SFSBuddy


Public Properties
 PropertyDefined By
  id : int
[read-only] Indicates the id of this buddy.
Buddy
  isBlocked : Boolean
[read-only] Indicates whether this buddy is blocked in the current user's buddies list or not.
Buddy
  isOnline : Boolean
[read-only] Indicates whether this buddy is online in the Buddy List system or not.
Buddy
  isTemp : Boolean
[read-only] Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not.
Buddy
  name : String
[read-only] Indicates the name of this buddy.
Buddy
  nickName : String
[read-only] Returns the nickname of this buddy.
Buddy
  state : String
[read-only] Returns the custom state of this buddy.
Buddy
  variables : Array
[read-only] Returns a list of BuddyVariable objects associated with the buddy.
Buddy
Public Methods
 MethodDefined By
  
containsVariable(varName:String):Boolean
Indicates whether this buddy has the specified Buddy Variable set or not.
Buddy
  
Retrieves the list of persistent Buddy Variables of this buddy.
Buddy
  
Retrieves the list of non-persistent Buddy Variables of this buddy.
Buddy
  
getVariable(varName:String):BuddyVariable
Retrieves a Buddy Variable from its name.
Buddy
Property Detail
idproperty
id:int  [read-only]

Indicates the id of this buddy. This is equal to the id assigned by SmartFoxServer to the corresponding user.


Implementation
    public function get id():int

See also

isBlockedproperty 
isBlocked:Boolean  [read-only]

Indicates whether this buddy is blocked in the current user's buddies list or not. A buddy can be blocked by means of a BlockBuddyRequest request.


Implementation
    public function get isBlocked():Boolean

See also

isOnlineproperty 
isOnline:Boolean  [read-only]

Indicates whether this buddy is online in the Buddy List system or not.


Implementation
    public function get isOnline():Boolean
isTempproperty 
isTemp:Boolean  [read-only]

Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not.


Implementation
    public function get isTemp():Boolean
nameproperty 
name:String  [read-only]

Indicates the name of this buddy. This is equal to the name of the corresponding user.


Implementation
    public function get name():String

See also

nickNameproperty 
nickName:String  [read-only]

Returns the nickname of this buddy. If the nickname is not set, null is returned.


Implementation
    public function get nickName():String
stateproperty 
state:String  [read-only]

Returns the custom state of this buddy. Examples of custom states are "Available", "Busy", "Be right back", etc. If the custom state is not set, null is returned.

The list of available custom states is returned by the IBuddyManager.buddyStates property.


Implementation
    public function get state():String

See also

variablesproperty 
variables:Array  [read-only]

Returns a list of BuddyVariable objects associated with the buddy.


Implementation
    public function get variables():Array

See also

Method Detail
containsVariable()method
public function containsVariable(varName:String):Boolean

Indicates whether this buddy has the specified Buddy Variable set or not.

Parameters

varName:String — The name of the Buddy Variable whose existance must be checked.

Returns
Booleantrue if a Buddy Variable with the passed name is set for this buddy.
getOfflineVariables()method 
public function getOfflineVariables():Array

Retrieves the list of persistent Buddy Variables of this buddy.

Returns
Array — An array of BuddyVariable objects.

See also

getOnlineVariables()method 
public function getOnlineVariables():Array

Retrieves the list of non-persistent Buddy Variables of this buddy.

Returns
Array — An array of BuddyVariable objects.

See also

getVariable()method 
public function getVariable(varName:String):BuddyVariable

Retrieves a Buddy Variable from its name.

Parameters

varName:String — The name of the Buddy Variable to be retrieved.

Returns
BuddyVariable — The BuddyVariable object representing the Buddy Variable, or null if no Buddy Variable with the passed name is associated with this buddy.

See also