1 /* 2 * Copyright (c) 2023 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_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_TABLE_H 17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_TABLE_H 18 19 #include <vector> 20 #include <string> 21 22 namespace OHOS { 23 namespace Notification { 24 class ReminderTable { 25 public: 26 static void InitDbColumns(); 27 28 // Reminder Table Basic Columns. 29 30 /* 31 * reminder id 32 */ 33 static const std::string REMINDER_ID; 34 35 /* 36 * package name 37 */ 38 static const std::string PKG_NAME; 39 40 /* 41 * user id 42 */ 43 static const std::string USER_ID; 44 45 /* 46 * uid 47 */ 48 static const std::string UID; 49 50 /* 51 * systerm app flag 52 */ 53 static const std::string SYS_APP; 54 55 /* 56 * app label 57 */ 58 static const std::string APP_LABEL; 59 60 /* 61 * reminder type: Timer/Calendar/Alarm 62 */ 63 static const std::string REMINDER_TYPE; 64 65 /* 66 * reminder time 67 */ 68 static const std::string REMINDER_TIME; 69 70 /* 71 * trigger time 72 */ 73 static const std::string TRIGGER_TIME; 74 75 /* 76 * RTC trigger time 77 */ 78 static const std::string RTC_TRIGGER_TIME; 79 80 /* 81 * time interval 82 */ 83 static const std::string TIME_INTERVAL; 84 85 /* 86 * snooze times 87 */ 88 static const std::string SNOOZE_TIMES; 89 90 /* 91 * dynamic snooze times 92 */ 93 static const std::string DYNAMIC_SNOOZE_TIMES; 94 95 /* 96 * ring duration 97 */ 98 static const std::string RING_DURATION; 99 100 /* 101 * expired flag 102 */ 103 static const std::string IS_EXPIRED; 104 105 /* 106 * active flag 107 */ 108 static const std::string IS_ACTIVE; 109 110 /* 111 * reminder state 112 */ 113 static const std::string STATE; 114 115 /* 116 * zone id 117 */ 118 static const std::string ZONE_ID; 119 120 /* 121 * scheduled timeout flag 122 */ 123 static const std::string HAS_SCHEDULED_TIMEOUT; 124 125 /* 126 * action button information 127 */ 128 static const std::string ACTION_BUTTON_INFO; 129 130 /* 131 * custom button uri 132 */ 133 static const std::string CUSTOM_BUTTON_URI; 134 135 /* 136 * slot type 137 */ 138 static const std::string SLOT_ID; 139 140 /* 141 * snoozeslot type 142 */ 143 static const std::string SNOOZE_SLOT_ID; 144 145 /* 146 * notification id 147 */ 148 static const std::string NOTIFICATION_ID; 149 150 /* 151 * notification title 152 */ 153 static const std::string TITLE; 154 155 /* 156 * notification content 157 */ 158 static const std::string CONTENT; 159 160 /* 161 * notification snooze content 162 */ 163 static const std::string SNOOZE_CONTENT; 164 165 /* 166 * notification expired content 167 */ 168 static const std::string EXPIRED_CONTENT; 169 170 /* 171 * agent information 172 */ 173 static const std::string AGENT; 174 175 /* 176 * max screen agent information 177 */ 178 static const std::string MAX_SCREEN_AGENT; 179 180 /* 181 * tap dismissed flag 182 */ 183 static const std::string TAP_DISMISSED; 184 185 /* 186 * auto deleted time 187 */ 188 static const std::string AUTO_DELETED_TIME; 189 190 /* 191 * repeat days of week 192 */ 193 static const std::string REPEAT_DAYS_OF_WEEK; 194 195 /* 196 * reminder group id 197 */ 198 static const std::string GROUP_ID; 199 200 /* 201 * reminder ring uri 202 */ 203 static const std::string CUSTOM_RING_URI; 204 205 /* 206 * reminder creator bundle name 207 */ 208 static const std::string CREATOR_BUNDLE_NAME; 209 210 // Reminder Table Calendar Columns. 211 static const std::string REPEAT_DAYS; 212 static const std::string REPEAT_MONTHS; 213 static const std::string FIRST_DESIGNATE_YEAR; 214 static const std::string FIRST_DESIGNATE_MONTH; 215 static const std::string FIRST_DESIGNATE_DAY; 216 static const std::string CALENDAR_YEAR; 217 static const std::string CALENDAR_MONTH; 218 static const std::string CALENDAR_DAY; 219 static const std::string CALENDAR_HOUR; 220 static const std::string CALENDAR_MINUTE; 221 222 // Reminder Table Alarm Columns. 223 static const std::string ALARM_HOUR; 224 static const std::string ALARM_MINUTE; 225 226 static std::string sqlOfAddColumns; 227 static std::vector<std::string> columns; 228 229 private: 230 static void InitBasicColumns(); 231 static void InitCalendarColumns(); 232 static void InitAlarmColumns(); 233 static void AddColumn(const std::string& name, const std::string& type, bool isEnd = false); 234 }; 235 } // namespace Notification 236 } // namespace OHOS 237 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_TABLE_H 238