PTCollaborationServerCommunication
@protocol PTCollaborationServerCommunication <NSObject>
The PTCollaborationServer
protocol allows the adopting class to be used for communicating
annotation changes that occur on a shared document.
-
The
PTBaseCollaborationManager
that registered this service implementation in-[PTBaseCollaborationManager registerServerCommunicationComponent:]
.Declaration
Objective-C
@required @property (nonatomic, weak, readwrite, nullable) PTBaseCollaborationManager *collaborationManager;
Swift
weak var collaborationManager: PTBaseCollaborationManager? { get set }
-
The implementation of this method sends the local annotation change to the server. This method is called by
PTBaseCollaborationManager
.Declaration
Objective-C
- (void)localAnnotationAdded: (nonnull PTCollaborationAnnotation *)collaborationAnnotation;
Swift
func localAnnotationAdded(_ collaborationAnnotation: PTCollaborationAnnotation)
Parameters
collaborationAnnotation
an object representing the collaboration annotation.
-
The implementation of this method sends the local annotation change to the server. This method is called by
PTBaseCollaborationManager
.Declaration
Objective-C
- (void)localAnnotationModified: (nonnull PTCollaborationAnnotation *)collaborationAnnotation;
Swift
func localAnnotationModified(_ collaborationAnnotation: PTCollaborationAnnotation)
Parameters
collaborationAnnotation
an object representing the collaboration annotation.
-
The implementation of this method sends the local annotation change to the server. This method is called by
PTBaseCollaborationManager
.Declaration
Objective-C
- (void)localAnnotationRemoved: (nonnull PTCollaborationAnnotation *)collaborationAnnotation;
Swift
func localAnnotationRemoved(_ collaborationAnnotation: PTCollaborationAnnotation)
Parameters
collaborationAnnotation
an object representing the collaboration annotation.
-
This method is called by the local document viewer when it is ready for remote annotations.
The implemention of this method should apply all remotely stored annotations to the local document.
Declaration
Objective-C
- (void)documentLoaded;
Swift
func documentLoaded()
-
The unqiue ID that represents the current user.
Declaration
Objective-C
@required @property (nonatomic, copy, readonly, nullable) NSString *userID;
Swift
var userID: String? { get }
-
The unqiue ID that represents the current document.
Declaration
Objective-C
@required @property (nonatomic, copy, readonly, nullable) NSString *documentID;
Swift
var documentID: String? { get }