99#ifndef cevfs_h
1010#define cevfs_h
1111
12+ #define CEVFS_OK 0
13+
1214#define CEVFS_ERROR 111
1315#define CEVFS_ERROR_PAGE_SIZE_TOO_SMALL (CEVFS_ERROR | (1<<8))
1416#define CEVFS_ERROR_MALFORMED_KEY (CEVFS_ERROR | (2<<8))
@@ -27,12 +29,13 @@ struct CevfsMethods {
2729 int (* xUncompress )(void * pCtx , char * aDest , size_t * pnDataOutSize , char * aSrc , size_t nDataInSize );
2830
2931 int (* xEncrypt )(
30- void * pCtx ,
31- const void * pDataIn ,
32- size_t nDataInSize ,
33- void * pIvOut ,
34- void * * pDataOut ,
35- size_t * nDataSizeOut
32+ void * pCtx , // in: the context
33+ const void * pDataIn , // in: the unencrypted data
34+ size_t nDataInSize , // in: the size of the unencrypted data
35+ void * pIvOut , // out: the randomly created IV
36+ void * * pDataOut , // out: the encrypted data
37+ size_t * nDataSizeOut , // out: size of encrypted data
38+ void * sqlite3_malloc (int n ) // in: pointer to the sqlite3_malloc function
3639 );
3740
3841 int (* xDecrypt )(
@@ -65,10 +68,10 @@ int cevfs_destroy_vfs(const char *zName);
6568 \param destUri URI of non-existing destination database file with optional parameters (block_size, key)
6669 */
6770int cevfs_build (
68- const char * srcDbPath ,
69- const char * destUri ,
70- void * pCtx , // Context pointer to be passed to CEVFS methods .
71- t_xAutoDetect
71+ const char * zSrcFilename , // Source SQLite DB filename, including path. Can be a URI.
72+ const char * zDestFilename , // Destination SQLite DB filename, including path. Can be a URI.
73+ void * pCtx , // Context pointer to be passed to CEVFS xMethods .
74+ t_xAutoDetect // xAutoDetect method to set up xMethods.
7275);
7376
7477#endif /* cevfs_h */
0 commit comments