LiteCore
Couchbase Lite cross-platform core implementation
|
Macros | |
#define | kC4EnvironmentTimezoneKey "tz" |
#define | kC4EnvironmentSupportedLocales "supported_locales" |
Functions | |
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. | |
#define kC4EnvironmentSupportedLocales "supported_locales" |
#define kC4EnvironmentTimezoneKey "tz" |
CBL_CORE_API C4StringResult c4_getBuildInfo | ( | void | ) |
A string describing the version of LiteCore.
Currently this just describes the Git branch and commit, in the form "Built from master branch, commit 0bc68f0d".
C4SliceResult c4_getEnvironmentInfo | ( | void | ) |
Returns information about LiteCore's view of the environment in the following format:
Fleece Encoded Dictionary { kC4EnvironmentTimezoneKey: numeric offset from UTC in seconds kC4EnvironmentSupportedLocales: string array of locale identifiers }
CBL_CORE_API C4StringResult c4_getVersion | ( | void | ) |
A short version string.
CBL_CORE_API C4Timestamp c4_now | ( | void | ) |
Returns the current time, in milliseconds since 1/1/1970.
CBL_CORE_API void c4_runAsyncTask | ( | void(* | task )(void *), |
void * | context ) |
Schedules a function to be called asynchronously on a background thread.
task | A pointer to the function to run. It must take a single void* argument and return void . If it needs to return a value, it should call some other function you define and pass that value as a parameter. |
context | An arbitrary pointer that will be passed to the function. You can use this to provide state. Obviously, whatever this points to must remain valid until the future time when task is called. |
NODISCARD CBL_CORE_API bool c4_setTempDir | ( | C4String | path, |
C4Error * | err ) |
Wiring call for platforms without discoverable temporary directories.
Simply sets the SQLite temp directory so that it can write its temporary files without error. Several platforms need to do this, but not all need to use this API.
path | The path to a writable directory for temporary files for SQLite |
err | If an error happens (e.g. it is an error to call this function twice), this parameter records it. |