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_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H 17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H 18 19 #include <vector> 20 #include <string> 21 22 namespace OHOS { 23 namespace Notification { 24 class ReminderBaseTable { 25 public: 26 /* 27 * reminder base table name 28 */ 29 static const std::string TABLE_NAME; 30 31 /* 32 * reminder id 33 */ 34 static const std::string REMINDER_ID; 35 36 /* 37 * package name 38 */ 39 static const std::string PACKAGE_NAME; 40 41 /* 42 * user id 43 */ 44 static const std::string USER_ID; 45 46 /* 47 * uid 48 */ 49 static const std::string UID; 50 51 /* 52 * systerm app flag 53 */ 54 static const std::string SYSTEM_APP; 55 56 /* 57 * reminder type: Timer/Calendar/Alarm 58 */ 59 static const std::string REMINDER_TYPE; 60 61 /* 62 * reminder time 63 */ 64 static const std::string REMINDER_TIME; 65 66 /* 67 * trigger time 68 */ 69 static const std::string TRIGGER_TIME; 70 71 /* 72 * time interval 73 */ 74 static const std::string TIME_INTERVAL; 75 76 /* 77 * snooze times 78 */ 79 static const std::string SNOOZE_TIMES; 80 81 /* 82 * dynamic snooze times 83 */ 84 static const std::string DYNAMIC_SNOOZE_TIMES; 85 86 /* 87 * ring duration 88 */ 89 static const std::string RING_DURATION; 90 91 /* 92 * expired flag 93 */ 94 static const std::string IS_EXPIRED; 95 96 /* 97 * reminder state 98 */ 99 static const std::string STATE; 100 101 /* 102 * action button information 103 */ 104 static const std::string ACTION_BUTTON_INFO; 105 106 /* 107 * custom button uri 108 */ 109 static const std::string CUSTOM_BUTTON_URI; 110 111 /* 112 * slot type 113 */ 114 static const std::string SLOT_ID; 115 116 /* 117 * snoozeslot type 118 */ 119 static const std::string SNOOZE_SLOT_ID; 120 121 /* 122 * notification id 123 */ 124 static const std::string NOTIFICATION_ID; 125 126 /* 127 * notification title 128 */ 129 static const std::string TITLE; 130 static const std::string TITLE_RESOURCE_ID; 131 132 /* 133 * notification content 134 */ 135 static const std::string CONTENT; 136 static const std::string CONTENT_RESOURCE_ID; 137 138 /* 139 * notification snooze content 140 */ 141 static const std::string SNOOZE_CONTENT; 142 static const std::string SNOOZE_CONTENT_RESOURCE_ID; 143 144 /* 145 * notification expired content 146 */ 147 static const std::string EXPIRED_CONTENT; 148 static const std::string EXPIRED_CONTENT_RESOURCE_ID; 149 150 /* 151 * want agent information 152 */ 153 static const std::string WANT_AGENT; 154 155 /* 156 * max screen want agent information 157 */ 158 static const std::string MAX_SCREEN_WANT_AGENT; 159 160 /* 161 * tap dismissed flag 162 */ 163 static const std::string TAP_DISMISSED; 164 165 /* 166 * auto deleted time 167 */ 168 static const std::string AUTO_DELETED_TIME; 169 170 /* 171 * group id 172 */ 173 static const std::string GROUP_ID; 174 175 /* 176 * custom ring uri 177 */ 178 static const std::string CUSTOM_RING_URI; 179 180 /* 181 * creator bundle name 182 */ 183 static const std::string CREATOR_BUNDLE_NAME; 184 185 /* 186 * creator uid 187 */ 188 static const std::string CREATOR_UID; 189 190 static const std::string RING_CHANNEL; 191 192 public: 193 static void InitDbColumns(); 194 195 public: 196 static std::string ADD_COLUMNS; 197 static std::string SELECT_COLUMNS; 198 }; 199 200 class ReminderAlarmTable { 201 public: 202 /* 203 * reminder alarm table name 204 */ 205 static const std::string TABLE_NAME; 206 207 /* 208 * reminder timer table field 209 */ 210 static const std::string REMINDER_ID; 211 static const std::string ALARM_HOUR; 212 static const std::string ALARM_MINUTE; 213 static const std::string REPEAT_DAYS_OF_WEEK; 214 215 public: 216 static void InitDbColumns(); 217 218 public: 219 static std::string ADD_COLUMNS; 220 static std::string SELECT_COLUMNS; 221 }; 222 223 class ReminderCalendarTable { 224 public: 225 /* 226 * reminder calendar table name 227 */ 228 static const std::string TABLE_NAME; 229 230 /* 231 * reminder calendar table field 232 */ 233 static const std::string REMINDER_ID; 234 static const std::string FIRST_DESIGNATE_YEAR; 235 static const std::string FIRST_DESIGNATE_MONTH; 236 static const std::string FIRST_DESIGNATE_DAY; 237 static const std::string CALENDAR_DATE_TIME; 238 static const std::string CALENDAR_END_DATE_TIME; 239 static const std::string REPEAT_DAYS; 240 static const std::string REPEAT_MONTHS; 241 static const std::string REPEAT_DAYS_OF_WEEK; 242 static const std::string RRULE_WANT_AGENT; 243 static const std::string EXCLUDE_DATES; 244 static const std::string CALENDAR_LAST_DATE_TIME; 245 246 public: 247 static void InitDbColumns(); 248 249 public: 250 static std::string ADD_COLUMNS; 251 static std::string SELECT_COLUMNS; 252 }; 253 254 class ReminderTimerTable { 255 public: 256 /* 257 * reminder timer table name 258 */ 259 static const std::string TABLE_NAME; 260 261 /* 262 * reminder timer table field 263 */ 264 static const std::string REMINDER_ID; 265 static const std::string TRIGGER_SECOND; 266 static const std::string START_DATE_TIME; 267 static const std::string END_DATE_TIME; 268 269 public: 270 static void InitDbColumns(); 271 272 public: 273 static std::string ADD_COLUMNS; 274 static std::string SELECT_COLUMNS; 275 }; 276 } // namespace Notification 277 } // namespace OHOS 278 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H 279