The SFSBuddy object represents a buddy in the current user's buddies list.
Inheritance Hierarchy SystemObject
Sfs2X.EntitiesSFSBuddy
Namespace:
Sfs2X.Entities
Assembly:
SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax public class SFSBuddy : Buddy
The SFSBuddy type exposes the following members.
Properties
| Name | Description |
---|
| Id |
Indicates the id of this buddy.
|
| IsBlocked |
Indicates whether this buddy is blocked in the current user's buddies list or not.
|
| IsOnline |
Indicates whether this buddy is online in the Buddy List system or not.
|
| IsTemp |
Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not.
|
| Name |
Indicates the name of this buddy.
|
| NickName |
Returns the nickname of this buddy.
|
| State |
Returns the custom state of this buddy.
|
| Variables |
Returns a list of BuddyVariable objects associated with the buddy.
|
TopMethods
| Name | Description |
---|
| ContainsVariable |
Indicates whether this buddy has the specified Buddy Variable set or not.
|
| GetOfflineVariables |
Retrieves the list of persistent Buddy Variables of this buddy.
|
| GetOnlineVariables |
Retrieves the list of non-persistent Buddy Variables of this buddy.
|
| GetVariable |
Retrieves a Buddy Variable from its name.
|
| ToString |
Returns a string that contains the buddy name and id.
(Overrides ObjectToString.) |
TopRemarks
A buddy is marked out by the following characteristics.
- Nickname: a buddy can have an optional nickname, which differs from the username used during the login process.
- Online/offline state: users can be online or offline as buddies in the Buddy List system. By default a buddy is online every time he joins a Zone, but the user can also switch the state to offline at runtime, and disappear from other user's buddies list. This state is persistent and it is based on a reserved Buddy Variable.
- Custom state: each user can have a typical IM state such as "Available", "Away", "Occupied", etc. State can be selected among the custom ones defined in the Zone configuration, which can be changed or enriched at any time. This state is persistent and it is based on a reserved Buddy Variable.
- Blocked buddy: buddies that are blocked in a user's buddies list won't be able to send messages to that user; also they won't be able to see if the user is online or offline in the Buddy List system.
- Temporary buddy: a temporary buddy is added to the current user's buddies list whenever another user adds him to his own buddies list. In this way users can "see" each other and exchange messages. If the current user doesn't add that temporary buddy to his buddies list voluntarily, that buddy won't be persisted and will be lost upon disconnection.
- Variables: Buddy Variables enable each user to show (and send updates on) specific custom informations to each user to whom he is a buddy. For example one could send realtime updates on his last activity, or post the title of the song he's listening right now, or scores, rankings and whatnot.
See Also