Avaya Client Services API Reference (OS X)
Instance Methods | Properties | List of all members
CSContentSharing Class Reference

The CSContentSharing object provides access to content sharing related capabilities and actions. More...

#import <CSContentSharing.h>

Inherits NSObject.

Instance Methods

(void) - startScrapingWindow:withZOrder:
 This method is used during application sharing to start scraping additional window besides main application window. More...
 
(void) - stopScrapingWindow:
 Removes window from which scraping is being performed. More...
 
(void) - stopScrapingAllWindows
 Empties the collection of additional windows which are scrapped besides main application window. More...
 
(void) - startSharingFullScreenWithScreenId:completionHandler:
 Starts sharing full screen. More...
 
(void) - startSharingApplicationWindowWithWindow:completionHandler:
 Starts sharing of an application window. More...
 
(void) - startSharingScreenRegionWithScreenId:posX:posY:width:height:completionHandler:
 Starts sharing of a specified screen region. More...
 
(void) - endWithCompletionHandler:
 Ends content sharing of local user or content sharing of another collaboration participant if local user has sufficient permissions i.e. More...
 
(void) - pauseWithCompletionHandler:
 Pauses content sharing of local user. More...
 
(void) - resumeWithCompletionHandler:
 Resumes content sharing. More...
 
(void) - grantRemoteControlWithParticipant:completionHandler:
 Grants remote control to given participant. More...
 
(void) - denyRemoteControlWithParticipant:completionHandler:
 Denies incoming remote control request of collaboration participant. More...
 
(void) - requestRemoteControlWithCompletionHandler:
 Request remote control from current presenter if sharing is active. More...
 
(void) - declineRemoteControlWithCompletionHandler:
 Decline remote control offer from current presenter for local user. More...
 
(void) - endRemoteControlWithCompletionHandler:
 Ends remote control session. More...
 
(void) - startRemoteControlWithCompletionHandler:
 Starts remote control. More...
 
(void) - sendKeyboardEvent:
 Sends keyboard event. More...
 
(void) - sendMouseEvent:
 Sends mouse event. More...
 
(void) - sendClipboardEvent:
 Sends clipboard event. More...
 
(void) - retrieveRemoteControlParticipantsWithCompletionHandler:
 Obtain the participants that support remote control. More...
 

Properties

id< CSContentSharingDelegatedelegate
 The delegate used to handle content sharing related events. More...
 
CSScreenSharingListenerscreenSharingListener
 Should be created and set by client here and also in the screen sharing view. More...
 
id< CSContentSharingRemoteControlDelegateremoteControlDelegate
 The delegate used to handle remote control related events. More...
 
CSParticipantcurrentPresenter
 Indicates participant who is currently sharing. More...
 
CSCapabilityshareFullScreenCapability
 CSCapability object indicating whether sharing full screen is supported. More...
 
BOOL isSharingFullScreen
 Indicates whether local user is sharing full screen. More...
 
CSCapabilityshareApplicationWindowCapability
 CSCapability object indicating whether sharing application window is supported. More...
 
BOOL isSharingApplicationWindow
 Indicates whether local user is sharing application window. More...
 
CSCapabilitysharedScreenRegionCapability
 CSCapability object indicating whether sharing region of screen is supported. More...
 
BOOL isSharingScreenRegion
 Indicates whether local user is sharing region of screen. More...
 
BOOL hasPresenterPrivilege
 Deprecated since 3.0.50. More...
 
BOOL isPresenting
 Indicates whether local user is sharing. More...
 
CSCapabilitysupportRemoteControlCapability
 CSCapability object indicating whether the content sharing supports remote control. More...
 
CSCapabilityofferRemoteControlCapability
 CSCapability object indicating whether the content sharing supports offering a remote control. More...
 
CSCapabilityrequestRemoteControlCapability
 CSCapability object indicating whether the content sharing supports requesting for remote control. More...
 
BOOL isRemoteControlOn
 Returns true if remote control session is currently started and current user is either presenting or remote-controlling the presenter. More...
 
CSParticipantremoteController
 Participant who has remote control over any other collaboration participant. More...
 
CSContentSharingCapabilitiessharingCapabilities
 CSContentSharingCapabilities object containing set of content sharing capabilities. More...
 
CSSharingApplicationWindowsharedApplicationWindow
 CSharingApplicationWindow object. More...
 
NSDictionary * availableDisplays
 NSDictionary containing objects of CSSharingDisplay. More...
 
NSArray * availableAppWindows
 NSArray containing CSharingApplicationWindow objects which can be shared using content sharing method startSharingApplicationWindowWithWindow:completionHandler:. More...
 
CGRect sharingFrame
 CGRect object which indicates frame of the display which is currently shared. More...
 

Detailed Description

The CSContentSharing object provides access to content sharing related capabilities and actions.

This class is used for receiving and sending content sharing. CSContentSharing object is accessible via CSCollaboration. Status updates concerning content sharing are reported via CSContentSharingDelegate. CSContentSharing caches last frame of received content sharing. It's needed in situation when sharing is started before creating UI elements needed to present it.

See also
CSCollaboration
CSContentSharingDelegate
CSScreenSharingListener
CSOSXScreenSharingView

Method Documentation

- (void) declineRemoteControlWithCompletionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler

Decline remote control offer from current presenter for local user.

Should be invoked after receiving contentSharing:didReceiveRemoteControlOffer: (CSContentSharingRemoteControlDelegate-p).

Parameters
handlerA block to be called when the operation is completed.
  • participant participant The participant whose offer was declined if operation was succesful.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) denyRemoteControlWithParticipant: (CSParticipant *)  participant
completionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler 

Denies incoming remote control request of collaboration participant.

Shoule be invoked after receiving notification contentSharing:didReceiveRemoteControlRequest: (CSContentSharingRemoteControlDelegate-p).

Parameters
participantParticipant whose request is to be denied.
handlerA block to be called when the operation is completed.
  • participant Participant whose request was denied if operation was succesful.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) endRemoteControlWithCompletionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler

Ends remote control session.

Parameters
handlerA block to be called when the operation is completed.
  • participant The local user data.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) endWithCompletionHandler: (void(^)(NSError *error))  handler

Ends content sharing of local user or content sharing of another collaboration participant if local user has sufficient permissions i.e.

is presenter or moderator.

Parameters
handlerA block to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) grantRemoteControlWithParticipant: (CSParticipant *)  participant
completionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler 

Grants remote control to given participant.

Can be also be invoked as response after contentSharing:didReceiveRemoteControlRequest: (CSContentSharingRemoteControlDelegate-p).

Parameters
participantParticipant who is offered remote control.
handlerA block to be called when the operation is completed.
  • participant Particpant granting remote control.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) pauseWithCompletionHandler: (void(^)(NSError *error))  handler

Pauses content sharing of local user.

It doesn't pause content sharing of another collaboration participant.

Parameters
handlerA block to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) requestRemoteControlWithCompletionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler

Request remote control from current presenter if sharing is active.

After presenter response, client is notified with contentSharing:didReceiveRemoteControlDeny: (CSContentSharingRemoteControlDelegate-p) or contentSharing:didReceiveRemoteControlGrant: (CSContentSharingRemoteControlDelegate-p).

Parameters
handlerA block to be called when the operation is completed.
  • participant participant The participant, who request was sent to, if operation was succesful.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) resumeWithCompletionHandler: (void(^)(NSError *error))  handler

Resumes content sharing.

It doesn't resume content sharing of another collaboration participant.

Parameters
handlerA block to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) retrieveRemoteControlParticipantsWithCompletionHandler: (CSRemoteControlParticipantsCompletionHandler completionHandler

Obtain the participants that support remote control.

Before calling the method you need to check that CSContentSharing::supportRemoteControlCapability is in allowed state. Otherwise the method call will fail with appropriate error.

Since there is no collaboration/content sharing event notification about a change of participants, client has to rely on corresponding CSConference events to be notified about participant list changes. Whenever such notification occurs, client must expect that remote control participant list might have changed and this method must be called again, if up to date participant list is to be presented to the user.

See also
CSConference::participants
Parameters
completionHandlerCompletion handler for this operation.
- (void) sendClipboardEvent: (CSClipboardEvent *)  clipboardEvent

Sends clipboard event.

Client doesn't need to use this method unless custom sharing view is developed.

- (void) sendKeyboardEvent: (CSKeyboardEvent *)  keyboardEvent

Sends keyboard event.

Client doesn't need to use this method unless custom sharing view is developed.

- (void) sendMouseEvent: (CSMouseEvent *)  mouseEvent

Sends mouse event.

Client doesn't need to use this method unless custom sharing view is developed.

- (void) startRemoteControlWithCompletionHandler: (void(^)(CSParticipant *participant, NSError *error))  handler

Starts remote control.

Should be called after receiving contentSharing:didReceiveRemoteControlOffer: (CSContentSharingRemoteControlDelegate-p). It doesn't need to be called in situation when local user requests remote control and gets grant for remote control because it's invoked internally by Client SDK.

Parameters
handlerA block to be called when the operation is completed.
  • participant The local user data.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) startScrapingWindow: (NSWindow *)  window
withZOrder: (NSUInteger)  zOrder 

This method is used during application sharing to start scraping additional window besides main application window.

To start sharing application window use startSharingApplicationWindowWithWindow:completionHandler:. Should be used solely during sharing application window, doesn't work without application sharing started and doesn't start application sharing. Method should be used to add custom client windows which are supposed to overlay shared application window. Windows which are added via this method, but doesn't overlay main shared application window, aren't shared. Windows added with this function should be removed with stopScrapingWindow: or stopScrapingAllWindows.

Parameters
windowNSWindow object which should be scrapped besides main application window
zOrderOrdering of overlapping scraped window images. A window with a higher z-order value than another window appears on the foreground and may hide a portion of, or entire window with the lower z-order.
See also
- startSharingApplicationWindowWithWindow:completionHandler:
- stopScrapingWindow:
- stopScrapingAllWindows
- (void) startSharingApplicationWindowWithWindow: (CSSharingApplicationWindow *)  window
completionHandler: (void(^)(NSError *error))  handler 

Starts sharing of an application window.

You don't need to stop another sharing before using it. When this method is used while sharing is received, sharing of another participant will be stopped if local user have sufficient permissions (local user is moderator or presenter). Application windows possible to share can be obtained by CSContentSharing::availableAppWindows.

Note
So as to make it possibile to share minimised application and bring application to front when sharing is started accessibility API needs to be used. Because of it, when starting sharing application, alert is shown. User can allow application to control computer in system preferences or deny it. Alert is shown asynchronously.
Parameters
windowCSSharingApplicationWindow which should be shared
handlerA block to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
See also
availableAppWindows
CSSharingApplicationWindow
- (void) startSharingFullScreenWithScreenId: (NSInteger)  screenId
completionHandler: (void(^)(NSError *error))  handler 

Starts sharing full screen.

You don't need to stop another sharing before using it. When this method is used while sharing is received, sharing of another participant will be stopped if local user have sufficient permissions (local user is moderator or presenter). Screens possible to share can be obtained using CSContentSharing::availableDisplays.

Parameters
screenIdID of screen which should be shared.
handlerBlock to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
See also
availableDisplays
CSSharingDisplay
- (void) startSharingScreenRegionWithScreenId: (NSInteger)  screenId
posX: (NSInteger)  x
posY: (NSInteger)  y
width: (NSInteger)  width
height: (NSInteger)  height
completionHandler: (void(^)(NSError *error))  handler 

Starts sharing of a specified screen region.

You don't need to stop another sharing before using it. When this method is used while sharing is received, sharing of another participant will be stopped if local user have sufficient permissions (local user is moderator or presenter). Screens possible to share can be obtained using CSContentSharing::availableDisplays. Sharing coordinates are relative to given screenId.

Parameters
screenIdID of screen which should be shared.
xX coordinate of the bottom left corner in pixels.
yY coordinate of the bottom left corner in pixels.
widthWidth of the shared region in pixels.
heightHeight of the shared region in pixels.
handlerA block to be called when the operation is completed.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
See also
availableDisplays
- (void) stopScrapingAllWindows

Empties the collection of additional windows which are scrapped besides main application window.

It doesn't stop application sharing, it doesn't remove main application window from scraping and it doesn't stop sharing application window. It should be used solely during sharing application window.

See also
- startScrapingWindow:withZOrder:
- startSharingApplicationWindowWithWindow:completionHandler:
- stopScrapingWindow:
- (void) stopScrapingWindow: (NSWindow *)  window

Removes window from which scraping is being performed.

It doesn't stop application window sharing. You can't remove the main application window form scraping via this method. It should be used solely during sharing application window.

Parameters
windowWindow object
See also
- startSharingApplicationWindowWithWindow:completionHandler:
- startScrapingWindow:withZOrder:
- stopScrapingAllWindows

Property Documentation

- (NSArray*) availableAppWindows
readnonatomicassign

NSArray containing CSharingApplicationWindow objects which can be shared using content sharing method startSharingApplicationWindowWithWindow:completionHandler:.

Array contains also windows of client application which can be filtered out using NSWindow::windowNumber and CSSharingApplicationWindow::winId.

See also
- startSharingApplicationWindowWithWindow:completionHandler:
CSSharingApplicationWindow
- (NSDictionary*) availableDisplays
readnonatomicassign

NSDictionary containing objects of CSSharingDisplay.

Each CSSharingDisplay can be shared using content sharing method startSharingFullScreenWithScreenId:completionHandler:. Display IDs are keys of this dictionary.

See also
- startSharingFullScreenWithScreenId:completionHandler:
CSSharingDisplay
- (CSParticipant*) currentPresenter
readnonatomicassign

Indicates participant who is currently sharing.

Returns nil in case sharing is not active.

- (id<CSContentSharingDelegate>) delegate
readwritenonatomicweak

The delegate used to handle content sharing related events.

- (BOOL) hasPresenterPrivilege
readnonatomicassign

Deprecated since 3.0.50.

Please use CSCollaboration property.

See also
CSCollaboration::hasPresenterPrivilege
- (BOOL) isPresenting
readnonatomicassign

Indicates whether local user is sharing.

- (BOOL) isRemoteControlOn
readnonatomicassign

Returns true if remote control session is currently started and current user is either presenting or remote-controlling the presenter.

- (BOOL) isSharingApplicationWindow
readnonatomicassign

Indicates whether local user is sharing application window.

- (BOOL) isSharingFullScreen
readnonatomicassign

Indicates whether local user is sharing full screen.

- (BOOL) isSharingScreenRegion
readnonatomicassign

Indicates whether local user is sharing region of screen.

- (CSCapability*) offerRemoteControlCapability
readnonatomicassign

CSCapability object indicating whether the content sharing supports offering a remote control.

- (id<CSContentSharingRemoteControlDelegate>) remoteControlDelegate
readwritenonatomicweak

The delegate used to handle remote control related events.

- (CSParticipant*) remoteController
readnonatomicassign

Participant who has remote control over any other collaboration participant.

Nil in case remote control is not active.

- (CSCapability*) requestRemoteControlCapability
readnonatomicassign

CSCapability object indicating whether the content sharing supports requesting for remote control.

- (CSScreenSharingListener*) screenSharingListener
readwritenonatomicstrong

Should be created and set by client here and also in the screen sharing view.

See also
CSContentSharingDelegate
CSOSXScreenSharingView
- (CSCapability*) shareApplicationWindowCapability
readnonatomicassign

CSCapability object indicating whether sharing application window is supported.

See also
CSCollaboration::contentSharingCapability
- (CSSharingApplicationWindow*) sharedApplicationWindow
readnonatomicassign

CSharingApplicationWindow object.

During application sharing it's object of currently shared application window. Otherwise, it's not guaranteed that this object is valid.

See also
availableAppWindows
- startSharingApplicationWindowWithWindow:completionHandler:
- (CSCapability*) sharedScreenRegionCapability
readnonatomicassign

CSCapability object indicating whether sharing region of screen is supported.

See also
CSCollaboration::contentSharingCapability
- (CSCapability*) shareFullScreenCapability
readnonatomicassign

CSCapability object indicating whether sharing full screen is supported.

See also
CSCollaboration::contentSharingCapability
- (CSContentSharingCapabilities*) sharingCapabilities
readnonatomicassign

CSContentSharingCapabilities object containing set of content sharing capabilities.

- (CGRect) sharingFrame
readnonatomicassign

CGRect object which indicates frame of the display which is currently shared.

For example, in case of sharing application window, CGRect is frame of shared window. Change of this property is notified by contentSharing:didChangeSharingFrame: (CSContentSharingDelegate-p). When sharing is not active, it's not guaranteed that this object is valid.

See also
- contentSharing:didChangeSharingFrame: (CSContentSharingDelegate-p)
- (CSCapability*) supportRemoteControlCapability
readnonatomicassign

CSCapability object indicating whether the content sharing supports remote control.


The documentation for this class was generated from the following file: