PTCollaborationServerCommunication

@protocol PTCollaborationServerCommunication <NSObject>

The PTCollaborationServer protocol allows the adopting class to be used for communicating annotation changes that occur on a shared document.

  • Declaration

    Objective-C

    @required
    @property (readwrite, nonatomic, nullable)
        PTCollaborationManager *collaborationManager;

    Swift

    weak var collaborationManager: PTCollaborationManager? { get set }
  • The implementation of this method sends the local annotation change to the server. This method is called by PTCollaborationManager.

    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 PTCollaborationManager.

    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 PTCollaborationManager.

    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 applies 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 (readonly, copy, nonatomic, nullable) NSString *userID;

    Swift

    var userID: String? { get }
  • The unqiue ID that represents the current document.

    Declaration

    Objective-C

    @required
    @property (readonly, copy, nonatomic, nullable) NSString *documentID;

    Swift

    var documentID: String? { get }