mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Propagating structures renaming.
This commit is contained in:
parent
38ea7d0a6f
commit
69a125b9fe
3 changed files with 16 additions and 17 deletions
|
|
@ -402,7 +402,6 @@ LpConfig *lp_config_new_with_factory(const char *config_filename, const char *fa
|
|||
bctbx_vfs_file_t* pFile = NULL;
|
||||
|
||||
LpConfig *lpconfig=lp_new0(LpConfig,1);
|
||||
bctbx_vfs_set_default(NULL);
|
||||
lpconfig->g_bctbx_vfs = bctbx_vfs_get_default();
|
||||
|
||||
lpconfig->refcnt=1;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
static int sqlite3bctbx_Close(sqlite3_file *p){
|
||||
|
||||
int ret;
|
||||
sqlite3_bctbx_file *pFile = (sqlite3_bctbx_file*) p;
|
||||
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
|
||||
|
||||
ret = bctbx_file_close(pFile->pbctbx_file);
|
||||
if (!ret){
|
||||
|
|
@ -64,7 +64,7 @@ static int sqlite3bctbx_Close(sqlite3_file *p){
|
|||
*/
|
||||
static int sqlite3bctbx_Read(sqlite3_file *p, void *buf, int count, sqlite_int64 offset){
|
||||
int ret;
|
||||
sqlite3_bctbx_file *pFile = (sqlite3_bctbx_file*) p;
|
||||
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
|
||||
if (pFile){
|
||||
ret = bctbx_file_read(pFile->pbctbx_file, buf, count, offset);
|
||||
if( ret==count ){
|
||||
|
|
@ -92,7 +92,7 @@ static int sqlite3bctbx_Read(sqlite3_file *p, void *buf, int count, sqlite_int64
|
|||
* @return SQLITE_OK on success, SQLITE_IOERR_WRITE if an error occurred.
|
||||
*/
|
||||
static int sqlite3bctbx_Write(sqlite3_file *p, const void *buf, int count, sqlite_int64 offset){
|
||||
sqlite3_bctbx_file *pFile = (sqlite3_bctbx_file*) p;
|
||||
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
|
||||
int ret;
|
||||
if (pFile ){
|
||||
ret = bctbx_file_write(pFile->pbctbx_file, buf, count, offset);
|
||||
|
|
@ -115,7 +115,7 @@ static int sqlite3bctbx_Write(sqlite3_file *p, const void *buf, int count, sqlit
|
|||
static int sqlite3bctbx_FileSize(sqlite3_file *p, sqlite_int64 *pSize){
|
||||
|
||||
int rc; /* Return code from fstat() call */
|
||||
sqlite3_bctbx_file *pFile = (sqlite3_bctbx_file*) p;
|
||||
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
|
||||
if (pFile->pbctbx_file){
|
||||
rc = bctbx_file_size(pFile->pbctbx_file);
|
||||
if( rc < 0 ) {
|
||||
|
|
@ -206,7 +206,7 @@ static int sqlite3bctbx_nolockUnlock(sqlite3_file *pUnused, int unused){
|
|||
* @return SQLITE_OK on success, SLITE_IOERR_FSYNC if an error occurred.
|
||||
*/
|
||||
static int sqlite3bctbx_Sync(sqlite3_file *p, int flags){
|
||||
sqlite3_bctbx_file *pFile = (sqlite3_bctbx_file*)p;
|
||||
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*)p;
|
||||
#if _WIN32
|
||||
return (FlushFileBuffers(pFile->pbctbx_file->fd) ? SQLITE_OK : SQLITE_IOERR_FSYNC);
|
||||
#else
|
||||
|
|
@ -246,7 +246,7 @@ static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file
|
|||
sqlite3bctbx_DeviceCharacteristics,
|
||||
};
|
||||
|
||||
sqlite3_bctbx_file * pFile = (sqlite3_bctbx_file*)p; /*File handle sqlite3_bctbx_file*/
|
||||
sqlite3_bctbx_file_t * pFile = (sqlite3_bctbx_file_t*)p; /*File handle sqlite3_bctbx_file_t*/
|
||||
|
||||
int openFlags = 0;
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file
|
|||
if( flags&SQLITE_OPEN_READONLY ) openFlags |= O_RDONLY;
|
||||
if( flags&SQLITE_OPEN_READWRITE ) openFlags |= O_RDWR;
|
||||
|
||||
pFile->pbctbx_file = bctbx_file_open2(bc_create_vfs(), fName, openFlags);
|
||||
pFile->pbctbx_file = bctbx_file_open2(bctbx_vfs_get_default(), fName, openFlags);
|
||||
if( pFile->pbctbx_file == NULL){
|
||||
return SQLITE_CANTOPEN;
|
||||
}
|
||||
|
|
@ -279,7 +279,7 @@ static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file
|
|||
sqlite3_vfs *sqlite3_bctbx_vfs_create(void){
|
||||
static sqlite3_vfs bctbx_vfs = {
|
||||
1, /* iVersion */
|
||||
sizeof(sqlite3_bctbx_file), /* szOsFile */
|
||||
sizeof(sqlite3_bctbx_file_t), /* szOsFile */
|
||||
MAXPATHNAME, /* mxPathname */
|
||||
0, /* pNext */
|
||||
"sqlite3bctbx_vfs", /* zName */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
sqlite3_bctbx_vfs.h
|
||||
sqlite3_bctbx_vfs_t.h
|
||||
Copyright (C) 2016 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
@ -37,10 +37,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
|
||||
/**
|
||||
* sqlite3_bctbx_file VFS file structure.
|
||||
* sqlite3_bctbx_file_t VFS file structure.
|
||||
*/
|
||||
typedef struct sqlite3_bctbx_file sqlite3_bctbx_file;
|
||||
struct sqlite3_bctbx_file {
|
||||
typedef struct sqlite3_bctbx_file_t sqlite3_bctbx_file_t;
|
||||
struct sqlite3_bctbx_file_t {
|
||||
sqlite3_file base; /* Base class. Must be first. */
|
||||
bctbx_vfs_file_t* pbctbx_file;
|
||||
};
|
||||
|
|
@ -51,9 +51,9 @@ struct sqlite3_bctbx_file {
|
|||
* Very simple VFS structure based on sqlite3_vfs.
|
||||
* Only the Open function is implemented,
|
||||
*/
|
||||
typedef struct sqlite3_bctbx_vfs sqlite3_bctbx_vfs;
|
||||
struct sqlite3_bctbx_vfs {
|
||||
sqlite3_bctbx_vfs *pNext; /* Next registered VFS */
|
||||
typedef struct sqlite3_bctbx_vfs_t sqlite3_bctbx_vfs_t;
|
||||
struct sqlite3_bctbx_vfs_t {
|
||||
sqlite3_bctbx_vfs_t *pNext; /* Next registered VFS */
|
||||
const char *vfsName; /* Virtual file system name */
|
||||
int (*xOpen)(sqlite3_vfs* pVfs, const char *fName, sqlite3_file *pFile,int flags, int *pOutFlags);
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ sqlite3_vfs *sqlite3_bctbx_vfs_create(void);
|
|||
/**
|
||||
* Registers sqlite3bctbx_vfs to SQLite VFS. If makeDefault is 1,
|
||||
* the VFS will be used by default.
|
||||
* Methods not implemented by sqlite3_bctbx_vfs are initialized to the one
|
||||
* Methods not implemented by sqlite3_bctbx_vfs_t are initialized to the one
|
||||
* used by the unix-none VFS where all locking file operations are no-ops.
|
||||
* @param makeDefault set to 1 to make the newly registered VFS be the default one, set to 0 instead.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue