mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Cosmetic - renaming fun, moving doc .
This commit is contained in:
parent
57561bb120
commit
6649418220
3 changed files with 42 additions and 37 deletions
|
|
@ -432,7 +432,7 @@ LpConfig *lp_config_new_with_factory(const char *config_filename, const char *fa
|
|||
#endif /*_WIN32*/
|
||||
/*open with r+ to check if we can write on it later*/
|
||||
|
||||
pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs,lpconfig->filename, "r+");
|
||||
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,lpconfig->filename, "r+");
|
||||
fd = pFile->fd;
|
||||
lpconfig->pFile = pFile;
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ fail:
|
|||
int lp_config_read_file(LpConfig *lpconfig, const char *filename){
|
||||
char* path = lp_realpath(filename, NULL);
|
||||
int fd=-1;
|
||||
bctbx_vfs_file_t* pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs, path, "r");
|
||||
bctbx_vfs_file_t* pFile = bctbx_file_open(lpconfig->g_bctbx_vfs, path, "r");
|
||||
fd = pFile->fd;
|
||||
if (fd != -1){
|
||||
ms_message("Reading config information from %s", path);
|
||||
|
|
@ -761,7 +761,7 @@ int lp_config_sync(LpConfig *lpconfig){
|
|||
/* don't create group/world-accessible files */
|
||||
(void) umask(S_IRWXG | S_IRWXO);
|
||||
#endif
|
||||
pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs,lpconfig->tmpfilename, "w");
|
||||
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,lpconfig->tmpfilename, "w");
|
||||
lpconfig->pFile = pFile;
|
||||
fd = pFile->fd;
|
||||
if (fd == -1 ){
|
||||
|
|
@ -902,7 +902,7 @@ bool_t lp_config_relative_file_exists(const LpConfig *lpconfig, const char *file
|
|||
|
||||
if(realfilepath == NULL) return FALSE;
|
||||
|
||||
pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs,realfilepath, "r");
|
||||
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,realfilepath, "r");
|
||||
ms_free(realfilepath);
|
||||
if (pFile->fd != -1) {
|
||||
bctbx_file_close(pFile);
|
||||
|
|
@ -935,7 +935,7 @@ void lp_config_write_relative_file(const LpConfig *lpconfig, const char *filenam
|
|||
goto end;
|
||||
}
|
||||
|
||||
pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs,realfilepath, "w");
|
||||
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,realfilepath, "w");
|
||||
fd = pFile->fd;
|
||||
|
||||
if(fd == -1) {
|
||||
|
|
@ -971,7 +971,7 @@ int lp_config_read_relative_file(const LpConfig *lpconfig, const char *filename,
|
|||
goto err;
|
||||
}
|
||||
|
||||
pFile = bctbx_file_create_and_open(lpconfig->g_bctbx_vfs,realfilepath,"r");
|
||||
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,realfilepath,"r");
|
||||
if (pFile !=NULL)
|
||||
fd = pFile->fd;
|
||||
|
||||
|
|
|
|||
|
|
@ -273,27 +273,7 @@ static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file
|
|||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sqlite3_vfs pointer to the VFS named sqlite3bctbx_vfs
|
||||
* implemented in this file.
|
||||
* Methods not implemented:
|
||||
* xDelete
|
||||
* xAccess
|
||||
* xFullPathname
|
||||
* xDlOpen
|
||||
* xDlError
|
||||
* xDlSym
|
||||
* xDlClose
|
||||
* xRandomness
|
||||
* xSleep
|
||||
* xCurrentTime , xCurrentTimeInt64,
|
||||
* xGetLastError
|
||||
* xGetSystemCall
|
||||
* xSetSystemCall
|
||||
* xNextSystemCall
|
||||
* To make the VFS available to SQLite
|
||||
* @return Pointer to bctbx_vfs.
|
||||
*/
|
||||
|
||||
|
||||
sqlite3_vfs *sqlite3_bctbx_vfs_create(void){
|
||||
static sqlite3_vfs bctbx_vfs = {
|
||||
|
|
@ -319,13 +299,6 @@ 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
|
||||
* 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.
|
||||
*/
|
||||
void sqlite3_bctbx_vfs_register( int makeDefault){
|
||||
sqlite3_vfs* pVfsToUse = sqlite3_bctbx_vfs_create();
|
||||
sqlite3_vfs* pDefault = sqlite3_vfs_find("unix-none");
|
||||
|
|
@ -353,9 +326,6 @@ void sqlite3_bctbx_vfs_register( int makeDefault){
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unregisters sqlite3bctbx_vfs from SQLite.
|
||||
*/
|
||||
void sqlite3_bctbx_vfs_unregister(void)
|
||||
{
|
||||
sqlite3_vfs* pVfs = sqlite3_vfs_find("sqlite3bctbx_vfs");
|
||||
|
|
|
|||
|
|
@ -63,8 +63,43 @@ struct sqlite3_bctbx_vfs {
|
|||
/****************************************************
|
||||
VFS API to register this VFS to sqlite3 VFS
|
||||
*****************************************************/
|
||||
|
||||
/**
|
||||
* Returns a sqlite3_vfs pointer to the VFS named sqlite3bctbx_vfs
|
||||
* implemented in this file.
|
||||
* Methods not implemented:
|
||||
* xDelete
|
||||
* xAccess
|
||||
* xFullPathname
|
||||
* xDlOpen
|
||||
* xDlError
|
||||
* xDlSym
|
||||
* xDlClose
|
||||
* xRandomness
|
||||
* xSleep
|
||||
* xCurrentTime , xCurrentTimeInt64,
|
||||
* xGetLastError
|
||||
* xGetSystemCall
|
||||
* xSetSystemCall
|
||||
* xNextSystemCall
|
||||
* To make the VFS available to SQLite
|
||||
* @return Pointer to bctbx_vfs.
|
||||
*/
|
||||
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
|
||||
* 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.
|
||||
*/
|
||||
void sqlite3_bctbx_vfs_register(int makeDefault);
|
||||
|
||||
|
||||
/**
|
||||
* Unregisters sqlite3bctbx_vfs from SQLite.
|
||||
*/
|
||||
void sqlite3_bctbx_vfs_unregister(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue