16 typedef NS_ENUM(
unsigned, CBLReplicationStatus) {
17 kCBLReplicationStopped,
18 kCBLReplicationOffline,
29 uint64_t contentLength,
44 @property (nonatomic, readonly) BOOL
pull;
47 #pragma mark - OPTIONS: 96 #pragma mark - AUTHENTICATION: 109 @property (nonatomic, readonly) NSString*
username;
131 - (void) setCookieNamed: (NSString*)name
132 withValue: (NSString*)value
134 expirationDate: (
nullable NSDate*)expirationDate
135 secure: (BOOL)secure;
138 - (void) deleteCookieNamed: (NSString *)name;
142 - (BOOL) clearAuthenticationStores: (NSError**)outError;
150 + (void) setAnchorCerts: (
nullable NSArray*)certs onlyThese: (BOOL)onlyThese;
156 #pragma mark - STATUS: 180 @property (nonatomic, readonly) CBLReplicationStatus
status;
196 #pragma mark - PENDING DOCUMENTS (PUSH ONLY): 211 #pragma mark - ATTACHMENT DOWNLOADING (PULL ONLY) 219 - (NSProgress*) downloadAttachment: (
CBLAttachment*)attachment;
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
NSError * lastError
The error status of the replication, or nil if there have not been any errors since it started...
Definition: CBLReplication.h:188
BOOL downloadsAttachments
Should attachments be downloaded automatically along with documents? Defaults to YES; if you set it t...
Definition: CBLReplication.h:80
bool continuous
Should the replication operate continuously? (Defaults to NO).
Definition: CBLReplication.h:56
A CouchbaseLite database.
Definition: CBLDatabase.h:38
void stop()
Stops replication, asynchronously.
CBLJSONDict * customProperties
An optional JSON-compatible dictionary of extra properties for the replicator.
Definition: CBLReplication.h:93
#define nullable
Definition: CBLBase.h:22
unsigned completedChangesCount
The number of completed changes processed, if the task is active, else 0 (observable).
Definition: CBLReplication.h:191
CBLJSONDict * OAuth
OAuth parameters that the replicator should use when authenticating to the remote database...
Definition: CBLReplication.h:114
CBLReplicationStatus status
The replication's current state, one of {stopped, offline, idle, active}.
Definition: CBLReplication.h:180
NSSet * pendingDocumentIDs
The IDs of documents that have local changes that have not yet been pushed to the server by this repl...
Definition: CBLReplication.h:203
A CouchbaseLite document (as opposed to any specific revision of it.)
Definition: CBLDocument.h:16
void start()
Starts the replication, asynchronously.
NSString * network
Specifies which class of network the replication will operate over.
Definition: CBLReplication.h:90
NSURLCredential * credential
The credential (generally username+password) to use to authenticate to the remote database...
Definition: CBLReplication.h:106
SecCertificateRef serverCertificate
The server's SSL certificate.
Definition: CBLReplication.h:154
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
NSURL * personaOrigin
The base URL of the remote server, for use as the "origin" parameter when requesting Persona or Faceb...
Definition: CBLReplication.h:118
BOOL createTarget
Should the target database be created if it doesn't already exist? (Defaults to NO).
Definition: CBLReplication.h:50
NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(unsigned, CBLReplicationStatus)
Describes the current status of a replication.
Definition: CBLReplication.h:16
NSString * filter
Name of an optional filter function to run on the source server.
Definition: CBLReplication.h:62
void(^ CBLAttachmentProgressBlock)(uint64_t bytesRead, uint64_t contentLength, NSError *error)
Callback for notifying progress downloading an attachment.
Definition: CBLReplication.h:28
The CBLAuthenticator class provides factory methods for creating authenticator objects, for use with the .authenticator property of a CBLReplication.
Definition: CBLAuthenticator.h:25
NSString * username
The server user name that the authenticator has logged in as, if known.
Definition: CBLReplication.h:109
CBLJSONDict * filterParams
Parameters to pass to the filter function.
Definition: CBLReplication.h:66
NSString *const kCBLProgressErrorKey
NSProgress userInfo key used to report an NSError when an attachment download fails.
void restart()
Restarts a running replication.
BOOL suspended
Suspends/resumes a replication.
Definition: CBLReplication.h:177
NSString *const kCBLReplicationChangeNotification
This notification is posted by a CBLReplication when any of these properties change: {status...
CBLDictOf(NSString *, NSString *) *headers
Extra HTTP headers to send in all requests to the remote server.
instancetype NS_UNAVAILABLE()
CBLDatabase * localDatabase
The local database being replicated to/from.
Definition: CBLReplication.h:38
id< CBLAuthenticator > authenticator
An object that knows how to authenticate with a remote server.
Definition: CBLReplication.h:101
CBLArrayOf(NSString *) *channels
List of Sync Gateway channel names to filter by; a nil value means no filtering, i.e.
A binary attachment to a document revision.
Definition: CBLAttachment.h:18
BOOL running
YES while the replication is running, NO if it's stopped.
Definition: CBLReplication.h:185
A 'push' or 'pull' replication between a local and a remote database.
Definition: CBLReplication.h:35
BOOL pull
Does the replication pull from (as opposed to push to) the target?
Definition: CBLReplication.h:44
NSURL * remoteURL
The URL of the remote database.
Definition: CBLReplication.h:41
unsigned changesCount
The total number of changes to be processed, if the task is active, else 0 (observable).
Definition: CBLReplication.h:194