1 /*
2 * Copyright (c) 2024 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 #include "cm_rdb_open_callback.h"
17
18 #include "rdb_errno.h"
19
20 #include "cm_log.h"
21
22 namespace OHOS {
23 namespace Security {
24 namespace CertManager {
CmRdbOpenCallback(const RdbConfig & rdbConfig)25 CmRdbOpenCallback::CmRdbOpenCallback(const RdbConfig &rdbConfig) : rdbConfig_(rdbConfig) {}
26
OnCreate(NativeRdb::RdbStore & rdbStore)27 int32_t CmRdbOpenCallback::OnCreate(NativeRdb::RdbStore &rdbStore)
28 {
29 CM_LOG_D("CmRdbOpenCallback OnCreate");
30 return NativeRdb::E_OK;
31 }
32
OnUpgrade(NativeRdb::RdbStore & rdbStore,int currentVersion,int targetVersion)33 int32_t CmRdbOpenCallback::OnUpgrade(NativeRdb::RdbStore &rdbStore, int currentVersion, int targetVersion)
34 {
35 CM_LOG_D("CmRdbOpenCallback OnUpgrade");
36 return NativeRdb::E_OK;
37 }
38
OnDowngrade(NativeRdb::RdbStore & rdbStore,int currentVersion,int targetVersion)39 int32_t CmRdbOpenCallback::OnDowngrade(NativeRdb::RdbStore &rdbStore, int currentVersion, int targetVersion)
40 {
41 CM_LOG_D("CmRdbOpenCallback OnDowngrade");
42 return NativeRdb::E_OK;
43 }
44
OnOpen(NativeRdb::RdbStore & rdbStore)45 int32_t CmRdbOpenCallback::OnOpen(NativeRdb::RdbStore &rdbStore)
46 {
47 CM_LOG_D("CmRdbOpenCallback OnOpen");
48 return NativeRdb::E_OK;
49 }
50 } // namespace CertManager
51 } // namespace Security
52 } // namespace OHOS