Couchbase Lite
Objective-C API for iOS and Mac OS
CBLReplication.h File Reference
#import "CBLBase.h"

Go to the source code of this file.

Classes

class  CBLReplication
 A 'push' or 'pull' replication between a local and a remote database. More...
 

Typedefs

typedef void(^ CBLAttachmentProgressBlock) (uint64_t bytesRead, uint64_t contentLength, NSError *error)
 Callback for notifying progress downloading an attachment. More...
 

Functions

NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM (unsigned, CBLReplicationStatus)
 Describes the current status of a replication. More...
 

Variables

NSString *const kCBLReplicationChangeNotification
 This notification is posted by a CBLReplication when any of these properties change: {status, running, error, completed, total}. More...
 
NSString *const kCBLProgressErrorKey
 NSProgress userInfo key used to report an NSError when an attachment download fails. More...
 

Typedef Documentation

◆ CBLAttachmentProgressBlock

typedef void(^ CBLAttachmentProgressBlock) (uint64_t bytesRead, uint64_t contentLength, NSError *error)

Callback for notifying progress downloading an attachment.

bytesRead is the number of bytes received so far and contentLength is the total number of bytes to read. The download is complete when bytesRead == contentLength. If an error occurs, error will be non-nil.

Function Documentation

◆ NS_ENUM()

NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM ( unsigned  ,
CBLReplicationStatus   
)

Describes the current status of a replication.

< The replication is finished or hit a fatal error.


< The remote host is currently unreachable.

< Continuous replication is caught up and waiting for more changes.

< The replication is actively transferring data.

Variable Documentation

◆ kCBLReplicationChangeNotification

NSString* const kCBLReplicationChangeNotification

This notification is posted by a CBLReplication when any of these properties change: {status, running, error, completed, total}.

It's often more convenient to observe this notification rather than observing each property individually.

◆ kCBLProgressErrorKey

NSString* const kCBLProgressErrorKey

NSProgress userInfo key used to report an NSError when an attachment download fails.