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 OHOS_MEDIA_BACKUP_CONST_MAP_H
17 #define OHOS_MEDIA_BACKUP_CONST_MAP_H
18 
19 #include <string>
20 #include <unordered_map>
21 
22 namespace OHOS {
23 namespace Media {
24 const int CHAR_FIRST_NUMBER = 72;
25 const int CHAR_SECOND_NUMBER = 117;
26 const int CHAR_THIRD_NUMBER = 97;
27 const int CHAR_FOURTH_NUMBER = 119;
28 const int CHAR_FIFTH_NUMBER = 101;
29 const int CHAR_SIXTH_NUMBER = 105;
30 
31 static std::string GetDUALBundleName(bool bLower = false)
32 {
33     int arr[] = { CHAR_FIRST_NUMBER, CHAR_SECOND_NUMBER, CHAR_THIRD_NUMBER, CHAR_FOURTH_NUMBER, CHAR_FIFTH_NUMBER,
34         CHAR_SIXTH_NUMBER };
35     int len = sizeof(arr) / sizeof(arr[0]);
36     std::string dualBundleName = "";
37     for (int i = 0; i < len; i++) {
38         dualBundleName += char(arr[i]);
39     }
40     if (bLower) {
41         transform(dualBundleName.begin(), dualBundleName.end(), dualBundleName.begin(), ::tolower);
42     }
43     return dualBundleName;
44 }
45 
46 const std::string SCREEN_SHOT_AND_RECORDER = "截屏录屏";
47 const std::string VIDEO_SCREEN_RECORDER_NAME = "屏幕录制";
48 const std::string VIDEO_SCREEN_RECORDER = "com."+ GetDUALBundleName(true) +".hmos.screenrecorder";
49 } // namespace Media
50 } // namespace OHOS
51 
52 #endif // OHOS_MEDIA_BACKUP_CONST_MAP_H
53