From b897bf1e118e69764da20ef6668ef5d9ec1653e8 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期四, 25 五月 2023 09:33:38 +0800 Subject: [PATCH] 增加监视结束国际化 --- Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/bctoolbox.framework/Headers/vfs.h | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/bctoolbox.framework/Headers/vfs.h b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/bctoolbox.framework/Headers/vfs.h index bd5c3f3..b2cdc6b 100755 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/bctoolbox.framework/Headers/vfs.h +++ b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/bctoolbox.framework/Headers/vfs.h @@ -54,6 +54,8 @@ #define BCTBX_VFS_ERROR -255 /* Some kind of disk I/O error occurred */ +#define BCTBX_VFS_PRINTF_PAGE_SIZE 4096 /* Size of the page hold in memory by fprintf */ +#define BCTBX_VFS_GETLINE_PAGE_SIZE 17385 /* Size of the page hold in memory by getnextline */ #ifdef __cplusplus extern "C"{ @@ -73,9 +75,16 @@ const struct bctbx_io_methods_t *pMethods; /* Methods for an open file: all Developpers must supply this field at open step*/ /*the fields below are used by the default implementation. Developpers are not required to supply them, but may use them if they find * them useful*/ - void* pUserData; /*Developpers can store private data under this pointer */ - int fd; /* File descriptor */ - off_t offset; /*File offset used by lseek*/ + void* pUserData; /* Developpers can store private data under this pointer */ + off_t offset; /* File offset used by bctbx_file_fprintf and bctbx_file_get_nxtline */ + /* fprintf cache */ + char fPage[BCTBX_VFS_PRINTF_PAGE_SIZE]; /* Buffer storing the current page cached by fprintf */ + off_t fPageOffset; /* The original offset of the cached page */ + size_t fSize; /* number of bytes in cache */ + /* get_nxtline cache */ + char gPage[BCTBX_VFS_GETLINE_PAGE_SIZE+1]; /* Buffer storing the current page cachec by get_nxtline +1 to hold the \0 */ + off_t gPageOffset; /* The offset of the cached page */ + size_t gSize; /* actual size of the data in cache */ }; @@ -87,8 +96,9 @@ ssize_t (*pFuncWrite)(bctbx_vfs_file_t *pFile, const void* buf, size_t count, off_t offset); int (*pFuncTruncate)(bctbx_vfs_file_t *pFile, int64_t size); int64_t (*pFuncFileSize)(bctbx_vfs_file_t *pFile); + int (*pFuncSync)(bctbx_vfs_file_t *pFile); int (*pFuncGetLineFromFd)(bctbx_vfs_file_t *pFile, char* s, int count); - off_t (*pFuncSeek)(bctbx_vfs_file_t *pFile, off_t offset, int whence); + bool_t (*pFuncIsEncrypted)(bctbx_vfs_file_t *pFile); }; @@ -100,14 +110,6 @@ const char *vfsName; /* Virtual file system name */ int (*pFuncOpen)(bctbx_vfs_t *pVfs, bctbx_vfs_file_t *pFile, const char *fName, int openFlags); }; - - -/* API to use the VFS */ -/* - * This function returns a pointer to the VFS implemented in this file. - */ -BCTBX_PUBLIC bctbx_vfs_t *bc_create_vfs(void); - /** * Attempts to read count bytes from the open file given by pFile, at the position starting at offset @@ -196,7 +198,16 @@ BCTBX_PUBLIC int bctbx_file_get_nxtline(bctbx_vfs_file_t *pFile, char *s, int maxlen); /** - * Wrapper to pFuncSeek VFS method call. Set the position to offset in the file. + * Simply sync the file contents given through the file handle + * to the persistent media. + * @param pFile File handle pointer. + * @return BCTBX_VFS_OK on success, BCTBX_VFS_ERROR otherwise + */ +BCTBX_PUBLIC int bctbx_file_sync(bctbx_vfs_file_t *pFile); + +/** + * Set the position to offset in the file, this position is used only by the function + * bctbx_file_get_nxtline. Read and write give their own offset as param and won't modify this one * @param pFile File handle pointer. * @param offset File offset where to set the position to. * @param whence Either SEEK_SET, SEEK_CUR,SEEK_END @@ -204,6 +215,12 @@ */ BCTBX_PUBLIC off_t bctbx_file_seek(bctbx_vfs_file_t *pFile, off_t offset, int whence); +/** + * Get the file encryption status + * @param pFile File handle pointer. + * @return true if the file is encrypted + */ +BCTBX_PUBLIC bool_t bctbx_file_is_encrypted(bctbx_vfs_file_t *pFile); /** * Set default VFS pointer pDefault to my_vfs. -- Gitblit v1.8.0