Couchbase Lite C
Couchbase Lite C API
Data Fields
CBLReplicatorConfiguration Struct Reference

The configuration of a replicator. More...

#include <cbl/CBLReplicator.h>

Data Fields

CBLDatabase *_cbl_nullable database
 The database to replicate. More...
 
CBLEndpointendpoint
 The address of the other database to replicate with (Required) More...
 
CBLReplicatorType replicatorType
 Push, pull or both. More...
 
bool continuous
 Continuous replication?. More...
 
bool disableAutoPurge
 If auto purge is active, then the library will automatically purge any documents that the replicating user loses access to via the Sync Function on Sync Gateway. More...
 
unsigned maxAttempts
 Max retry attempts where the initial connect to replicate counts toward the given value. More...
 
unsigned maxAttemptWaitTime
 Max wait time between retry attempts in seconds. More...
 
unsigned heartbeat
 The heartbeat interval in seconds. More...
 
CBLAuthenticator *_cbl_nullable authenticator
 Authentication credentials, if needed. More...
 
const CBLProxySettings *_cbl_nullable proxy
 HTTP client proxy settings. More...
 
FLDict _cbl_nullable headers
 Extra HTTP headers to add to the WebSocket request. More...
 
FLSlice pinnedServerCertificate
 An X.509 cert (PEM or DER) to "pin" for TLS connections. More...
 
FLSlice trustedRootCertificates
 Set of anchor certs (PEM format) More...
 
FLArray _cbl_nullable channels
 Optional set of channels to pull from when replicating with the default collection. More...
 
FLArray _cbl_nullable documentIDs
 Optional set of document IDs to replicate when replicating with the default collection. More...
 
CBLReplicationFilter _cbl_nullable pushFilter
 Optional callback to filter which docs are pushed when replicating with the default collection. More...
 
CBLReplicationFilter _cbl_nullable pullFilter
 Optional callback to validate incoming docs when replicating with the default collection. More...
 
CBLConflictResolver _cbl_nullable conflictResolver
 Optional conflict-resolver callback. More...
 
void *_cbl_nullable context
 Arbitrary value that will be passed to callbacks. More...
 
CBLPropertyEncryptor _cbl_nullable propertyEncryptor
 Optional callback to encrypt CBLEncryptable values of the documents in the default collection. More...
 
CBLPropertyDecryptor _cbl_nullable propertyDecryptor
 Optional callback to decrypt encrypted CBLEncryptable values of the documents in the default collection. More...
 
CBLDocumentPropertyEncryptor _cbl_nullable documentPropertyEncryptor
 Optional callback to encrypt CBLEncryptable values. More...
 
CBLDocumentPropertyDecryptor _cbl_nullable documentPropertyDecryptor
 Optional callback to decrypt encrypted CBLEncryptable values. More...
 
CBLReplicationCollection *_cbl_nullable collections
 The collections to replicate with the target's endpoint (Required if the database is not set). More...
 
size_t collectionCount
 The number of collections (Required if the database is not set. More...
 
bool acceptParentDomainCookies
 The option to remove the restriction that does not allow the replicator to save the parent-domain cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP response. More...
 

Detailed Description

The configuration of a replicator.

Field Documentation

◆ acceptParentDomainCookies

bool CBLReplicatorConfiguration::acceptParentDomainCookies

The option to remove the restriction that does not allow the replicator to save the parent-domain cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP response.

For example, when the option is set to true, the cookies whose domain are “.foo.com” returned by “bar.foo.com” host will be permitted to save. This is only recommended if the host issuing the cookie is well trusted.

This option is disabled by default (see kCBLDefaultReplicatorAcceptParentCookies) which means that the parent-domain cookies are not permitted to save by default.

◆ authenticator

CBLAuthenticator* _cbl_nullable CBLReplicatorConfiguration::authenticator

Authentication credentials, if needed.

◆ channels

FLArray _cbl_nullable CBLReplicatorConfiguration::channels

Optional set of channels to pull from when replicating with the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Channels are not supported in Peer-to-Peer and Database-to-Database replication.
Warning
Deprecated : Use CBLReplicationCollection.channels instead.

◆ collectionCount

size_t CBLReplicatorConfiguration::collectionCount

The number of collections (Required if the database is not set.

◆ collections

CBLReplicationCollection* _cbl_nullable CBLReplicatorConfiguration::collections

The collections to replicate with the target's endpoint (Required if the database is not set).

◆ conflictResolver

CBLConflictResolver _cbl_nullable CBLReplicatorConfiguration::conflictResolver

Optional conflict-resolver callback.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use CBLReplicationCollection.conflictResolver instead.

◆ context

void* _cbl_nullable CBLReplicatorConfiguration::context

Arbitrary value that will be passed to callbacks.

◆ continuous

bool CBLReplicatorConfiguration::continuous

Continuous replication?.

The default value is kCBLDefaultReplicatorContinuous.

◆ database

CBLDatabase* _cbl_nullable CBLReplicatorConfiguration::database

The database to replicate.

When setting the database, ONLY the default collection will be used for replication. (Required if collections is not set)

Warning
Deprecated : Use collections instead.

◆ disableAutoPurge

bool CBLReplicatorConfiguration::disableAutoPurge

If auto purge is active, then the library will automatically purge any documents that the replicating user loses access to via the Sync Function on Sync Gateway.

If disableAutoPurge is true, this behavior is disabled and an access removed event will be sent to any document listeners that are active on the replicator. The default value is kCBLDefaultReplicatorDisableAutoPurge.

Note
Auto Purge will not be performed when documentIDs filter is specified.

◆ documentIDs

FLArray _cbl_nullable CBLReplicatorConfiguration::documentIDs

Optional set of document IDs to replicate when replicating with the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use CBLReplicationCollection.documentIDs instead.

◆ documentPropertyDecryptor

CBLDocumentPropertyDecryptor _cbl_nullable CBLReplicatorConfiguration::documentPropertyDecryptor

Optional callback to decrypt encrypted CBLEncryptable values.

◆ documentPropertyEncryptor

CBLDocumentPropertyEncryptor _cbl_nullable CBLReplicatorConfiguration::documentPropertyEncryptor

Optional callback to encrypt CBLEncryptable values.

◆ endpoint

CBLEndpoint* CBLReplicatorConfiguration::endpoint

The address of the other database to replicate with (Required)

◆ headers

FLDict _cbl_nullable CBLReplicatorConfiguration::headers

Extra HTTP headers to add to the WebSocket request.

◆ heartbeat

unsigned CBLReplicatorConfiguration::heartbeat

The heartbeat interval in seconds.

The default value is kCBLDefaultReplicatorHeartbeat.

◆ maxAttempts

unsigned CBLReplicatorConfiguration::maxAttempts

Max retry attempts where the initial connect to replicate counts toward the given value.

The default value is kCBLDefaultReplicatorMaxAttemptsSingleShot for a one-shot replicator and kCBLDefaultReplicatorMaxAttemptsContinuous for a continuous replicator. Specify 1 means there will be no retry after the first attempt.

◆ maxAttemptWaitTime

unsigned CBLReplicatorConfiguration::maxAttemptWaitTime

Max wait time between retry attempts in seconds.

The default value kCBLDefaultReplicatorMaxAttemptsWaitTime.

◆ pinnedServerCertificate

FLSlice CBLReplicatorConfiguration::pinnedServerCertificate

An X.509 cert (PEM or DER) to "pin" for TLS connections.

The pinned cert will be evaluated against any certs in a cert chain, and the cert chain will be valid only if the cert chain contains the pinned cert.

◆ propertyDecryptor

CBLPropertyDecryptor _cbl_nullable CBLReplicatorConfiguration::propertyDecryptor

Optional callback to decrypt encrypted CBLEncryptable values of the documents in the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use documentPropertyDecryptor instead.

◆ propertyEncryptor

CBLPropertyEncryptor _cbl_nullable CBLReplicatorConfiguration::propertyEncryptor

Optional callback to encrypt CBLEncryptable values of the documents in the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use documentPropertyEncryptor instead.

◆ proxy

const CBLProxySettings* _cbl_nullable CBLReplicatorConfiguration::proxy

HTTP client proxy settings.

◆ pullFilter

CBLReplicationFilter _cbl_nullable CBLReplicatorConfiguration::pullFilter

Optional callback to validate incoming docs when replicating with the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use CBLReplicationCollection.pullFilter instead.

◆ pushFilter

CBLReplicationFilter _cbl_nullable CBLReplicatorConfiguration::pushFilter

Optional callback to filter which docs are pushed when replicating with the default collection.

Note
This property can only be used when setting the config object with the database instead of collections.
Warning
Deprecated : Use CBLReplicationCollection.pushFilter instead.

◆ replicatorType

CBLReplicatorType CBLReplicatorConfiguration::replicatorType

Push, pull or both.

The default value is kCBLDefaultReplicatorType.

◆ trustedRootCertificates

FLSlice CBLReplicatorConfiguration::trustedRootCertificates

Set of anchor certs (PEM format)


The documentation for this struct was generated from the following file: