Couchbase Lite C
Couchbase Lite C API
Data Structures | Macros | Typedefs | Enumerations | Functions
CBLBase.h File Reference
#include "CBL_Edition.h"
#include "CBL_Compat.h"
#include "fleece/Fleece.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  CBLError
 A struct holding information about an error. More...
 

Macros

#define CBL_REFCOUNTED(TYPE, NAME)
 

Typedefs

typedef int64_t CBLTimestamp
 A date/time representation used for document expiration (and in date/time queries.) Measured in milliseconds since the Unix epoch (1/1/1970, midnight UTC.) More...
 
typedef struct CBLRefCounted CBLRefCounted
 
typedef struct CBLDatabase CBLDatabase
 A connection to an open database. More...
 
typedef struct CBLScope CBLScope
 A collection's scope. More...
 
typedef struct CBLCollection CBLCollection
 A collection, a document container. More...
 
typedef struct CBLDocument CBLDocument
 An in-memory copy of a document. More...
 
typedef struct CBLBlob CBLBlob
 A binary data value associated with a CBLDocument. More...
 
typedef struct CBLQuery CBLQuery
 A compiled database query. More...
 
typedef struct CBLResultSet CBLResultSet
 An iterator over the rows resulting from running a query. More...
 
typedef struct CBLReplicator CBLReplicator
 A background task that syncs a CBLDatabase with a remote server or peer. More...
 
typedef struct CBLEncryptable CBLEncryptable
 An encryptable value. More...
 
typedef struct CBLListenerToken CBLListenerToken
 An opaque 'cookie' representing a registered listener callback. More...
 

Enumerations

enum  CBLErrorDomain : uint8_t {
  kCBLDomain = 1 , kCBLPOSIXDomain , kCBLSQLiteDomain , kCBLFleeceDomain ,
  kCBLNetworkDomain , kCBLWebSocketDomain
}
 Error domains, serving as namespaces for numeric error codes. More...
 
enum  CBLErrorCode : int32_t {
  kCBLErrorAssertionFailed = 1 , kCBLErrorUnimplemented , kCBLErrorUnsupportedEncryption , kCBLErrorBadRevisionID ,
  kCBLErrorCorruptRevisionData , kCBLErrorNotOpen , kCBLErrorNotFound , kCBLErrorConflict ,
  kCBLErrorInvalidParameter , kCBLErrorUnexpectedError , kCBLErrorCantOpenFile , kCBLErrorIOError ,
  kCBLErrorMemoryError , kCBLErrorNotWriteable , kCBLErrorCorruptData , kCBLErrorBusy ,
  kCBLErrorNotInTransaction , kCBLErrorTransactionNotClosed , kCBLErrorUnsupported , kCBLErrorNotADatabaseFile ,
  kCBLErrorWrongFormat , kCBLErrorCrypto , kCBLErrorInvalidQuery , kCBLErrorMissingIndex ,
  kCBLErrorInvalidQueryParam , kCBLErrorRemoteError , kCBLErrorDatabaseTooOld , kCBLErrorDatabaseTooNew ,
  kCBLErrorBadDocID , kCBLErrorCantUpgradeDatabase
}
 Couchbase Lite error codes, in the CBLDomain. More...
 
enum  CBLNetworkErrorCode : int32_t {
  kCBLNetErrDNSFailure = 1 , kCBLNetErrUnknownHost , kCBLNetErrTimeout , kCBLNetErrInvalidURL ,
  kCBLNetErrTooManyRedirects , kCBLNetErrTLSHandshakeFailed , kCBLNetErrTLSCertExpired , kCBLNetErrTLSCertUntrusted ,
  kCBLNetErrTLSClientCertRequired , kCBLNetErrTLSClientCertRejected , kCBLNetErrTLSCertUnknownRoot , kCBLNetErrInvalidRedirect ,
  kCBLNetErrUnknown , kCBLNetErrTLSCertRevoked , kCBLNetErrTLSCertNameMismatch
}
 Network error codes, in the CBLNetworkDomain. More...
 

Functions

FLSliceResult CBLError_Message (const CBLError *_cbl_nullable outError)
 Returns a message describing an error. More...
 
CBLTimestamp CBL_Now (void)
 Returns the current time, in milliseconds since 1/1/1970. More...
 
CBLRefCountedCBL_Retain (CBLRefCounted *_cbl_nullable)
 Increments an object's reference-count. More...
 
void CBL_Release (CBLRefCounted *_cbl_nullable)
 Decrements an object's reference-count, freeing the object if the count hits zero. More...
 
unsigned CBL_InstanceCount (void)
 Returns the total number of Couchbase Lite objects. More...
 
void CBL_DumpInstances (void)
 Logs the class and address of each Couchbase Lite object. More...
 
void CBLListener_Remove (CBLListenerToken *_cbl_nullable)
 Removes a listener callback, given the token that was returned when it was added. More...