25# include "c4EnumUtil.hh"
34#define LITECORE_VERSION 30100
37#define LITECORE_API_VERSION 352
58#define C4STR(STR) FLSTR(STR)
59#define kC4SliceNull kFLSliceNull
65#pragma mark - COMMON TYPES:
85enum class C4Timestamp : int64_t { None = 0, Error = -1 };
131#ifndef C4_STRICT_COLLECTION_API
187#pragma mark - REFERENCE COUNTING:
300#define kC4EnvironmentTimezoneKey "tz"
301#define kC4EnvironmentSupportedLocales "supported_locales"
#define NODISCARD
Definition CompilerSupport.h:59
#define CBL_CORE_API
Definition c4Compat.h:134
#define C4NULLABLE
Definition c4Compat.h:38
#define C4API
Definition c4Compat.h:114
#define C4_ASSUME_NONNULL_BEGIN
Definition c4Compat.h:36
#define C4API_END_DECLS
Definition c4Compat.h:116
#define C4INLINE
Definition c4Compat.h:19
#define C4API_BEGIN_DECLS
Definition c4Compat.h:115
#define C4_ASSUME_NONNULL_END
Definition c4Compat.h:37
CBL_CORE_API void c4listener_free(C4Listener *)
Closes and disposes a listener.
struct C4ReadStream C4ReadStream
An open stream for reading data from a blob.
Definition c4Base.h:172
C4Slice C4String
Definition c4Base.h:52
struct C4Index C4Index
Represents an existing index.
Definition c4Base.h:148
static void c4db_release(C4Database *r)
Definition c4Base.h:227
CBL_CORE_API void c4_dumpInstances(void)
Logs information about object in memory.
CBL_CORE_API void c4raw_free(C4RawDocument *)
Frees the storage occupied by a raw document.
static void c4index_release(C4Index *i)
Definition c4Base.h:229
CBL_CORE_API void c4docobs_free(C4DocumentObserver *)
static bool c4SliceEqual(C4Slice a, C4Slice b)
Definition c4Base.h:61
struct C4BlobStore C4BlobStore
Opaque handle for an object that manages storage of blobs.
Definition c4Base.h:120
static C4IndexUpdater * c4indexupdater_retain(C4IndexUpdater *r)
Definition c4Base.h:207
static C4Cert * c4cert_retain(C4Cert *r)
Definition c4Base.h:195
struct C4WriteStream C4WriteStream
An open stream for writing data to a blob.
Definition c4Base.h:184
static C4Collection * c4coll_retain(C4Collection *r)
Definition c4Base.h:197
C4HeapSlice C4HeapString
Definition c4Base.h:53
int64_t C4Timestamp
A date/time representation used for document expiration (and in date/time queries....
Definition c4Base.h:96
static void c4slice_free(C4SliceResult s)
Definition c4Base.h:63
CBL_CORE_API C4Socket * c4socket_retain(C4Socket *)
struct C4DocEnumerator C4DocEnumerator
Opaque handle to a document enumerator.
Definition c4Base.h:145
static void c4query_release(C4Query *r)
Definition c4Base.h:236
struct C4Listener C4Listener
A LiteCore network listener – supports the REST API, replication, or both.
Definition c4Base.h:157
struct C4Query C4Query
Opaque handle to a compiled query.
Definition c4Base.h:160
uint64_t C4SequenceNumber
A database sequence number, representing the order in which a revision was created.
Definition c4Base.h:91
CBL_CORE_API C4QueryEnumerator * c4queryenum_retain(C4QueryEnumerator *)
struct C4CollectionObserver C4CollectionObserver
A collection-observer reference.
Definition c4Base.h:129
struct C4Replicator C4Replicator
Opaque reference to a replicator.
Definition c4Base.h:175
CBL_CORE_API int c4_getObjectCount(void)
Returns the number of objects that have been created but not yet freed.
CBL_CORE_API void c4dbobs_free(C4CollectionObserver *)
FLSliceResult C4SliceResult
Definition c4Base.h:51
CBL_CORE_API void c4stream_closeWriter(C4WriteStream *)
Closes a blob write-stream.
CBL_CORE_API void c4stream_close(C4ReadStream *)
Closes a read-stream.
struct C4QueryObserver C4QueryObserver
A query-observer reference.
Definition c4Base.h:166
struct C4DocumentObserver C4DocumentObserver
A document-observer reference.
Definition c4Base.h:142
static C4Index * c4index_retain(C4Index *r)
Definition c4Base.h:205
C4SliceResult C4StringResult
Definition c4Base.h:54
static void c4coll_release(C4Collection *r)
Definition c4Base.h:224
CBL_CORE_API void c4queryenum_release(C4QueryEnumerator *)
struct C4IndexUpdater C4IndexUpdater
Describes a set of index values that need to be computed by the application.
Definition c4Base.h:151
static C4KeyPair * c4keypair_retain(C4KeyPair *r)
Definition c4Base.h:211
static void c4keypair_release(C4KeyPair *r)
Definition c4Base.h:233
struct C4KeyPair C4KeyPair
An asymmetric key or key-pair (RSA, etc.) The private key may or may not be present.
Definition c4Base.h:154
CBL_CORE_API void c4queryobs_free(C4QueryObserver *)
static void c4indexupdater_release(C4IndexUpdater *u)
Definition c4Base.h:231
CBL_CORE_API void c4doc_release(C4Document *)
static C4Database * c4db_retain(C4Database *r)
Definition c4Base.h:201
FLSlice C4Slice
Definition c4Base.h:49
CBL_CORE_API void c4enum_free(C4DocEnumerator *)
struct C4Collection C4Collection
Opaque handle to a namespace of documents in an opened database.
Definition c4Base.h:126
C4CollectionObserver C4DatabaseObserver
Definition c4Base.h:132
static C4INLINE C4Slice c4str(const char *str)
Definition c4Base.h:56
struct C4Database C4Database
Opaque handle to an opened database.
Definition c4Base.h:136
static void c4cert_release(C4Cert *r)
Definition c4Base.h:221
struct C4Socket C4Socket
Represents an open bidirectional stream of bytes or messages (typically a TCP socket....
Definition c4Base.h:178
CBL_CORE_API void c4base_release(void *obj)
CBL_CORE_API void c4repl_free(C4Replicator *)
Frees a replicator reference.
FLHeapSlice C4HeapSlice
Definition c4Base.h:50
CBL_CORE_API C4Document * c4doc_retain(C4Document *)
static C4Query * c4query_retain(C4Query *r)
Definition c4Base.h:215
struct C4Cert C4Cert
An X.509 certificate, or certificate signing request (CSR).
Definition c4Base.h:123
CBL_CORE_API void * c4base_retain(void *obj)
CBL_CORE_API void c4socket_release(C4Socket *)
static void FLSliceResult_Release(FLSliceResult s)
Decrements the ref-count of a FLSliceResult, freeing its memory if it reached zero.
Definition FLSlice.h:183
FLEECE_PUBLIC bool FLSlice_Equal(FLSlice a, FLSlice b) FLPURE
Equality test of two slices.
static FLSlice FLStr(const char *FL_NULLABLE str)
Returns a slice pointing to the contents of a C string.
Definition FLSlice.h:126
CBL_CORE_API C4Timestamp c4_now(void)
Returns the current time, in milliseconds since 1/1/1970.
CBL_CORE_API C4StringResult c4_getVersion(void)
A short version string.
C4SliceResult c4_getEnvironmentInfo(void)
Returns information about LiteCore's view of the environment in the following format:
NODISCARD CBL_CORE_API bool c4_setTempDir(C4String path, C4Error *err)
Wiring call for platforms without discoverable temporary directories.
CBL_CORE_API C4StringResult c4_getBuildInfo(void)
A string describing the version of LiteCore.
CBL_CORE_API void c4_runAsyncTask(void(*task)(void *), void *context)
Schedules a function to be called asynchronously on a background thread.
A simple parsed-URL type.
Definition c4ReplicatorTypes.h:56
A unique identifier of a blob based on a SHA-1 digest of its contents.
Definition c4BlobStoreTypes.h:33
Describes a version-controlled document.
Definition c4DocumentStruct.h:32
An error value.
Definition c4Error.h:133
A query result enumerator.
Definition c4QueryTypes.h:54
Contents of a raw document.
Definition c4DatabaseTypes.h:149
A group of callbacks that define the implementation of sockets; the client must fill this out and pas...
Definition c4SocketTypes.h:59
A simple reference to a block of memory.
Definition FLSlice.h:45
A heap-allocated block of memory returned from an API call.
Definition FLSlice.h:63