• 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 
16 #ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H
17 #define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H
18 
19 namespace OHOS {
20 namespace Notification {
21 const static std::string KEY_DO_NOT_DISTURB_TYPE = "ans_doNotDisturbType";
22 const static std::string KEY_DO_NOT_DISTURB_BEGIN_DATE = "ans_doNotDisturbBeginDate";
23 const static std::string KEY_DO_NOT_DISTURB_END_DATE = "ans_doNotDisturbEndDate";
24 const static std::string KEY_ENABLE_ALL_NOTIFICATION = "ans_notificationAll";
25 const static std::string KEY_BUNDLE_LABEL = "label_ans_bundle_";
26 const static std::string KEY_UNDER_LINE = "_";
27 const static std::string KEY_ANS_BUNDLE = "ans_bundle";
28 
29 const static std::string KEY_BUNDLE_NAME = "name";
30 const static std::string KEY_BUNDLE_IMPORTANCE = "importance";
31 const static std::string KEY_BUNDLE_SHOW_BADGE = "showBadge";
32 const static std::string KEY_BUNDLE_BADGE_TOTAL_NUM = "badgeTotalNum";
33 const static std::string KEY_BUNDLE_PRIVATE_ALLOWED = "privateAllowed";
34 const static std::string KEY_BUNDLE_ENABLE_NOTIFICATION = "enabledNotification";
35 const static std::string KEY_BUNDLE_POPPED_DIALOG = "poppedDialog";
36 const static std::string KEY_BUNDLE_UID = "uid";
37 
38 const static std::string KEY_GROUP = "group";
39 const static std::string KEY_GROUP_ID = "id";
40 const static std::string KEY_GROUP_NAME = "name";
41 const static std::string KEY_GROUP_DESCRIPTION = "groupDescription";
42 const static std::string KEY_GROUP_DISABLE = "isDisable";
43 
44 const static std::string KEY_SLOT = "slot";
45 const static std::string KEY_SLOT_TYPE = "type";
46 const static std::string KEY_SLOT_ID = "id";
47 const static std::string KEY_SLOT_GROUPID = "groupId";
48 const static std::string KEY_SLOT_NAME = "name";
49 const static std::string KEY_SLOT_DESCRIPTION = "description";
50 const static std::string KEY_SLOT_LEVEL = "level";
51 const static std::string KEY_SLOT_SHOW_BADGE = "showBadge";
52 const static std::string KEY_SLOT_ENABLE_LIGHT = "enableLight";
53 const static std::string KEY_SLOT_ENABLE_VRBRATION = "enableVibration";
54 const static std::string KEY_SLOT_LED_LIGHT_COLOR = "ledLightColor";
55 const static std::string KEY_SLOT_LOCKSCREEN_VISIBLENESS = "lockscreenVisibleness";
56 const static std::string KEY_SLOT_SOUND = "sound";
57 const static std::string KEY_SLOT_VIBRATION_STYLE = "vibrationSytle";
58 const static std::string KEY_SLOT_ENABLE_BYPASS_DND = "enableBypassDnd";
59 
60 // distributed database
61 const std::string APP_ID = "advanced_notification_service";
62 const std::string STORE_ID = "local_db";
63 
64 const static int BUNDLE_IMPORTANCE = 3;
65 const static int BUNDLE_BADGE_TOTAL_NUM = 0;
66 const static int BUNDLE_PRIVATE_ALLOWED = false;
67 const static int BUNDLE_ENABLE_NOTIFICATION = true;
68 const static int BUNDLE_POPPED_DIALOG = false;
69 const static bool BUNDLE_SHOW_BADGE = false;
70 
71 enum class BundleType {
72     BUNDLE_NAME_TYPE = 1,
73     BUNDLE_IMPORTANCE_TYPE,
74     BUNDLE_SHOW_BADGE_TYPE,
75     BUNDLE_BADGE_TOTAL_NUM_TYPE,
76     BUNDLE_PRIVATE_ALLOWED_TYPE,
77     BUNDLE_ENABLE_NOTIFICATION_TYPE,
78     BUNDLE_POPPED_DIALOG_TYPE,
79 };
80 }  // namespace Notification
81 }  // namespace OHOS
82 
83 #endif  // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H