21#include "cbl_config.h"
24#include "CBL_Edition.h"
170#define CBL_REFCOUNTED(TYPE, NAME) \
171 static inline const TYPE CBL##NAME##_Retain(const TYPE _cbl_nullable t) \
172 {return (const TYPE)CBL_Retain((CBLRefCounted*)t);} \
173 static inline void CBL##NAME##_Release(const TYPE _cbl_nullable t) {CBL_Release((CBLRefCounted*)t);}
227#ifdef COUCHBASE_ENTERPRISE
#define CBLAPI
Definition: CBL_Compat.h:104
#define _cbl_nullable
Definition: CBL_Compat.h:92
#define CBL_CAPI_BEGIN
Definition: CBL_Compat.h:105
#define CBL_CAPI_END
Definition: CBL_Compat.h:106
#define CBL_ENUM(_type, _name)
Definition: CBL_Compat.h:62
struct CBLBlob CBLBlob
A binary data value associated with a CBLDocument.
Definition: CBLBase.h:209
struct CBLCollection CBLCollection
A collection, a document container.
Definition: CBLBase.h:194
struct CBLDatabase CBLDatabase
A connection to an open database.
Definition: CBLBase.h:182
struct CBLDocument CBLDocument
An in-memory copy of a document.
Definition: CBLBase.h:203
struct CBLEncryptable CBLEncryptable
An encryptable value.
Definition: CBLBase.h:235
CBLNetworkErrorCode
Network error codes, in the CBLNetworkDomain.
Definition: CBLBase.h:81
CBLErrorDomain
Error domains, serving as namespaces for numeric error codes.
Definition: CBLBase.h:37
FLSliceResult CBLError_Message(const CBLError *_cbl_nullable outError)
Returns a message describing an error.
CBLErrorCode
Couchbase Lite error codes, in the CBLDomain.
Definition: CBLBase.h:47
@ kCBLNetErrTimeout
No response received before timeout.
Definition: CBLBase.h:84
@ kCBLNetErrTLSClientCertRequired
Server requires client to have a TLS certificate.
Definition: CBLBase.h:90
@ kCBLNetErrTooManyRedirects
HTTP redirect loop.
Definition: CBLBase.h:86
@ kCBLNetErrTLSCertNameMismatch
Server cert's name does not match DNS name.
Definition: CBLBase.h:96
@ kCBLNetErrTLSCertExpired
Server's TLS certificate has expired.
Definition: CBLBase.h:88
@ kCBLNetErrTLSCertRevoked
Server's cert has been revoked.
Definition: CBLBase.h:95
@ kCBLNetErrTLSHandshakeFailed
Low-level error establishing TLS.
Definition: CBLBase.h:87
@ kCBLNetErrUnknownHost
DNS server doesn't know the hostname.
Definition: CBLBase.h:83
@ kCBLNetErrTLSCertUntrusted
Cert isn't trusted for other reason.
Definition: CBLBase.h:89
@ kCBLNetErrInvalidURL
Invalid URL.
Definition: CBLBase.h:85
@ kCBLNetErrUnknown
Unknown networking error.
Definition: CBLBase.h:94
@ kCBLNetErrDNSFailure
DNS lookup failed.
Definition: CBLBase.h:82
@ kCBLNetErrTLSCertUnknownRoot
Self-signed cert, or unknown anchor cert.
Definition: CBLBase.h:92
@ kCBLNetErrTLSClientCertRejected
Server rejected my TLS client certificate.
Definition: CBLBase.h:91
@ kCBLNetErrInvalidRedirect
Attempted redirect to invalid URL.
Definition: CBLBase.h:93
@ kCBLWebSocketDomain
code is a WebSocket close code (1000...1015) or HTTP error (300..599)
Definition: CBLBase.h:43
@ kCBLFleeceDomain
code is a Fleece error; see "FleeceException.h"
Definition: CBLBase.h:41
@ kCBLPOSIXDomain
code is a POSIX errno; see "errno.h"
Definition: CBLBase.h:39
@ kCBLDomain
code is a Couchbase Lite error code; see CBLErrorCode
Definition: CBLBase.h:38
@ kCBLSQLiteDomain
code is a SQLite error; see "sqlite3.h"
Definition: CBLBase.h:40
@ kCBLNetworkDomain
code is a network error; see CBLNetworkErrorCode
Definition: CBLBase.h:42
@ kCBLErrorTransactionNotClosed
Database can't be closed while a transaction is open.
Definition: CBLBase.h:65
@ kCBLErrorCantUpgradeDatabase
Definition: CBLBase.h:77
@ kCBLErrorNotOpen
Database/KeyStore/index is not open.
Definition: CBLBase.h:53
@ kCBLErrorAssertionFailed
Internal assertion failure.
Definition: CBLBase.h:48
@ kCBLErrorDatabaseTooNew
Database file format is newer than what I can open.
Definition: CBLBase.h:75
@ kCBLErrorBusy
Database is busy/locked.
Definition: CBLBase.h:63
@ kCBLErrorCrypto
Encryption/decryption error.
Definition: CBLBase.h:69
@ kCBLErrorCorruptData
Data is corrupted.
Definition: CBLBase.h:62
@ kCBLErrorRemoteError
Unknown error from remote server.
Definition: CBLBase.h:73
@ kCBLErrorConflict
Document update conflict.
Definition: CBLBase.h:55
@ kCBLErrorCorruptRevisionData
Revision contains corrupted/unreadable data.
Definition: CBLBase.h:52
@ kCBLErrorUnexpectedError
Definition: CBLBase.h:57
@ kCBLErrorBadDocID
Invalid document ID.
Definition: CBLBase.h:76
@ kCBLErrorNotADatabaseFile
Definition: CBLBase.h:67
@ kCBLErrorUnimplemented
Oops, an unimplemented API call.
Definition: CBLBase.h:49
@ kCBLErrorNotFound
Document not found.
Definition: CBLBase.h:54
@ kCBLErrorDatabaseTooOld
Database file format is older than what I can open.
Definition: CBLBase.h:74
@ kCBLErrorMissingIndex
No such index, or query requires a nonexistent index.
Definition: CBLBase.h:71
@ kCBLErrorCantOpenFile
Internal unexpected C++ exception.
Definition: CBLBase.h:58
@ kCBLErrorBadRevisionID
Invalid revision ID syntax.
Definition: CBLBase.h:51
@ kCBLErrorInvalidQuery
Invalid query.
Definition: CBLBase.h:70
@ kCBLErrorInvalidQueryParam
Unknown query param name, or param number out of range.
Definition: CBLBase.h:72
@ kCBLErrorIOError
File I/O error.
Definition: CBLBase.h:59
@ kCBLErrorNotInTransaction
Function must be called while in a transaction.
Definition: CBLBase.h:64
@ kCBLErrorMemoryError
Memory allocation failed (out of memory?)
Definition: CBLBase.h:60
@ kCBLErrorUnsupportedEncryption
Unsupported encryption algorithm.
Definition: CBLBase.h:50
@ kCBLErrorNotWriteable
File is not writeable.
Definition: CBLBase.h:61
@ kCBLErrorInvalidParameter
Invalid function parameter or struct value.
Definition: CBLBase.h:56
@ kCBLErrorUnsupported
Operation not supported in this database.
Definition: CBLBase.h:66
@ kCBLErrorWrongFormat
File is not a database, or encryption key is wrong.
Definition: CBLBase.h:68
void CBLListener_Remove(CBLListenerToken *_cbl_nullable)
Removes a listener callback, given the token that was returned when it was added.
struct CBLListenerToken CBLListenerToken
An opaque 'cookie' representing a registered listener callback.
Definition: CBLBase.h:271
int64_t CBLTimestamp
A date/time representation used for document expiration (and in date/time queries....
Definition: CBLBase.h:123
CBLTimestamp CBL_Now(void)
Returns the current time, in milliseconds since 1/1/1970.
struct CBLQuery CBLQuery
A compiled database query.
Definition: CBLBase.h:215
struct CBLResultSet CBLResultSet
An iterator over the rows resulting from running a query.
Definition: CBLBase.h:218
struct CBLRefCounted CBLRefCounted
Definition: CBLBase.h:150
void CBL_Release(CBLRefCounted *_cbl_nullable)
Decrements an object's reference-count, freeing the object if the count hits zero.
CBLRefCounted * CBL_Retain(CBLRefCounted *_cbl_nullable)
Increments an object's reference-count.
void CBL_DumpInstances(void)
Logs the class and address of each Couchbase Lite object.
unsigned CBL_InstanceCount(void)
Returns the total number of Couchbase Lite objects.
struct CBLReplicator CBLReplicator
A background task that syncs a CBLDatabase with a remote server or peer.
Definition: CBLBase.h:224
struct CBLScope CBLScope
A collection's scope.
Definition: CBLBase.h:188
A struct holding information about an error.
Definition: CBLBase.h:104
int code
Error code, specific to the domain. 0 always means no error.
Definition: CBLBase.h:106
CBLErrorDomain domain
Domain of errors; a namespace for the code.
Definition: CBLBase.h:105
unsigned internal_info
Definition: CBLBase.h:107
A heap-allocated block of memory returned from an API call.
Definition: FLSlice.h:63