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 #ifndef APP_DOMAIN_VERIFY_SERVICE_APP_DETAILS_CONST_DEFINE_H 17 #define APP_DOMAIN_VERIFY_SERVICE_APP_DETAILS_CONST_DEFINE_H 18 #include <stdint.h> 19 #include <string> 20 21 namespace OHOS { 22 namespace AppDomainVerify { 23 24 const std::string DETAILS_ID = "ID"; 25 const std::string DETAILS_SCHEME = "SCHEME"; 26 const std::string DETAILS_DOMAIN = "DOMAIN"; 27 const std::string DETAILS_PATH_TYPE = "PATH_TYPE"; 28 const std::string DETAILS_PATH = "PATH"; 29 const std::string DETAILS_BUNDLE_NAME = "BUNDLE_NAME"; 30 const int32_t DETAILS_ID_INDEX = 0; 31 const int32_t DETAILS_SCHEME_INDEX = 1; 32 const int32_t DETAILS_DOMAIN_INDEX = 2; 33 const int32_t DETAILS_PATH_TYPE_INDEX = 3; 34 const int32_t DETAILS_PATH_INDEX = 4; 35 const int32_t DETAILS_BUNDLE_NAME_INDEX = 5; 36 37 const std::string META_TABLE_NAME = "TABLE_NAME"; 38 const std::string META_TABLE_VERSION = "TABLE_VERSION"; 39 const std::string META_TABLE_EXT_INFO = "TABLE_EXT_INFO"; 40 const std::string META_UPDATE_TIME = "UPDATE_TIME"; 41 const int32_t META_TABLE_NAME_INDEX = 0; 42 const int32_t META_TABLE_VERSION_INDEX = 1; 43 const int32_t META_TABLE_EXT_INFO_INDEX = 2; 44 const int32_t META_UPDATE_TIME_INDEX = 3; 45 46 constexpr int32_t CLOSE_DELAY_TIME_S = 20000; // 20s 47 const std::string CLOSE_TASK_ID = "closeRdb"; 48 const std::string APP_DETAILS_TABLE = "APP_DETAILS"; 49 const std::string META_DATA = "META_DATA"; 50 const std::string APP_DETAILS_RDB_PATH = "/data/service/el1/public/app_domain_verify_agent_service/"; 51 const std::string APP_DETAILS_RDB_NAME = "appDetails.db"; 52 const int APP_DETAILS_RDB_VERSION = 1; 53 54 } 55 } 56 57 #endif