24# include "c4EnumUtil.hh"
33#define LITECORE_VERSION 30100
36#define LITECORE_API_VERSION 352
57#define C4STR(STR) FLSTR(STR)
58#define kC4SliceNull kFLSliceNull
64#pragma mark - COMMON TYPES:
84enum class C4Timestamp : int64_t { None = 0, Error = -1 };
130#ifndef C4_STRICT_COLLECTION_API
192#pragma mark - REFERENCE COUNTING:
310#define kC4EnvironmentTimezoneKey "tz"
311#define kC4EnvironmentSupportedLocales "supported_locales"
#define NODISCARD
Definition CompilerSupport.h:63
#define CBL_CORE_API
Definition c4Compat.h:131
#define C4NULLABLE
Definition c4Compat.h:38
#define C4API
Definition c4Compat.h:106
#define C4_ASSUME_NONNULL_BEGIN
Definition c4Compat.h:36
#define C4API_END_DECLS
Definition c4Compat.h:108
#define C4INLINE
Definition c4Compat.h:19
#define C4API_BEGIN_DECLS
Definition c4Compat.h:107
#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:177
C4Slice C4String
Definition c4Base.h:51
bool c4SliceEqual(C4Slice a, C4Slice b)
Definition c4Base.h:60
struct C4Index C4Index
Represents an existing index.
Definition c4Base.h:147
struct C4PeerSync C4PeerSync
A peer-to-peer sync session.
Definition c4Base.h:162
C4KeyPair * c4keypair_retain(C4KeyPair *r)
Definition c4Base.h:214
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.
CBL_CORE_API void c4docobs_free(C4DocumentObserver *)
C4Query * c4query_retain(C4Query *r)
Definition c4Base.h:220
struct C4BlobStore C4BlobStore
Opaque handle for an object that manages storage of blobs.
Definition c4Base.h:119
struct C4WriteStream C4WriteStream
An open stream for writing data to a blob.
Definition c4Base.h:189
C4HeapSlice C4HeapString
Definition c4Base.h:52
int64_t C4Timestamp
A date/time representation used for document expiration (and in date/time queries....
Definition c4Base.h:95
void c4index_release(C4Index *i)
Definition c4Base.h:234
void c4coll_release(C4Collection *r)
Definition c4Base.h:229
CBL_CORE_API C4Socket * c4socket_retain(C4Socket *)
struct C4DocEnumerator C4DocEnumerator
Opaque handle to a document enumerator.
Definition c4Base.h:144
struct C4Listener C4Listener
A LiteCore network listener – supports the REST API, replication, or both.
Definition c4Base.h:156
C4Index * c4index_retain(C4Index *r)
Definition c4Base.h:208
C4Database * c4db_retain(C4Database *r)
Definition c4Base.h:206
struct C4Query C4Query
Opaque handle to a compiled query.
Definition c4Base.h:165
void c4indexupdater_release(C4IndexUpdater *u)
Definition c4Base.h:236
uint64_t C4SequenceNumber
A database sequence number, representing the order in which a revision was created.
Definition c4Base.h:90
CBL_CORE_API C4QueryEnumerator * c4queryenum_retain(C4QueryEnumerator *)
struct C4CollectionObserver C4CollectionObserver
A collection-observer reference.
Definition c4Base.h:128
struct C4Replicator C4Replicator
Opaque reference to a replicator.
Definition c4Base.h:180
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 *)
void c4query_release(C4Query *r)
Definition c4Base.h:244
FLSliceResult C4SliceResult
Definition c4Base.h:50
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:171
C4Cert * c4cert_retain(C4Cert *r)
Definition c4Base.h:200
struct C4DocumentObserver C4DocumentObserver
A document-observer reference.
Definition c4Base.h:141
void c4logobserver_release(C4LogObserver *r)
Definition c4Base.h:241
struct C4LogObserver C4LogObserver
Opaque handle to a registered logging observer.
Definition c4Base.h:159
C4SliceResult C4StringResult
Definition c4Base.h:53
CBL_CORE_API void c4queryenum_release(C4QueryEnumerator *)
CBL_CORE_API void c4peersync_free(C4PeerSync *)
Disposes a C4PeerSync.
struct C4IndexUpdater C4IndexUpdater
Describes a set of index values that need to be computed by the application.
Definition c4Base.h:150
C4IndexUpdater * c4indexupdater_retain(C4IndexUpdater *r)
Definition c4Base.h:210
struct C4KeyPair C4KeyPair
An asymmetric key or key-pair (RSA, etc.) The private key may or may not be present.
Definition c4Base.h:153
CBL_CORE_API void c4queryobs_free(C4QueryObserver *)
CBL_CORE_API void c4doc_release(C4Document *)
C4Collection * c4coll_retain(C4Collection *r)
Definition c4Base.h:202
FLSlice C4Slice
Definition c4Base.h:48
CBL_CORE_API void c4enum_free(C4DocEnumerator *)
void c4slice_free(C4SliceResult s)
Definition c4Base.h:62
C4LogObserver * c4logobserver_retain(C4LogObserver *r)
Definition c4Base.h:216
void c4db_release(C4Database *r)
Definition c4Base.h:232
struct C4Collection C4Collection
Opaque handle to a namespace of documents in an opened database.
Definition c4Base.h:125
C4CollectionObserver C4DatabaseObserver
Definition c4Base.h:131
void c4keypair_release(C4KeyPair *r)
Definition c4Base.h:238
static C4INLINE C4Slice c4str(const char *str)
Definition c4Base.h:55
struct C4Database C4Database
Opaque handle to an opened database.
Definition c4Base.h:135
struct C4Socket C4Socket
Represents an open bidirectional stream of bytes or messages (typically a TCP socket....
Definition c4Base.h:183
CBL_CORE_API void c4base_release(void *obj)
CBL_CORE_API void c4repl_free(C4Replicator *)
Frees a replicator reference.
FLHeapSlice C4HeapSlice
Definition c4Base.h:49
CBL_CORE_API C4Document * c4doc_retain(C4Document *)
struct C4Cert C4Cert
An X.509 certificate, or certificate signing request (CSR).
Definition c4Base.h:122
void c4cert_release(C4Cert *r)
Definition c4Base.h:226
CBL_CORE_API void * c4base_retain(void *obj)
CBL_CORE_API void c4socket_release(C4Socket *)
FLSlice FLStr(const char *FL_NULLABLE str LIFETIMEBOUND)
Returns a slice pointing to the contents of a C string.
Definition FLSlice.h:132
FLEECE_PUBLIC bool FLSlice_Equal(FLSlice a, FLSlice b) FLPURE
Equality test of two slices.
void FLSliceResult_Release(FLSliceResult s)
Decrements the ref-count of a FLSliceResult, freeing its memory if it reached zero.
Definition FLSlice.h:189
FLSlice FLHeapSlice
A heap-allocated, reference-counted slice.
Definition FLSlice.h:93
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:57
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:151
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:66