RaveConnectFriendsController#

class: RaveConnectFriendsController

Enum RaveConnectFriendsControllerState#

  • RaveFriendsControllerStateNotDownloaded: Friends syncing is not enabled

  • RaveFriendsControllerStateDownloading: Friends sycning is in progress

  • RaveFriendsControllerStateDownloaded: Friends sycning is enabled


Delegate RaveConnectFriendsControllerCallback#

Implement this delegate to track state changes in the controller to keep your UI up-to-date:

public delegate void RaveConnectFriendsControllerCallback(RaveConnectFriendsControllerState state);

Parameters:

state - Latest state value


RaveConnectFriendsController#

Constructor for new friends controller:

public RaveConnectFriendsController(string pluginKeyName);

Parameters:

pluginKeyName - Key for the plugin to use with this controller instance

Returns: Instance of RaveConnectFriendsController for the plugin specified


SetObserver#

Implement RaveConnectFriendsControllerCallback and set your observer instance in the controller:

public void SetObserver(RaveConnectFriendsControllerCallback observer);

Parameters:

observer - Reference to object implementing the state observer. Recommend you have a unique observer for each controller/plugin pair.


AttemptGetFriends#

Attempt to sync friends asynchronously. Checks internal logic to ensure that the plugin is enabled and that friends haven’t already been synced. If the user is authenticated will attempt to connect the plugin to the curent user in addition to syncing friends. Track changes to state through the observer:

public void AttemptGetFriends();

AttemptForgetFriends#

Attempt to stop syncing friends asynchronously. Checks internal logic to ensure that the plugin is enabled and that friends have been synced. If the user is authenticated this call will attempt to disconnect the plugin from the current user in addition to stopping syncing. Track changes to state through the observer:

public void AttemptForgetFriends();

RaveConnectController#

Enum RaveConnectControllerState#

  • RaveConnectControllerStateDisabled : Controller is disabled, plugin isn’t available

  • RaveConnectControllerStateConnected : Controller is connected, plugin is ready to use

  • RaveConnectControllerStateConnecting : Controller is in the process of asynchronously attempting to connect, plugin is not ready

  • RaveConnectControllerStateDisconnected : Controller is disconnected, plugin is not ready

  • RaveConnectControllerStateDisconnecting : Controller is in the process of asynchronously attempting to disconnect, plugin is not ready


Delegate RaveConnectControllerCallback#

Implement this observer to track state changes to the controller to keep your UI up-to-date:

public delegate void RaveConnectControllerCallback(RaveConnectControllerState state);

Parameters:

state - Latest state value


RaveConnectController#

Constructor for instances of RaveConnectController:

public RaveConnectController(String pluginKeyName);

Parameters:

pluginKeyName - Key name for plugin to use for this controller

Returns: Instance of RaveConnectController for the plugin specified


SetObserver#

Implement RaveConnectControllerCallback and set your instance in the controller using setObserver:

public void SetObserver(RaveConnectControllerCallback observer);

Parameters:

observer - Observer instance. Recommended that you have a different instance per plugin/controller pair.


AttemptConnect#

Attempt to connect asynchronously. Checks internal logic to ensure that the plugin is enabled and plugin isn’t already connected. Track changes to state through the observer:

public void AttemptConnect();

AttemptDisconnect#

Attempt to disconnect asynchronously. Checks internal logic to ensure that the plugin is connected. Track changes to state through the observer:

public void AttemptDisconnect();