Click or drag to resize

SFSBuddy Class

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
C#
public class SFSBuddy : Buddy

The SFSBuddy type exposes the following members.

Properties
  NameDescription
Public propertyId
Indicates the id of this buddy.
Public propertyIsBlocked
Indicates whether this buddy is blocked in the current user's buddies list or not.
Public propertyIsOnline
Indicates whether this buddy is online in the Buddy List system or not.
Public propertyIsTemp
Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not.
Public propertyName
Indicates the name of this buddy.
Public propertyNickName
Returns the nickname of this buddy.
Public propertyState
Returns the custom state of this buddy.
Public propertyVariables
Returns a list of BuddyVariable objects associated with the buddy.
Top
Methods
  NameDescription
Public methodContainsVariable
Indicates whether this buddy has the specified Buddy Variable set or not.
Public methodGetOfflineVariables
Retrieves the list of persistent Buddy Variables of this buddy.
Public methodGetOnlineVariables
Retrieves the list of non-persistent Buddy Variables of this buddy.
Public methodGetVariable
Retrieves a Buddy Variable from its name.
Public methodToString
Returns a string that contains the buddy name and id.
(Overrides ObjectToString.)
Top
Remarks
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