A database backend for XMMS2.
More...
|
| | Condition |
| | Functions to create and use S4 search conditions.
|
| |
| | Fetch Specifications |
| | Specifies what to fetch in a query.
|
| |
| | Lock |
| | Locks entries so only one transaction can use tham at a time.
|
| |
| | Log |
| | Logs every action so we can redo changes if something crashes.
|
| |
| | Pattern |
| | Functions to create and match glob-like patterns.
|
| |
| | Entry |
| | The in-memory database.
|
| |
| | Result |
| | Handles results returned from S4.
|
| |
| | Result Set |
| | A set of results.
|
| |
| | Source Preferences |
| | Handles source preferences.
|
| |
| | Transactions |
| | Functions dealing with transactions.
|
| |
| | UUID |
| | Functions dealing with UUID.
|
| |
| | Value |
| | The way values are represented in S4.
|
| |
A database backend for XMMS2.
| #define S4_MAGIC ("s4db") |
| int _reread_file |
( |
s4_t * |
s4 | ) |
|
| void _start_sync |
( |
s4_t * |
s4 | ) |
|
| int s4_close |
( |
s4_t * |
s4 | ) |
|
Closes an open S4 database.
- Parameters
-
Referenced by CASE(), and main().
Returns the last error number set.
This function is thread safe, error numbers set in one thread will NOT be seen in another thread.
- Returns
- The last error number set, or S4E_NOERROR if none has been set
Referenced by CASE().
| s4_t* s4_open |
( |
const char * |
filename, |
|
|
const char ** |
indices, |
|
|
int |
open_flags |
|
) |
| |
Opens an S4 database.
The different flags you can pass:
S4_NEW
It will create a new file if one does not already exists. If one exists it will fail and return NULL.
S4_EXISTS
If the file does not exists it will fail and return NULL. s4_errno may be used to get more information about what went wrong.
S4_MEMORY Creates a memory-only database. It will not read any files on startup or write files on shutdown. Use this if you want a temporary database.
- Parameters
-
| filename | The name of the file containing the database |
| indices | An array of keys to have indices on |
| open_flags | Zero or more of the flags bitwise-or'd. |
- Returns
- A pointer to an s4_t, or NULL if something went wrong.
Referenced by CASE(), and main().
| void s4_sync |
( |
s4_t * |
s4 | ) |
|
Writes all changes to disk.
- Parameters
-
Referenced by s4_open().