LiteCore
Couchbase Lite cross-platform core implementation
Loading...
Searching...
No Matches
c4Base.h File Reference
#include "c4Compat.h"
#include "c4Error.h"
#include "c4Log.h"
#include "fleece/FLSlice.h"
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  C4ExtraInfo
 Client-defined metadata that can be associated with some objects like C4Database. More...
 

Macros

#define LITECORE_VERSION   30100
 
#define LITECORE_API_VERSION   352
 
#define C4STR(STR)   FLSTR(STR)
 
#define kC4SliceNull   kFLSliceNull
 
#define kC4EnvironmentTimezoneKey   "tz"
 
#define kC4EnvironmentSupportedLocales   "supported_locales"
 

Typedefs

typedef FLSlice C4Slice
 
typedef FLHeapSlice C4HeapSlice
 
typedef FLSliceResult C4SliceResult
 
typedef C4Slice C4String
 
typedef C4HeapSlice C4HeapString
 
typedef C4SliceResult C4StringResult
 
typedef uint64_t C4SequenceNumber
 A database sequence number, representing the order in which a revision was created.
 
typedef int64_t C4Timestamp
 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.) A value of 0 represents "no expiration".
 
typedef struct C4BlobStore C4BlobStore
 Opaque handle for an object that manages storage of blobs.
 
typedef struct C4Cert C4Cert
 An X.509 certificate, or certificate signing request (CSR).
 
typedef struct C4Collection C4Collection
 Opaque handle to a namespace of documents in an opened database.
 
typedef struct C4CollectionObserver C4CollectionObserver
 A collection-observer reference.
 
typedef C4CollectionObserver C4DatabaseObserver
 
typedef struct C4Database C4Database
 Opaque handle to an opened database.
 
typedef struct C4DocumentObserver C4DocumentObserver
 A document-observer reference.
 
typedef struct C4DocEnumerator C4DocEnumerator
 Opaque handle to a document enumerator.
 
typedef struct C4Index C4Index
 Represents an existing index.
 
typedef struct C4IndexUpdater C4IndexUpdater
 Describes a set of index values that need to be computed by the application.
 
typedef struct C4KeyPair C4KeyPair
 An asymmetric key or key-pair (RSA, etc.) The private key may or may not be present.
 
typedef struct C4Listener C4Listener
 A LiteCore network listener – supports the REST API, replication, or both.
 
typedef struct C4Query C4Query
 Opaque handle to a compiled query.
 
typedef struct C4QueryObserver C4QueryObserver
 A query-observer reference.
 
typedef struct C4ReadStream C4ReadStream
 An open stream for reading data from a blob.
 
typedef struct C4Replicator C4Replicator
 Opaque reference to a replicator.
 
typedef struct C4Socket C4Socket
 Represents an open bidirectional stream of bytes or messages (typically a TCP socket.)
 
typedef struct C4WriteStream C4WriteStream
 An open stream for writing data to a blob.
 

Functions

static C4INLINE C4Slice c4str (const char *str)
 
static bool c4SliceEqual (C4Slice a, C4Slice b)
 
static void c4slice_free (C4SliceResult s)
 
CBL_CORE_API void * c4base_retain (void *obj)
 
CBL_CORE_API void c4base_release (void *obj)
 
static C4Certc4cert_retain (C4Cert *r)
 
static C4Collectionc4coll_retain (C4Collection *r)
 
static C4Databasec4db_retain (C4Database *r)
 
static C4Indexc4index_retain (C4Index *r)
 
static C4IndexUpdaterc4indexupdater_retain (C4IndexUpdater *r)
 
static C4KeyPairc4keypair_retain (C4KeyPair *r)
 
static C4Queryc4query_retain (C4Query *r)
 
CBL_CORE_API C4Documentc4doc_retain (C4Document *)
 
CBL_CORE_API C4QueryEnumeratorc4queryenum_retain (C4QueryEnumerator *)
 
CBL_CORE_API C4Socketc4socket_retain (C4Socket *)
 
static void c4cert_release (C4Cert *r)
 
static void c4coll_release (C4Collection *r)
 
static void c4db_release (C4Database *r)
 
static void c4index_release (C4Index *i)
 
static void c4indexupdater_release (C4IndexUpdater *u)
 
static void c4keypair_release (C4KeyPair *r)
 
static void c4query_release (C4Query *r)
 
CBL_CORE_API void c4doc_release (C4Document *)
 
CBL_CORE_API void c4queryenum_release (C4QueryEnumerator *)
 
CBL_CORE_API void c4socket_release (C4Socket *)
 
CBL_CORE_API void c4dbobs_free (C4CollectionObserver *)
 
CBL_CORE_API void c4docobs_free (C4DocumentObserver *)
 
CBL_CORE_API void c4enum_free (C4DocEnumerator *)
 
CBL_CORE_API void c4listener_free (C4Listener *)
 Closes and disposes a listener.
 
CBL_CORE_API void c4queryobs_free (C4QueryObserver *)
 
CBL_CORE_API void c4raw_free (C4RawDocument *)
 Frees the storage occupied by a raw document.
 
CBL_CORE_API void c4repl_free (C4Replicator *)
 Frees a replicator reference.
 
CBL_CORE_API void c4stream_close (C4ReadStream *)
 Closes a read-stream.
 
CBL_CORE_API void c4stream_closeWriter (C4WriteStream *)
 Closes a blob write-stream.
 
CBL_CORE_API int c4_getObjectCount (void)
 Returns the number of objects that have been created but not yet freed.
 
CBL_CORE_API void c4_dumpInstances (void)
 Logs information about object in memory.
 
CBL_CORE_API C4StringResult c4_getBuildInfo (void)
 A string describing the version of LiteCore.
 
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:
 
CBL_CORE_API C4Timestamp c4_now (void)
 Returns the current time, in milliseconds since 1/1/1970.
 
NODISCARD CBL_CORE_API bool c4_setTempDir (C4String path, C4Error *err)
 Wiring call for platforms without discoverable temporary directories.
 
CBL_CORE_API void c4_runAsyncTask (void(*task)(void *), void *context)
 Schedules a function to be called asynchronously on a background thread.
 

Macro Definition Documentation

◆ LITECORE_API_VERSION

#define LITECORE_API_VERSION   352

◆ LITECORE_VERSION

#define LITECORE_VERSION   30100