• 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_INNERKITS_BASE_INCLUDE_ANS_CONST_DEFINE_H
17 #define BASE_NOTIFICATION_ANS_STANDARD_INNERKITS_BASE_INCLUDE_ANS_CONST_DEFINE_H
18 
19 #include <vector>
20 
21 #include "uri.h"
22 
23 #include "notification_constant.h"
24 
25 namespace OHOS {
26 namespace Notification {
27 // Max active notification number
28 constexpr uint32_t MAX_ACTIVE_NUM = 1000;
29 constexpr uint32_t MAX_ACTIVE_NUM_PERAPP = 100;
30 constexpr uint32_t MAX_ACTIVE_NUM_PERSECOND = 10;
31 constexpr uint32_t MAX_SLOT_NUM = 5;
32 constexpr uint32_t MAX_SLOT_GROUP_NUM = 4;
33 constexpr uint32_t MAX_ICON_SIZE = 50 * 1024;
34 constexpr uint32_t MAX_PICTURE_SIZE = 2 * 1024 * 1024;
35 constexpr bool SUPPORT_DO_NOT_DISTRUB = true;
36 constexpr uint32_t SYSTEM_SERVICE_UID = 1000;
37 
38 constexpr int32_t SUBSCRIBE_USER_INIT = -1;
39 constexpr int32_t SUBSCRIBE_USER_ALL = -2;
40 constexpr int32_t SUBSCRIBE_USER_SYSTEM_BEGIN = 0;
41 constexpr int32_t SUBSCRIBE_USER_SYSTEM_END = 99;
42 
43 // Default sound for notification
44 const static Uri DEFAULT_NOTIFICATION_SOUND("file://system/etc/Light.ogg");
45 const static std::vector<int64_t> DEFAULT_NOTIFICATION_VIBRATION = {200};
46 
47 // Default path for template
48 const static std::string DEFAULT_TEMPLATE_PATH("/system/etc/notification_template/external.json");
49 
50 #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED
51 constexpr NotificationConstant::DistributedReminderPolicy DEFAULT_DISTRIBUTED_REMINDER_POLICY =
52     NotificationConstant::DistributedReminderPolicy::DEFAULT;
53 constexpr bool DEFAULT_DISTRIBUTED_ENABLE_IN_APPLICATION_INFO = false;
54 #endif
55 }  // namespace Notification
56 }  // namespace OHOS
57 
58 #endif  // BASE_NOTIFICATION_ANS_STANDARD_INNERKITS_BASE_INCLUDE_ANS_CONST_DEFINE_H
59