The CSContentSharing object provides access to content sharing related capabilities and actions.
More...
#import <CSContentSharing.h>
Inherits NSObject.
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
- (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
-
handler | A 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
-
participant | Participant whose request is to be denied. |
handler | A 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
-
handler | A 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
-
handler | A 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
-
participant | Participant who is offered remote control. |
handler | A 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
-
handler | A 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 |
|
- (void) resumeWithCompletionHandler: |
|
(void(^)(NSError *error)) |
handler |
|
Resumes content sharing.
It doesn't resume content sharing of another collaboration participant.
- Parameters
-
handler | A 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.
|
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
-
completionHandler | Completion handler for this operation. |
Sends clipboard event.
Client doesn't need to use this method unless custom sharing view is developed.
Sends keyboard event.
Client doesn't need to use this method unless custom sharing view is developed.
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
-
handler | A 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
-
window | NSWindow object which should be scrapped besides main application window |
zOrder | Ordering 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
-
window | CSSharingApplicationWindow which should be shared |
handler | A 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
-
screenId | ID of screen which should be shared. |
handler | 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
-
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
-
screenId | ID of screen which should be shared. |
x | X coordinate of the bottom left corner in pixels. |
y | Y coordinate of the bottom left corner in pixels. |
width | Width of the shared region in pixels. |
height | Height of the shared region in pixels. |
handler | A 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 |
|
|
|
- (void) stopScrapingWindow: |
|
(NSWindow *) |
window |
|
- (NSArray*) availableAppWindows |
|
readnonatomicassign |
- (NSDictionary*) availableDisplays |
|
readnonatomicassign |
Indicates participant who is currently sharing.
Returns nil in case sharing is not active.
The delegate used to handle content sharing related events.
- (BOOL) hasPresenterPrivilege |
|
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 object indicating whether the content sharing supports offering a remote control.
The delegate used to handle remote control related events.
Participant who has remote control over any other collaboration participant.
Nil in case remote control is not active.
CSCapability object indicating whether the content sharing supports requesting for remote control.
CSCapability object indicating whether the content sharing supports remote control.
The documentation for this class was generated from the following file: