1 /*
2  * Copyright (c) 2023 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 FOUNDATION_ABILITY_RUNTIME_SIMULATOR_COMMON_INCLUDE_BUNDLE_CONSTANTS_H
17 #define FOUNDATION_ABILITY_RUNTIME_SIMULATOR_COMMON_INCLUDE_BUNDLE_CONSTANTS_H
18 
19 #include <map>
20 #include <string>
21 #include <vector>
22 
23 namespace OHOS {
24 namespace AppExecFwk {
25 namespace Constants {
26 const std::string EMPTY_STRING = "";
27 const std::string PATH_SEPARATOR = "/";
28 constexpr const char* CURRENT_DEVICE_ID = "PHONE-001";
29 constexpr int DEFAULT_USERID = 0;
30 constexpr int UNSPECIFIED_USERID = -2;
31 constexpr int PERMISSION_GRANTED = 0;
32 constexpr const char* MODULE_NAME_SEPARATOR = ",";
33 enum class AppType {
34     SYSTEM_APP = 0,
35     THIRD_SYSTEM_APP,
36     THIRD_PARTY_APP,
37 };
38 constexpr uint8_t MAX_BUNDLE_NAME = 127;
39 constexpr uint8_t MIN_BUNDLE_NAME = 7;
40 constexpr uint8_t MAX_MODULE_NAME = 31;
41 constexpr uint8_t MAX_JSON_ELEMENT_LENGTH = 255;
42 constexpr uint16_t MAX_JSON_ARRAY_LENGTH = 5120;
43 constexpr const char* BUNDLE_NAME = "bundleName";
44 constexpr const char* MODULE_NAME = "moduleName";
45 constexpr const char* HAP_PATH = "hapPath";
46 constexpr int32_t INITIAL_APP_INDEX = 0;
47 constexpr const char* RELATIVE_PATH = "../";
48 constexpr const char* APP_DETAIL_ABILITY = "AppDetailAbility";
49 } // namespace Constants
50 } // namespace AppExecFwk
51 } // namespace OHOS
52 #endif // FOUNDATION_ABILITY_RUNTIME_SIMULATOR_COMMON_INCLUDE_BUNDLE_CONSTANTS_H