Tizen 2.1 base
[framework/web/wrt-commons.git] / modules / vcore / src / vcore / VCore.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /*
17  * @file        VCore.h
18  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
19  * @version     1.0
20  * @brief
21  */
22 #ifndef _VCORE_SRC_VCORE_VCORE_H_
23 #define _VCORE_SRC_VCORE_VCORE_H_
24
25 #include <string>
26
27 namespace ValidationCore {
28 /*
29  * configFilePath - path to XML config file with certificates configuration
30  *
31  * configSchemaPath - XMLschema of config file
32  *
33  * databasePath - path to database with OCSP/CRL cache.
34  *
35  * This function could be run only once. If you call it twice it will
36  * return false and non data will be set.
37  *
38  */
39 bool VCoreInit(const std::string& configFilePath,
40                const std::string& configSchemaPath,
41                const std::string& databasePath);
42
43 /*
44  * All thread with are using OCSP/CRL must call AttachToThread function before
45  * it can call OCSP/CRL. More than one thread could be Attach with OCPS/CRL.
46  *
47  * You mast attach thread to OCSP/CRL because OCSP/CRL is using database
48  * CertificateCachedDAO. For each thread that will be using this database
49  * vcore  must create internal structure (with connection info).
50  *
51  */
52 void AttachToThread(void);
53 void DetachFromThread(void);
54
55 } // namespace ValidationCore
56
57 #endif // _VCORE_SRC_VCORE_VCORE_H_
58