| Couchbase Lite C
    Couchbase Lite C API | 
Go to the source code of this file.
| Data Structures | |
| struct | CBLEncryptionKey | 
| Encryption key specified in a CBLDatabaseConfiguration.  More... | |
| struct | CBLDatabaseConfiguration | 
| Database configuration options.  More... | |
| Functions | |
| Database Extension | |
| bool | CBL_EnableVectorSearch (FLString path, CBLError *_cbl_nullable outError) | 
| ENTERPRISE EDITION ONLY. | |
| Database file operations | |
| These functions operate on database files without opening them. | |
| bool | CBL_DatabaseExists (FLString name, FLString inDirectory) | 
| Returns true if a database with the given name exists in the given directory. | |
| bool | CBL_CopyDatabase (FLString fromPath, FLString toName, const CBLDatabaseConfiguration *_cbl_nullable config, CBLError *_cbl_nullable outError) | 
| Copies a database file to a new location, and assigns it a new internal UUID to distinguish it from the original database when replicating. | |
| bool | CBL_DeleteDatabase (FLString name, FLString inDirectory, CBLError *_cbl_nullable outError) | 
| Deletes a database file. | |
| Database accessors | |
| Getting information about a database. | |
| FLString | CBLDatabase_Name (const CBLDatabase *) | 
| Returns the database's name. | |
| _cbl_warn_unused FLStringResult | CBLDatabase_Path (const CBLDatabase *) | 
| Returns the database's full filesystem path, or null slice if the database is closed or deleted. | |
| const CBLDatabaseConfiguration | CBLDatabase_Config (const CBLDatabase *) | 
| Returns the database's configuration, as given when it was opened. | |
| Database configuration | |
| enum | CBLEncryptionAlgorithm : uint32_t { kCBLEncryptionNone = 0 , kCBLEncryptionAES256 } | 
| enum | CBLEncryptionKeySize : uint64_t { kCBLEncryptionKeySizeAES256 = 32 } | 
| CBLDatabaseConfiguration | CBLDatabaseConfiguration_Default (void) | 
| Returns the default database configuration. | |
| bool | CBLEncryptionKey_FromPassword (CBLEncryptionKey *key, FLString password) | 
| Derives an encryption key from a password. | |
| bool | CBLEncryptionKey_FromPasswordOld (CBLEncryptionKey *key, FLString password) | 
| VOLATILE API: Derives an encryption key from a password in a way that is compatible with certain variants of Couchbase Lite in which a slightly different hashing algorithm is used. | |
| Scheduling notifications | |
| Applications may want control over when Couchbase Lite notifications (listener callbacks) happen. They may want them called on a specific thread, or at certain times during an event loop. This behavior may vary by database, if for instance each database is associated with a separate thread. The API calls here enable this. When notifications are "buffered" for a database, calls to listeners will be deferred until the application explicitly allows them. Instead, a single callback will be issued when the first notification becomes available; this gives the app a chance to schedule a time when the notifications should be sent and callbacks called. | |
| typedef void(* | CBLNotificationsReadyCallback) (void *_cbl_nullable context, CBLDatabase *db) | 
| Callback indicating that the database (or an object belonging to it) is ready to call one or more listeners. | |
| void | CBLDatabase_BufferNotifications (CBLDatabase *db, CBLNotificationsReadyCallback _cbl_nullable callback, void *_cbl_nullable context) | 
| Switches the database to buffered-notification mode. | |
| void | CBLDatabase_SendNotifications (CBLDatabase *db) | 
| Immediately issues all pending notifications for this database, by calling their listener callbacks. | |