C# / .Net API Library Reference  4.3.2-74-ge1d4cca
Package Functions | Public Functions | Properties | Events
CollaborationManager Class Reference

The CollaborationManager class provides methods to implement the collaboration functionality, and to manage which session is the owner.

About Session Ownership
CollaborationManager provides shallow collaboration: there is no difference, from a functionality perspective, between the host and the participants, and therefore changes in session ownership are not relevant to the end users. From a developer point of view, however, it is important to know that the size of the view on the host session dictates the size of the view for the collaboration participants (unless you explicitly override this default, see DefaultAllowSesssionRenderOrResize).

The user who originally requests the URL for the collaboration session (called the share URL) is the session owner. If this user disconnects, session ownership automatically passes on to another collaboration participant (see IOwnerSessionProvider). It is also possible to use OwnerSession to pass ownership to a specific user.

About Color Providers
The color provider determines which color is assigned to each collaboration participant. This is useful, for example, when using the client-side acetate functionality: each participant's cursor or drawing on the view overlay will appear in a different color. PureWeb comes with a built-in color provider; changing this default is rare, but it is possible. For more information, see ISessionDefaultColorProvider.

Package Functions

 CollaborationManager ()
 

Public Functions

void CreateShare (String password, EventHandler< UpdateShareEventArgs > callback=null)
 
void CreateShare (String password, long timeout, EventHandler< UpdateShareEventArgs > callback=null)
 
void Initialize (StateManager stateManager)
 
void InvalideShare (string shareUrl, EventHandler< UpdateShareEventArgs > callback=null)
 
bool IsInitialized ()
 
void SessionConnected (Guid sessionId, XElement command)
 
void SessionDisconnected (Guid sessionId, XElement command)
 
void Uninitialize ()
 

Properties

static CollaborationManager Instance [get]
 
Guid OwnerSession [get, set]
 
IOwnerSessionProvider OwnerSessionProvider [get, set]
 
ISessionDefaultColorProvider SessionDefaultColorProvider [get, set]
 

Events

EventHandler OwnerSessionChanged
 

Usage Description

void CreateShare ( String  password,
EventHandler< UpdateShareEventArgs >  callback = null 
)
inline

Requests a share URL allowing collaboration directly from the service (this is not very common, as collaboration is usually initiated from client applications).

If you do not specify a timeout value as a parameter (see next method below), the URL will not time out unless you explicitly call InvalideShare.

Parameters
passwordThe password that you want the participants to enter when joining the session.
callbackThe function that will be called when the share URL is received.
void CreateShare ( String  password,
long  timeout,
EventHandler< UpdateShareEventArgs >  callback = null 
)
inline

Requests a share URL allowing collaboration directly from the service (this is not very common, as collaboration is usually initiated from client applications).

Parameters
passwordThe password that you want the participants to enter when joining the session.
timeoutThe length of time (in milliseconds) that the share URL will remain valid for new participants to join.
callbackThe function that will be called when the share URL is received.
void Initialize ( StateManager  stateManager)
inherited

Initializes the plugin with the specified StateManager.

Parameters
stateManagerThe StateManager.

Implemented in ViewManager.

void InvalideShare ( string  shareUrl,
EventHandler< UpdateShareEventArgs >  callback = null 
)
inline

Invalidates the specified share URL.

When a share URL is invalidated, new collaboration participants are not allowed to access the URL, but this has no impact on existing participants already in the session.

Parameters
shareUrlThe share URL to invalidate.
callbackThe function that will be called once the share URL has been rendered invalid.
bool IsInitialized ( )
inline

Returns a Boolean value indicating whether this instance is initialized.

void SessionConnected ( Guid  sessionId,
XElement  command 
)
inherited

Indicates that the specified session is connected.

Parameters
sessionIdThe session's unique identifier.
commandThe command that caused the connection.
void SessionDisconnected ( Guid  sessionId,
XElement  command 
)
inherited

Indicates that the specified session is disconnected.

Parameters
sessionIdThe session's unique identifer.
commandThe command that caused the disconnection.
void Uninitialize ( )
inherited

Uninitializes the plugin.

Implemented in ViewManager.

Property Documentation

CollaborationManager Instance
staticget

The singleton instance of CollaborationManager.

Guid OwnerSession
getset

Gets or sets a session as the owner session.

If set to Guid.Empty, then a new owner is chosen from existing sessions based on the owner session provider (see IOwnerSessionProvider). Otherwise, the specified value must be a valid session ID.

You can use this method to change ownership when the current host is still connected to the collaboration session.

IOwnerSessionProvider OwnerSessionProvider
getset

Gets or sets the default session owner provider. For more information, see IOwnerSessionProvider.

ISessionDefaultColorProvider SessionDefaultColorProvider
getset

Gets or sets the default color provider. For more information, see ISessionDefaultColorProvider.

Event Documentation

EventHandler OwnerSessionChanged

The event triggered by a change to the owner session element in application state. This would happen, for example, whenever a session host joins or leaves the session.