gwenhywfar 5.12.0
dbrw.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int GWEN_DB__ReadValues (GWEN_DB_NODE *n, uint32_t dbflags, const char *typeName, const char *varName, uint8_t *p)
int GWEN_DB_EscapeToBufferTolerant (const char *src, GWEN_BUFFER *buf)
int GWEN_DB_ReadFile (GWEN_DB_NODE *n, const char *fname, uint32_t dbflags)
int GWEN_DB_ReadFileAs (GWEN_DB_NODE *db, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags)
int GWEN_DB_ReadFromFastBuffer (GWEN_DB_NODE *n, GWEN_FAST_BUFFER *fb, uint32_t dbflags)
int GWEN_DB_ReadFromIo (GWEN_DB_NODE *n, GWEN_SYNCIO *sio, uint32_t dbflags)
int GWEN_DB_ReadFromString (GWEN_DB_NODE *n, const char *str, int len, uint32_t dbflags)
int GWEN_DB_UnescapeToBufferTolerant (const char *src, GWEN_BUFFER *buf)
int GWEN_DB_WriteFile (GWEN_DB_NODE *n, const char *fname, uint32_t dbflags)
int GWEN_DB_WriteFileAs (GWEN_DB_NODE *db, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags)
int GWEN_DB_WriteGroupToIoLayer (GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags, int insert)
int GWEN_DB_WriteToBuffer (GWEN_DB_NODE *n, GWEN_BUFFER *buf, uint32_t dbflags)
int GWEN_DB_WriteToFastBuffer (GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags)
int GWEN_DB_WriteToIo (GWEN_DB_NODE *node, GWEN_SYNCIO *sio, uint32_t dbflags)

Function Documentation

◆ GWEN_DB__ReadValues()

◆ GWEN_DB_EscapeToBufferTolerant()

int GWEN_DB_EscapeToBufferTolerant ( const char * src,
GWEN_BUFFER * buf )

Definition at line 30 of file dbrw.c.

References GWEN_Buffer_AppendByte().

Referenced by GWEN_DB_WriteGroupToIoLayer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_DB_ReadFile()

int GWEN_DB_ReadFile ( GWEN_DB_NODE * n,
const char * fname,
uint32_t dbflags )

◆ GWEN_DB_ReadFileAs()

int GWEN_DB_ReadFileAs ( GWEN_DB_NODE * n,
const char * fname,
const char * type,
GWEN_DB_NODE * params,
uint32_t dbflags )

Imports a file into a DB using a GWEN_DBIO importer.

Parameters
nnode to read into (becomes the root of the imported data)
fnamename of the file to import
typeGWEN_DBIO type
paramsparameters for the GWEN_DBIO importer (content depends on the importer, may even be NULL for some types)
dbflagsflags to use while importing (see GWEN_DB_FLAGS_OVERWRITE_VARS and others)

Definition at line 122 of file dbrw.c.

References DBG_ERROR, DBG_INFO, GWEN_DBIO_GetPlugin(), GWEN_DBIO_Import(), GWEN_ERROR_NOT_SUPPORTED, GWEN_LOGDOMAIN, GWEN_SyncIo_AddFlags(), GWEN_SyncIo_Connect(), GWEN_SyncIo_Disconnect(), GWEN_SyncIo_File_CreationMode_OpenExisting, GWEN_SYNCIO_FILE_FLAGS_READ, GWEN_SyncIo_File_new(), and GWEN_SyncIo_free().

Here is the call graph for this function:

◆ GWEN_DB_ReadFromFastBuffer()

◆ GWEN_DB_ReadFromIo()

int GWEN_DB_ReadFromIo ( GWEN_DB_NODE * n,
GWEN_SYNCIO * sio,
uint32_t dbflags )

Definition at line 978 of file dbrw.c.

References DBG_INFO, GWEN_DB_FLAGS_DOSMODE, GWEN_DB_ReadFromFastBuffer(), GWEN_FAST_BUFFER_FLAGS_DOSMODE, GWEN_FastBuffer_AddFlags(), GWEN_FastBuffer_free(), GWEN_FastBuffer_new(), and GWEN_LOGDOMAIN.

Referenced by GWEN_DB_ReadFile(), and GWEN_DB_ReadFromString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_DB_ReadFromString()

int GWEN_DB_ReadFromString ( GWEN_DB_NODE * n,
const char * str,
int len,
uint32_t dbflags )

Definition at line 1035 of file dbrw.c.

References DBG_INFO, GWEN_DB_ReadFromIo(), GWEN_LOGDOMAIN, GWEN_SyncIo_free(), and GWEN_SyncIo_Memory_fromBuffer().

Referenced by GWEN_PasswordStore_ReadFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_DB_UnescapeToBufferTolerant()

int GWEN_DB_UnescapeToBufferTolerant ( const char * src,
GWEN_BUFFER * buf )

Definition at line 74 of file dbrw.c.

References GWEN_Buffer_AppendByte().

Referenced by GWEN_DB_ReadFromFastBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_DB_WriteFile()

◆ GWEN_DB_WriteFileAs()

int GWEN_DB_WriteFileAs ( GWEN_DB_NODE * n,
const char * fname,
const char * type,
GWEN_DB_NODE * params,
uint32_t dbflags )

Exports a DB to a file using a GWEN_DBIO exporter.

Parameters
nnode to write
fnamename of the file to export to
typeGWEN_DBIO type
paramsparameters for the GWEN_DBIO exporter (content depends on the exporter, may even be NULL for some types)
dbflagsflags to use while exporting (see GWEN_DB_FLAGS_OVERWRITE_VARS and others)

Definition at line 159 of file dbrw.c.

References DBG_ERROR, DBG_INFO, GWEN_DBIO_ExportToFile(), GWEN_DBIO_GetPlugin(), GWEN_ERROR_NOT_SUPPORTED, and GWEN_LOGDOMAIN.

Here is the call graph for this function:

◆ GWEN_DB_WriteGroupToIoLayer()

◆ GWEN_DB_WriteToBuffer()

int GWEN_DB_WriteToBuffer ( GWEN_DB_NODE * n,
GWEN_BUFFER * buf,
uint32_t dbflags )

Definition at line 1061 of file dbrw.c.

References DBG_INFO, GWEN_DB_WriteToIo(), GWEN_LOGDOMAIN, GWEN_SyncIo_free(), and GWEN_SyncIo_Memory_new().

Referenced by _exportDbToXml(), and GWEN_PasswordStore_WriteFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_DB_WriteToFastBuffer()

int GWEN_DB_WriteToFastBuffer ( GWEN_DB_NODE * node,
GWEN_FAST_BUFFER * fb,
uint32_t dbflags )

Definition at line 497 of file dbrw.c.

References GWEN_DB_WriteGroupToIoLayer(), and GWEN_FASTBUFFER_FLUSH.

Here is the call graph for this function:

◆ GWEN_DB_WriteToIo()

int GWEN_DB_WriteToIo ( GWEN_DB_NODE * node,
GWEN_SYNCIO * sio,
uint32_t dbflags )

Definition at line 513 of file dbrw.c.

References GWEN_DB_FLAGS_DOSMODE, GWEN_DB_WriteGroupToIoLayer(), GWEN_FAST_BUFFER_FLAGS_DOSMODE, GWEN_FastBuffer_AddFlags(), GWEN_FASTBUFFER_FLUSH, GWEN_FastBuffer_free(), and GWEN_FastBuffer_new().

Referenced by GWEN_DB_WriteFile(), and GWEN_DB_WriteToBuffer().

Here is the call graph for this function:
Here is the caller graph for this function: