• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 MTP_PTP_CONST_H
16 #define MTP_PTP_CONST_H
17 
18 #include <cstdint>
19 #include <string>
20 #include <unordered_map>
21 
22 namespace OHOS {
23 namespace Media {
24 
25 using PathMap = std::unordered_map<std::string, std::string>;
26 const std::string CHINESE_ABBREVIATION  = "zh-Hans";
27 const std::string ENGLISH_ABBREVIATION  = "en-Latn-US";
28 const std::string PTP_DOC_NAME_EN       = "Gallery";
29 const std::string PTP_DOC_NAME_CN       = "图库";
30 const std::string DEFAULT_PREDICATE     = "0";
31 const std::string FILEMODE_READONLY     = "r";
32 const std::string DELIMETER_NAME        = ".";
33 const std::string DEFAULT_FORMAT_MP4    = ".mp4";
34 const std::string PATH_LOCAL_STR        = "/local";
35 constexpr uint32_t ALL_HANDLE_ID        = 0xFFFFFFFF;
36 constexpr uint32_t BASE_USER_RANGE      = 200000;
37 
38 enum HANDLE_DEFAULT_ID : uint32_t {
39     DEFAULT_PARENT_ROOT = 0,
40     PTP_IN_MTP_ID = 500000000,
41     START_ID
42 };
43 
44 enum STORAGE_ID : uint32_t {
45     INNER_STORAGE_ID = 1,
46     SD_START_ID = INNER_STORAGE_ID + 1,
47     SD_END_ID = SD_START_ID + 127
48 };
49 
50 } // namespace Media
51 } // namespace OHOS
52 #endif // MTP_PTP_CONST_H
53