Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Properties | List of all members
PWCollaborationManager Class Reference

The PWCollaborationManager class provides methods to implement the collaboration functionality.

Collaboration allows several users to interact simultaneously with the same service session from their own instance of the client application. The collaboration functionality also includes acetate tools, which allow you to display an overlay over views for markup purposes (see PWAcetateToolDelegate).

Constructors

(id) - initWithFramework:
 

Public Functions

(BOOL) - getMarkupVisible:
 
(PWXmlElement *) - getSessionCollaborationInfo:
 
(PWColor *) - getSessionDefaultColor:
 
(PWXmlElement *) - getSessionUserInfo:
 
(PWXmlElement *) - getViewCollaborationInfo:
 
(void) - removeAcetateMarkup:
 
(void) - removeAcetateMarkup:markupType:
 
(void) - removeAcetateMarkup:markupType:instanceId:
 
(void) - removeAcetateMarkup:sessionId:
 
(void) - removeAcetateMarkupWithSessionId:
 
(void) - setMarkupVisible:markupVisible:
 
(void) - setSessionUserInfo:userInfo:
 
(void) - setViewCollaborationInfo:xInfo:
 
(PWGuid *) - startupAcetateMarkup:markupType:markup:newInstance:
 
(void) - updateAcetateMarkup:markupType:instanceId:markup:
 
(void) - updateUserInfo:value:
 

Properties

NSArray * activeSessions
 
PWColordefaultColor
 
PWEventPublisher * defaultColorChanged
 
PWFrameworkframework
 
BOOL isInitialized
 
PWEventPublisher * isInitializedChanged
 
BOOL ownCursorVisible
 
PWGuidownerSession
 
PWEventPublisher * ownerSessionChanged
 
PWGuidsessionId
 
PWEventPublisher * sessionsChanged
 
PWEventPublisher * updatesAvailable
 
PWXmlElementuserInfo
 
PWEventPublisher * userInfoChanged
 

Methods Descriptions

- (BOOL) getMarkupVisible: (PWGuid *)  sessionId

Returns a Boolean value that indicates whether acetate markup is visible for the specified session.

- (PWXmlElement *) getSessionCollaborationInfo: (PWGuid *)  sessionId

Returns the session collaboration information for the specified session, or nil if the specified session does not exist. The collaboration information is the content of the session element in application state, and includes details such as username and assigned color.

- (PWColor *) getSessionDefaultColor: (PWGuid *)  sessionId

Returns the default color for the specified collaboration session. This color is used when an acetate tool is active: each participant's cursor or drawing on the view overlay will appear in a different color.

- (PWXmlElement *) getSessionUserInfo: (PWGuid *)  sessionId

Returns the user information (UserInfo element) for the specified session ID.

- (PWXmlElement *) getViewCollaborationInfo: (NSString *)  viewName

Returns the collaboration information for the specified view, or nil if the specified view does not exist.

- (id) initWithFramework: (PWFramework *)  framework

Creates and initializes an instance of PWCollaborationManager.

- (void) removeAcetateMarkup: (NSString *)  viewName

Removes all instances of acetate markup for a specified view.

- (void) removeAcetateMarkup: (NSString *)  viewName
markupType: (NSString *)  markupType 

Removes all instances of acetate markup of the specified type in a given view.

- (void) removeAcetateMarkup: (NSString *)  viewName
markupType: (NSString *)  markupType
instanceId: (PWGuid *)  instanceId 

Removes a specified instance of acetate markup.

Parameters
viewNameThe name of the view from which to remove the markup.
markupTypeThe type of markup to remove.
instanceIdThe unique identifier of the instance.
- (void) removeAcetateMarkup: (NSString *)  viewName
sessionId: (PWGuid *)  sessionId 

Removes all instances of acetate markup for a specified view in a given session.

Parameters
viewNameThe name of the view from which to remove the markup.
sessionIdThe unique identifier of the session from which to remove the markup.
- (void) removeAcetateMarkupWithSessionId: (PWGuid *)  sessionId

Removes all instances of acetate markup for the given session, across all views.

- (void) setMarkupVisible: (PWGuid *)  sessionId
markupVisible: (BOOL)  markupVisible 

Sets a Boolean value that indicates whether acetate markup is visible for the specified session.

- (void) setSessionUserInfo: (PWGuid *)  sessionId
userInfo: (PWXmlElement *)  userInfo 

Sets the user information for the specified session ID.

User information is stored in a UserInfo element in application state, and contains details specific to a given collaboration participant.

- (void) setViewCollaborationInfo: (NSString *)  viewName
xInfo: (PWXmlElement *)  xInfo 

Sets the collaboration information in the session element of application state.

- (PWGuid *) startupAcetateMarkup: (NSString *)  viewName
markupType: (NSString *)  markupType
markup: (PWXmlElement *)  markup
newInstance: (BOOL)  newInstance 

Starts an acetate tool. The specified draw data is placed into the collaboration acetate data for the specified view for the current session. The return value is used to identify the instance to update with markup in the future.

Parameters
viewNameThe name of the view where the markup will be displayed.
markupTypeThe type of markup to display.
markupThe actual markup to display.
newInstanceFor tools that support creating multiple instances of markup, should be set to true; otherwise, the same instance will always be used.
- (void) updateAcetateMarkup: (NSString *)  viewName
markupType: (NSString *)  markupType
instanceId: (PWGuid *)  instanceId
markup: (PWXmlElement *)  markup 

Updates an instance of an acetate tool.

Parameters
viewNameThe name of the view where the markup will be updated.
markupTypeThe type of markup to update.
instanceIdThe unique identifier of the instance to which the update applies.
markupThe actual markup to update.
- (void) updateUserInfo: (NSString *)  key
value: (NSString *)  value 

Updates the user information in the session element of application state.

Properties Descriptions

- (NSArray*) activeSessions
readnonatomicstrong

The list of active sessions.

- (PWColor*) defaultColor
readwritenonatomicstrong

The default color for the collaboration session. This color is used when an acetate tool is active: each participant's cursor or drawing on the view overlay will appear in a different color.

- (PWEventPublisher*) defaultColorChanged
readnonatomicstrong

The event that gets dispatched when the default color changes.

- (PWFramework*) framework
readnonatomicweak

The PWFramework used by this instance of PWCollaborationManager.

- (BOOL) isInitialized
readnonatomicassign

A Boolean value that indicates whether the session is initialized.

- (PWEventPublisher*) isInitializedChanged
readnonatomicstrong

The event that gets dispatched when the initialization status of PWCollaborationManager changes.

- (BOOL) ownCursorVisible
readwritenonatomicassign

A Boolean value that indicates whether the cursor is visible.

- (PWGuid*) ownerSession
readnonatomicunsafe_unretained

The unique identifier of the session currently set as the owner session. By default, the host is the owner of a collaborative session.

- (PWEventPublisher*) ownerSessionChanged
readnonatomicstrong

The event that gets dispatched when the owner session changes. This would happen, for example, whenever a session host joins or leaves the session.

- (PWGuid*) sessionId
readnonatomicstrong

The unique identifier of the collaboration session.

- (PWEventPublisher*) sessionsChanged
readnonatomicstrong

The event that gets dispatched when there is a change to the session element in application state. This would happen, for example, whenever collaboration participants join or leave the session.

- (PWEventPublisher*) updatesAvailable
readnonatomicstrong

The event that gets dispatched when updates are available.

- (PWXmlElement*) userInfo
readwritenonatomicstrong

The content of the UserInfo element for the specified session ID.

UserInfo is an element in application state that stores details specific to a given collaborator. Information is added to this element using the updateUserInfo method.

- (PWEventPublisher*) userInfoChanged
readnonatomicstrong

The event that gets dispatched when the user information changes.