• 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 DATA_STORAGE_SMS_DATA_H
17 #define DATA_STORAGE_SMS_DATA_H
18 
19 namespace OHOS {
20 namespace Telephony {
21 class SmsMmsInfo {
22 public:
23     static constexpr const char *MSG_ID = "msg_id";
24     static constexpr const char *SLOT_ID = "slot_id";
25     static constexpr const char *RECEIVER_NUMBER = "receiver_number";
26     static constexpr const char *SENDER_NUMBER = "sender_number";
27     static constexpr const char *IS_SENDER = "is_sender";
28     static constexpr const char *START_TIME = "start_time";
29     static constexpr const char *END_TIME = "end_time";
30     static constexpr const char *MSG_TYPE = "msg_type";
31     static constexpr const char *SMS_TYPE = "sms_type";
32     static constexpr const char *MSG_TITLE = "msg_title";
33     static constexpr const char *MSG_CONTENT = "msg_content";
34     static constexpr const char *MSG_STATE = "msg_state";
35     static constexpr const char *MSG_CODE = "msg_code";
36     static constexpr const char *IS_LOCK = "is_lock";
37     static constexpr const char *IS_READ = "is_read";
38     static constexpr const char *IS_COLLECT = "is_collect";
39     static constexpr const char *SESSION_TYPE = "session_type";
40     static constexpr const char *RETRY_NUMBER = "retry_number";
41     static constexpr const char *OPERATOR_SERVICE_NUMBER = "operator_service_number";
42     static constexpr const char *SESSION_ID = "session_id";
43     static constexpr const char *GROUP_ID = "group_id";
44     static constexpr const char *DEVICE_ID = "device_id";
45     static constexpr const char *IS_SUBSECTION = "is_subsection";
46     static constexpr const char *IS_SEND_REPORT = "is_send_report";
47 };
48 
49 class SmsSubsection {
50 public:
51     static constexpr const char *ID = "id";
52     static constexpr const char *SLOT_ID = "slot_id";
53     static constexpr const char *SMS_SUBSECTION_ID = "sms_subsection_id";
54     static constexpr const char *RECEIVER_NUMBER = "receiver_number";
55     static constexpr const char *SENDER_NUMBER = "sender_number";
56     static constexpr const char *IS_SENDER = "is_sender";
57     static constexpr const char *START_TIME = "start_time";
58     static constexpr const char *END_TIME = "end_time";
59     static constexpr const char *REW_PUD = "raw_pdu";
60     static constexpr const char *FORMAT = "format";
61     static constexpr const char *DEST_PORT = "dest_port";
62     static constexpr const char *SUBSECTION_INDEX = "subsection_index";
63     static constexpr const char *SIZE = "size";
64 };
65 
66 class MmsProtocol {
67 public:
68     static constexpr const char *ID = "id";
69     static constexpr const char *BCC = "bcc";
70     static constexpr const char *CC = "cc";
71     static constexpr const char *CONTENT_LOCATION = "content_location";
72     static constexpr const char *DATE = "date";
73     static constexpr const char *DELIVERY_REPORT = "delivery_report";
74     static constexpr const char *DELIVERY_TIME = "delivery_time";
75     static constexpr const char *EXPIRY = "expiry";
76     static constexpr const char *TYPE = "type";
77     static constexpr const char *SERIAL_NUMBER = "serial_number";
78     static constexpr const char *CATEGORY = "category";
79     static constexpr const char *VERSION = "version";
80     static constexpr const char *SIZE = "size";
81     static constexpr const char *PRIORITY = "priority";
82     static constexpr const char *READ_REPLY = "read_reply";
83     static constexpr const char *REPORT_ALLOWED = "report_allowed";
84     static constexpr const char *RESPONSE_STATUS = "response_status";
85     static constexpr const char *RESPONSE_TEXT = "response_text";
86     static constexpr const char *SENDER_VISIBILITY = "sender_visibility";
87 };
88 
89 class MmsPart {
90 public:
91     static constexpr const char *ID = "id";
92     static constexpr const char *PART_INDEX = "part_index";
93     static constexpr const char *PART_SIZE = "part_size";
94     static constexpr const char *RECORDING_TIME = "recording_time";
95     static constexpr const char *TYPE = "type";
96     static constexpr const char *LOCATION_PATH = "location_path";
97     static constexpr const char *STATE = "state";
98     static constexpr const char *ENCODE = "encode";
99     static constexpr const char *CONTENT = "content";
100 };
101 
102 constexpr const char *TABLE_SMS_MMS_INFO = "sms_mms_info";
103 constexpr const char *TABLE_SMS_SUBSECTION = "sms_subsection";
104 constexpr const char *TABLE_MMS_PROTOCOL = "mms_protocol";
105 constexpr const char *TABLE_MMS_PART = "mms_part";
106 constexpr const char *SMS_MMS_URI = "dataability:///com.ohos.smsmmsability";
107 } // namespace Telephony
108 } // namespace OHOS
109 #endif // DATA_STORAGE_SMS_DATA_H
110