blob: 3bb640a0289e543e375f9b065a4693b39eada40f [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35/*****************************************************************************
36 *
37 * Filename:
38 * ---------
39 * smsal_peer_struct.h
40 *
41 * Project:
42 * --------
43 * MAUI
44 *
45 * Description:
46 * ------------
47 * This file is for packing and unpacking of SMS-TL peer message.
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 *============================================================================
54 * HISTORY
55 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
56 *------------------------------------------------------------------------------
57 * removed!
58 *
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 *
67 *------------------------------------------------------------------------------
68 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
69 *============================================================================
70 ****************************************************************************/
71
72/********************************************************************************
73* Copyright Statement:
74* --------------------
75*
76* This product has been developed using a protocol stack
77* developed by Sasken Communication Technologies Limited.
78*
79********************************************************************************/
80
81/*******************************************************************************
82* Copyright Statement:
83* --------------------
84* This software is protected by Copyright and the information contained
85* herein is confidential. The software may not be copied and the information
86* contained herein may not be used or disclosed except with the written
87* permission of MediaTek Inc. (C) 2002
88*
89*******************************************************************************
90 * FILENAME : smsal_peer_struct.h
91 * SYNOPSIS : Functions for encoding/decoding.
92 *
93 * R E V I S I O N H I S T O R Y
94 *
95 */
96#ifndef _SMSAL_PEER_STRUCT_H
97#define _SMSAL_PEER_STRUCT_H
98
99#include "kal_general_types.h"
100
101typedef struct {
102 kal_uint8 fill_bits2; /* always set to zero*/
103 kal_uint8 udh_p; /* indicates the presence of
104 user data header*/
105 kal_uint8 fill_bits1; /* always set to zero*/
106 kal_uint8 msg_type; /* deliver report type*/
107 kal_uint8 fail_cause;
108 kal_uint8 params_p; /* depicts presence of
109 optional parameters*/
110 kal_uint8 pid; /* to be bit-wise encoded*/
111 kal_uint8 dcs; /* to be bit-wise encoded*/
112 kal_uint8 user_data_len;
113 kal_uint8 no_user_data;
114 kal_uint8 user_data_size;
115 kal_uint8 *user_data; /* can include user data header*/
116} smsal_deliver_report_nack_peer_struct;
117
118typedef struct {
119 kal_uint8 fill_bits2; /* always set to zero*/
120 kal_uint8 udh_p; /* indicates the presence of
121 user data header*/
122 kal_uint8 fill_bits1; /* always set to zero*/
123 kal_uint8 msg_type; /* deliver report type*/
124 kal_uint8 params_p; /* depicts presence of
125 optional parameters*/
126 kal_uint8 pid; /* to be bit-wise encoded*/
127 kal_uint8 dcs; /* to be bit-wise encoded*/
128 kal_uint8 user_data_len;
129 kal_uint8 no_user_data;
130 kal_uint8 user_data_size;
131 kal_uint8 *user_data; /* can include user data header*/
132} smsal_deliver_report_ack_peer_struct;
133
134typedef struct {
135 kal_uint8 reply_flag; /* whether reply is sought*/
136 kal_uint8 udh_p; /* indicates presence of
137 user data header*/
138 kal_uint8 status_rep_flag; /* whether status reports
139 are sought*/
140 kal_uint8 vp_flag; /* indicates presence of
141 validity period*/
142 kal_uint8 rej_dup_flag;
143 kal_uint8 msg_type; /* sms submit*/
144 kal_uint8 msg_ref; /* to be read from SIM*/
145 kal_uint8 no_dest_addr;
146 kal_uint8 dest_addr_size;
147 kal_uint8 *dest_addr; /* assumed to be
148 byte-packed*/
149 kal_uint8 pid; /* to be bit-wise encoded*/
150 kal_uint8 dcs; /* to be bit-wise encoded*/
151 kal_uint8 no_validity_period;
152 kal_uint8 validity_period_size;
153 kal_uint8 *validity_period; /* to be
154 bit/byte-wise
155 encoded, cannot
156 be even represnted
157 using CHOICE*/
158 kal_uint8 user_data_len;
159 kal_uint8 no_user_data;
160 kal_uint8 user_data_size;
161 kal_uint8 *user_data; /* can have user data header also*/
162} smsal_submit_peer_struct;
163
164typedef struct {
165 kal_uint8 reply_flag; /* whether reply is sought*/
166 kal_uint8 udh_p; /* indicates presence of
167 user data header*/
168 kal_uint8 status_rep_flag; /* whether status reports
169 are sought*/
170 kal_uint8 fill_bits; /* to be ignored*/
171 kal_uint8 mms; /* more message to send*/
172 kal_uint8 msg_type; /* sms deliver*/
173 kal_uint8 no_orig_addr;
174 kal_uint8 orig_addr_size;
175 kal_uint8 *orig_addr; /* assumed to be
176 byte-packed*/
177 kal_uint8 pid; /* to be bit-wise decoded*/
178 kal_uint8 dcs; /* to be bit-wise decoded*/
179 kal_uint8 scts[7];
180 kal_uint8 user_data_len;
181 kal_uint8 no_user_data;
182 kal_uint8 user_data_size;
183 kal_uint8 *user_data; /* can have user data header also*/
184} smsal_deliver_peer_struct;
185
186typedef struct {
187 kal_uint8 fill_bits2; /* to be ignored*/
188 kal_uint8 udh_p; /* indicates presence of
189 user data header*/
190 kal_uint8 fill_bits1; /* to be ignored*/
191 kal_uint8 msg_type; /* sms submit report*/
192 kal_uint8 fail_cause;
193 kal_uint8 params_p; /* depicts presence of
194 optional params*/
195 kal_uint8 scts[7];
196 kal_uint8 pid; /* to be bit-wise decoded*/
197 kal_uint8 dcs; /* to be bit-wise decoded*/
198 kal_uint8 user_data_len;
199 kal_uint8 no_user_data;
200 kal_uint8 user_data_size;
201 kal_uint8 *user_data; /* can have user data header also*/
202} smsal_submit_report_nack_peer_struct;
203
204typedef struct {
205 kal_uint8 fill_bits2; /* to be ignored*/
206 kal_uint8 udh_p; /* indicates presence of
207 user data header*/
208 kal_uint8 fill_bits1; /* to be ignored*/
209 kal_uint8 msg_type; /* sms submit report*/
210 kal_uint8 params_p; /* depicts presence of
211 optional parameters*/
212 kal_uint8 scts[7];
213 kal_uint8 pid; /* to be bit-wise decoded*/
214 kal_uint8 dcs; /* to be bit-wise decoded*/
215 kal_uint8 user_data_len;
216 kal_uint8 no_user_data;
217 kal_uint8 user_data_size;
218 kal_uint8 *user_data; /* can have user data header also*/
219} smsal_submit_report_ack_peer_struct;
220
221typedef struct {
222 kal_uint8 fill_bits1; /* to be ignored*/
223 kal_uint8 udh_p; /* indicates presence of
224 user data header*/
225 kal_uint8 status_rep_type; /* sms command or sms
226 submit*/
227 kal_uint8 fill_bits2; /* to be ignored*/
228 kal_uint8 mms;
229 kal_uint8 msg_type; /* sms status report*/
230 kal_uint8 msg_ref;
231 kal_uint8 no_rcpnt_addr;
232 kal_uint8 rcpnt_addr_size;
233 kal_uint8 *rcpnt_addr;
234 kal_uint8 scts[7];
235 kal_uint8 dis_time[7];
236 kal_uint8 status; /* actual status of submit*/
237 kal_uint8 params_p; /* depicts presence of
238 optional parameters*/
239 kal_uint8 pid; /* to be bit-wise decoded*/
240 kal_uint8 dcs; /* to be bit-wise decoded*/
241 kal_uint8 user_data_len;
242 kal_uint8 no_user_data;
243 kal_uint8 user_data_size;
244 kal_uint8 *user_data; /* can have user data header also*/
245} smsal_status_report_peer_struct;
246
247typedef struct {
248 kal_uint8 fill_bits1; /* to be ignored*/
249 kal_uint8 udh_p; /* indicates presence of user data header*/
250 kal_uint8 status_rep_req;
251 kal_uint8 fill_bits3; /* to be ignored*/
252 kal_uint8 msg_type; /* sms command*/
253 kal_uint8 msg_ref; /* TP-MR*/
254 kal_uint8 pid; /* TP-PID*/
255 kal_uint8 cmd_type; /* TP-CT*/
256 kal_uint8 msg_num; /* TP-MN*/
257 kal_uint8 no_dest_addr;
258 kal_uint8 dest_addr_size;
259 kal_uint8 *dest_addr; /* TP-DA*/
260 kal_uint8 cmd_data_len; /* TP-CDL*/
261 kal_uint8 no_cmd_data;
262 kal_uint8 cmd_data_size;
263 kal_uint8 *cmd_data; /* TP-CD*/
264} smsal_command_peer_struct;
265#endif
266
267