• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SQLITE3SYM_H
17 #define SQLITE3SYM_H
18 
19 #define SQLITE3_EXPORT_SYMBOLS
20 #define SQLITE_OMIT_LOAD_EXTENSION
21 
22 // We extend the original purpose of the "sqlite3ext.h".
23 #include "sqlite3ext.h"
24 
25 struct sqlite3_api_routines_hw {
26   int (*initialize)();
27   int (*config)(int,...);
28   int (*key)(sqlite3*,const void*,int);
29   int (*key_v2)(sqlite3*,const char*,const void*,int);
30   int (*rekey)(sqlite3*,const void*,int);
31   int (*rekey_v2)(sqlite3*,const char*,const void*,int);
32 };
33 
34 extern const struct sqlite3_api_routines_hw *sqlite3_export_hw_symbols;
35 #define sqlite3_initialize          sqlite3_export_hw_symbols->initialize
36 #define sqlite3_config              sqlite3_export_hw_symbols->config
37 #define sqlite3_key                 sqlite3_export_hw_symbols->key
38 #define sqlite3_key_v2              sqlite3_export_hw_symbols->key_v2
39 #define sqlite3_rekey               sqlite3_export_hw_symbols->rekey
40 #define sqlite3_rekey_v2            sqlite3_export_hw_symbols->rekey_v2
41 
42 #endif
43