• 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 #ifndef STORAGE_SERVICE_CONSTANTS_H
16 #define STORAGE_SERVICE_CONSTANTS_H
17 
18 #include <map>
19 
20 namespace OHOS {
21 namespace StorageService {
22 const int START_USER_ID = 100;
23 const int MAX_USER_ID = 1099;
24 const int ZERO_USER_ID = 0;
25 const int UID_FILE_MANAGER = 1006;
26 const uid_t USER_ID_BASE = 200000;
27 }
28 
29 namespace StorageDaemon {
30 constexpr uint32_t GLOBAL_USER_ID = 0;
31 
32 static const std::string EL1 = "el1";
33 static const std::string EL2 = "el2";
34 static const std::string EL3 = "el3";
35 static const std::string EL4 = "el4";
36 
37 enum KeyType {
38     EL1_KEY = 1,
39     EL2_KEY = 2,
40     EL3_KEY = 3,
41     EL4_KEY = 4,
42 };
43 static std::map<std::string, KeyType> EL_DIR_MAP = {
44     {EL1, EL1_KEY},
45     {EL2, EL2_KEY},
46     {EL3, EL3_KEY},
47     {EL4, EL4_KEY},
48 };
49 
50 enum QuotaIdType {
51     USRID,
52     GRPID,
53     PRJID
54 };
55 }
56 }
57 
58 #endif // STORAGE_SERVICE_CONSTANTS_H