Inherits from NSObject
Conforms to IBuddyManager
Declared in SFSBuddyManager.h
SFSBuddyManager.m

Overview

The class manages the current User’s Buddy List

Tasks

  •   buddyList

    Get the User’s buddy list. It could be null if the Buddy List was not initialized

    property
  •   buddyStates

    Get a list of Strings representing the custom Buddy states that the application can use. The custom states are sent upon initialization of the Buddy List and are configured on the server side.

    property
  •   isInited

    Checks if the current User’s Buddy List is inited. If not you should send an InitBuddyListRequest to the server in order to retrieve your persistent Buddy List data.

    property
  •   myNickName

    Get the current User’s optional nickname This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

    property
  •   myOnlineState

    Get the current User’s Online State This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

    property
  •   myState

    Get the current User’s optional custom state (e.g. “Available”; “Busy”, “Be right back”…) This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

    property
  •   myVariables

    Get all current User’s Buddy Variables This operation is valid only if the User’s BuddyList has already been initialized

    property
  •   offlineBuddies

    Get a list of all offline Buddies in the User’s Buddy list

    property
  •   onlineBuddies

    Get a list of all online Buddies in the User’s Buddy list

    property
  • – containsBuddy:

    Checks if a Buddy is present in the current User’s Buddy List

  • – getBuddyById:

    Find a Buddy from its User Id

  • – getBuddyByName:

    Find a Buddy from its name

  • – getBuddyByNickName:

    Find a Buddy from its optional nick name

  • – getMyVariable:

    Get current Users' BuddyVariable by name

Properties

buddyList

Get the User’s buddy list. It could be null if the Buddy List was not initialized

@property (readonly) NSArray *buddyList

Discussion

Get the User’s buddy list. It could be null if the Buddy List was not initialized

Declared In

SFSBuddyManager.h

buddyStates

Get a list of Strings representing the custom Buddy states that the application can use. The custom states are sent upon initialization of the Buddy List and are configured on the server side.

@property (readonly) NSArray *buddyStates

Discussion

Get a list of Strings representing the custom Buddy states that the application can use. The custom states are sent upon initialization of the Buddy List and are configured on the server side.

Declared In

SFSBuddyManager.h

isInited

Checks if the current User’s Buddy List is inited. If not you should send an InitBuddyListRequest to the server in order to retrieve your persistent Buddy List data.

@property (readonly) BOOL isInited

Discussion

Checks if the current User’s Buddy List is inited. If not you should send an InitBuddyListRequest to the server in order to retrieve your persistent Buddy List data.

Declared In

SFSBuddyManager.h

myNickName

Get the current User’s optional nickname This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

@property (readonly) NSString *myNickName

Return Value

return the Users' nickname or null if the nickname was never set

Discussion

Get the current User’s optional nickname This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

Declared In

SFSBuddyManager.h

myOnlineState

Get the current User’s Online State This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

@property (readonly) BOOL myOnlineState

Return Value

true if the User is online, false otherwise

Discussion

Get the current User’s Online State This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

Declared In

SFSBuddyManager.h

myState

Get the current User’s optional custom state (e.g. “Available”; “Busy”, “Be right back”…) This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

@property (readonly) NSString *myState

Return Value

return the Users' state or null if the state was not set

Discussion

Get the current User’s optional custom state (e.g. “Available”; “Busy”, “Be right back”…) This operation is valid only if the User’s BuddyList has already been initialized The value is handled by a reserved Buddy Variable

Declared In

SFSBuddyManager.h

myVariables

Get all current User’s Buddy Variables This operation is valid only if the User’s BuddyList has already been initialized

@property (readonly) NSArray *myVariables

Discussion

Get all current User’s Buddy Variables This operation is valid only if the User’s BuddyList has already been initialized

See Also

Declared In

SFSBuddyManager.h

offlineBuddies

Get a list of all offline Buddies in the User’s Buddy list

@property (readonly) NSArray *offlineBuddies

Discussion

Get a list of all offline Buddies in the User’s Buddy list

Declared In

SFSBuddyManager.h

onlineBuddies

Get a list of all online Buddies in the User’s Buddy list

@property (readonly) NSArray *onlineBuddies

Discussion

Get a list of all online Buddies in the User’s Buddy list

Declared In

SFSBuddyManager.h

Instance Methods

containsBuddy:

Checks if a Buddy is present in the current User’s Buddy List

- (BOOL)containsBuddy:(NSString *)name

Parameters

name

the Buddy name

Return Value

the true if the Buddy exists

Discussion

Checks if a Buddy is present in the current User’s Buddy List

See Also

Declared In

SFSBuddyManager.h

getBuddyById:

Find a Buddy from its User Id

- (id<Buddy>)getBuddyById:(NSInteger)id_

Parameters

id_

the user id

Return Value

the Buddy, or null if not found

Discussion

Find a Buddy from its User Id

See Also

Declared In

SFSBuddyManager.h

getBuddyByName:

Find a Buddy from its name

- (id<Buddy>)getBuddyByName:(NSString *)name

Parameters

name

: the Buddy name

Return Value

the Buddy, or null if not found

Discussion

Find a Buddy from its name

See Also

Declared In

SFSBuddyManager.h

getBuddyByNickName:

Find a Buddy from its optional nick name

- (id<Buddy>)getBuddyByNickName:(NSString *)nickName

Parameters

nickName

: the nickname

Return Value

the Buddy, or null if not found

Discussion

Find a Buddy from its optional nick name

See Also

Declared In

SFSBuddyManager.h

getMyVariable:

Get current Users' BuddyVariable by name

- (id<BuddyVariable>)getMyVariable:(NSString *)varName

Parameters

varName

the variable name

Discussion

Get current Users' BuddyVariable by name

Declared In

SFSBuddyManager.h