1 gsmupdu.h |
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contains a class representing the generic interface to a GSM SMS PDU (CSmsPDU) as well as six concrete implementations representing the six types of CSmsPDU, namely CSmsDeliver, CSmsSubmit, CSmsDeliverReport, CSmsSubmitReport, CSmsStatusReport and CSmsCommand |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 */ |
|
23 |
|
24 #ifndef __GSMUPDU_H__ |
|
25 #define __GSMUPDU_H__ |
|
26 |
|
27 #include <gsmuelem.h> |
|
28 // forwarded class declarations |
|
29 |
|
30 class TGsmSms; |
|
31 class CSmsAddress; |
|
32 |
|
33 |
|
34 /** |
|
35 * A generic interface to a GSM SMS PDU. |
|
36 * |
|
37 * The class can be used on its own to encode GSM SMS PDUs. It is also the base |
|
38 * class for the six real implementations of GSM SMS PDUs. The derived classes |
|
39 * are built up from the elements defined in gsmuelem.h according to the ETSI |
|
40 * GSM 03.40. All the SMS elements have generic encode and decode functions so |
|
41 * that each PDU type knows how to encode and decode itself into a TGsmSms. |
|
42 * |
|
43 * CSmsPDU and derived classes provide a human readable interface to a GSM SMS |
|
44 * PDU, for example setting the destination address on a SUBMIT (CSmsSubmit). |
|
45 * All the factory functions for CSmsPDUs are provided in the base class. |
|
46 * |
|
47 * @publishedAll |
|
48 * @released |
|
49 */ |
|
50 class CSmsPDU : public CBase |
|
51 { |
|
52 public: |
|
53 //note the enum values must be kept to ensure future binary compatibility with the TSAREntry store. |
|
54 /** Flags for the 6 basic PDU types in GSM SMS messaging. */ |
|
55 enum TSmsPDUType |
|
56 { |
|
57 ESmsDeliver = 0, ///< SMS-DELIVER, sent from SC to MS |
|
58 ESmsDeliverReport = 1, ///< SMS-DELIVER-REPORT, sent from MS to SC |
|
59 ESmsSubmit = 2, ///< SMS-SUBMIT, sent from MS to SC |
|
60 ESmsSubmitReport = 3, ///< SMS-SUBMIT-REPORT, sent from SC to MS |
|
61 ESmsStatusReport = 4, ///< SMS-STATUS-REQUEST, sent from SC to MS |
|
62 ESmsCommand = 5 ///< SMS-COMMAND, sent from MS to SC |
|
63 }; |
|
64 public: |
|
65 IMPORT_C static CSmsPDU* NewL(RReadStream &aStream,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
66 IMPORT_C static CSmsPDU* NewL(const TGsmSms& aGsmSms,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError=EFalse,TBool aIsMobileTerminated=ETrue); |
|
67 IMPORT_C static CSmsPDU* NewL(TSmsPDUType aType,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError=EFalse); |
|
68 |
|
69 inline TSmsPDUType Type() const; |
|
70 |
|
71 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
72 |
|
73 IMPORT_C void EncodeMessagePDUL(TGsmSms& aGsmSms) const; |
|
74 |
|
75 IMPORT_C TPtrC ServiceCenterAddress() const; |
|
76 IMPORT_C void SetServiceCenterAddressL(const TDesC& aAddress); |
|
77 IMPORT_C void ParsedServiceCenterAddress(TGsmSmsTelNumber& aParsedAddress) const; |
|
78 IMPORT_C void SetParsedServiceCenterAddressL(const TGsmSmsTelNumber& aParsedAddress); |
|
79 |
|
80 IMPORT_C TPtrC ToFromAddress() const; |
|
81 IMPORT_C void SetToFromAddressL(const TDesC& aAddress); |
|
82 IMPORT_C void ParsedToFromAddress(TGsmSmsTelNumber& aParsedAddress) const; |
|
83 IMPORT_C void SetParsedToFromAddressL(const TGsmSmsTelNumber& aParsedAddress); |
|
84 |
|
85 // Functions on data coding scheme |
|
86 IMPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4 Bits7To4() const; |
|
87 IMPORT_C void SetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4 aBits7To4); |
|
88 |
|
89 IMPORT_C TSmsDataCodingScheme::TSmsAlphabet Alphabet() const; |
|
90 IMPORT_C void SetAlphabet(TSmsDataCodingScheme::TSmsAlphabet aAlphabet); |
|
91 IMPORT_C TBool Class(TSmsDataCodingScheme::TSmsClass& aClass) const; |
|
92 IMPORT_C void SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass); |
|
93 IMPORT_C TBool TextCompressed() const; |
|
94 IMPORT_C void SetTextCompressed(TBool aCompressed); |
|
95 |
|
96 IMPORT_C TSmsDataCodingScheme::TSmsIndicationState IndicationState() const; |
|
97 IMPORT_C void SetIndicationState(TSmsDataCodingScheme::TSmsIndicationState aState); |
|
98 IMPORT_C TSmsDataCodingScheme::TSmsIndicationType IndicationType() const; |
|
99 IMPORT_C void SetIndicationType(TSmsDataCodingScheme::TSmsIndicationType aType); |
|
100 |
|
101 // Functions on concatenation user data information element |
|
102 IMPORT_C TBool TextConcatenated(TBool* aIs16Bit=NULL) const; |
|
103 IMPORT_C void SetTextConcatenatedL(TBool aConcatenated,TBool aIs16Bit=EFalse); |
|
104 IMPORT_C TInt ConcatenatedMessageReference() const; |
|
105 IMPORT_C void SetConcatenatedMessageReference(TInt aReference); |
|
106 IMPORT_C TInt NumConcatenatedMessagePDUs() const; |
|
107 IMPORT_C void SetNumConcatenatedMessagePDUs(TInt aNum); |
|
108 IMPORT_C TInt ConcatenatedMessagePDUIndex() const; |
|
109 IMPORT_C void SetConcatenatedMessagePDUIndex(TInt aIndex); |
|
110 |
|
111 // Functions for application port addressing |
|
112 IMPORT_C TBool ApplicationPortAddressing(TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit=NULL) const; |
|
113 IMPORT_C void SetApplicationPortAddressingL(TBool aAddressing,TInt aDestination,TInt aOriginator,TBool aIs16Bit=EFalse); |
|
114 |
|
115 // Functions on protocol identifier |
|
116 IMPORT_C TSmsProtocolIdentifier::TSmsPIDType PIDType() const; |
|
117 IMPORT_C void SetPIDType(TSmsProtocolIdentifier::TSmsPIDType aSmsPIDType); |
|
118 IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator TelematicDeviceIndicator() const; |
|
119 IMPORT_C void SetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator aIndicator); |
|
120 |
|
121 |
|
122 //-- concern 'ShortMessageType' |
|
123 IMPORT_C TSmsProtocolIdentifier::TSmsShortMessageType ShortMessageType() const; |
|
124 IMPORT_C void SetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType aShortMessageType); |
|
125 |
|
126 |
|
127 IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceType TelematicDeviceType() const; |
|
128 IMPORT_C void SetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType aDeviceType); |
|
129 |
|
130 // Functions on parameter indicator |
|
131 IMPORT_C TBool UserDataPresent() const; |
|
132 IMPORT_C void SetUserDataPresent(TBool aPresent); |
|
133 IMPORT_C TBool DataCodingSchemePresent() const; |
|
134 IMPORT_C void SetDataCodingSchemePresent(TBool aPresent); |
|
135 IMPORT_C TBool ProtocolIdentifierPresent() const; |
|
136 IMPORT_C void SetProtocolIdentifierPresent(TBool aPresent); |
|
137 |
|
138 IMPORT_C CSmsUserData& UserData(); |
|
139 IMPORT_C const CSmsUserData& UserData() const; |
|
140 virtual void DecodeL(TGsmuLex8& aPdu)=0; |
|
141 void UpdateConcatenationDataL(TGsmSms& aGsmSms, TInt aRef, TInt aPduIndex, TInt aMaxPdu); |
|
142 void UpdateEmailHeaderDataL(TGsmSms& aGsmSms,TInt& aEmailOverallHeaderLength); |
|
143 |
|
144 // SMSC Control Parameters |
|
145 TBool UpdateSMSCCtrlParameterL(TGsmSms& aGsmSms, const TUint8 aOctet); |
|
146 |
|
147 // TPSRR Scheme |
|
148 TBool UpdateTPSRRL(TGsmSms& aGsmSms, TSmsFirstOctet aSmsReportRequest); |
|
149 |
|
150 // National Language Encoding |
|
151 IMPORT_C TSmsEncoding NationalLanguageEncoding() const; |
|
152 IMPORT_C void SetNationalLanguageEncodingL(TSmsEncoding aEncoding); |
|
153 |
|
154 protected: |
|
155 CSmsPDU(TSmsPDUType aSmsPDUType); |
|
156 |
|
157 virtual const TSmsDataCodingScheme* DataCodingScheme() const; // Functions made const to avoid too many definitions |
|
158 virtual const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
159 virtual const TSmsParameterIndicator* ParameterIndicator() const; |
|
160 virtual const CSmsUserData* UserDataPtr() const; |
|
161 virtual const CSmsAddress* ToFromAddressPtr() const; |
|
162 |
|
163 virtual void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs)=0; |
|
164 virtual TUint8* EncodeL(TUint8* aPtr) const=0; |
|
165 |
|
166 virtual void InternalizeMessagePDUL(RReadStream& aStream)=0; |
|
167 virtual void ExternalizeMessagePDUL(RWriteStream& aStream) const=0; |
|
168 |
|
169 private: |
|
170 TBool DoTextConcatenated(TInt& aIndex,TBool* aIs16Bit) const; |
|
171 void DoSetTextConcatenatedL(TBool aIs16Bit); |
|
172 TBool DoApplicationPortAddressing(TInt& aIndex,TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const; |
|
173 void DoSetApplicationPortAddressingL(TInt aDestination,TInt aOriginator,TBool aIs16Bit); |
|
174 |
|
175 private: |
|
176 const TSmsPDUType iSmsPDUType; |
|
177 |
|
178 protected: |
|
179 CSmsAddress* iServiceCenterAddress; |
|
180 }; |
|
181 |
|
182 |
|
183 /** |
|
184 * SMS-DELIVER PDU - SC to MS |
|
185 * @publishedAll |
|
186 * @released |
|
187 */ |
|
188 class CSmsDeliver : public CSmsPDU |
|
189 { |
|
190 public: |
|
191 CSmsDeliver(); |
|
192 ~CSmsDeliver(); |
|
193 |
|
194 IMPORT_C TBool MoreMessagesToSend() const; |
|
195 IMPORT_C void SetMoreMessagesToSend(TBool aMore); |
|
196 |
|
197 IMPORT_C TBool ReplyPath() const; |
|
198 IMPORT_C void SetReplyPath(TBool aReplyPath); |
|
199 |
|
200 IMPORT_C TBool StatusReportIndication() const; |
|
201 IMPORT_C void SetStatusReportIndication(TBool aIndication); |
|
202 |
|
203 IMPORT_C void ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours); |
|
204 IMPORT_C void SetServiceCenterTimeStamp(const TTime& aTime,TInt aNumQuarterHours=0); |
|
205 IMPORT_C const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
206 |
|
207 protected: |
|
208 const TSmsDataCodingScheme* DataCodingScheme() const; |
|
209 const CSmsUserData* UserDataPtr() const; |
|
210 const CSmsAddress* ToFromAddressPtr() const; |
|
211 |
|
212 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
213 TUint8* EncodeL(TUint8* aPtr) const; |
|
214 void DecodeL(TGsmuLex8& aPdu); |
|
215 void InternalizeMessagePDUL(RReadStream& aStream); |
|
216 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
217 |
|
218 private: |
|
219 TSmsFirstOctet iFirstOctet; |
|
220 CSmsAddress* iOriginalAddress; |
|
221 TSmsProtocolIdentifier iProtocolIdentifier; |
|
222 TSmsDataCodingScheme iDataCodingScheme; |
|
223 TSmsServiceCenterTimeStamp iServiceCenterTimeStamp; |
|
224 CSmsUserData* iUserData; |
|
225 }; |
|
226 |
|
227 |
|
228 /** |
|
229 * SMS-SUBMIT PDU - MS to SC |
|
230 * @publishedAll |
|
231 * @released |
|
232 */ |
|
233 class CSmsSubmit : public CSmsPDU |
|
234 { |
|
235 public: |
|
236 CSmsSubmit(); |
|
237 ~CSmsSubmit(); |
|
238 |
|
239 IMPORT_C TBool RejectDuplicates() const; |
|
240 IMPORT_C void SetRejectDuplicates(TBool aRejectDuplicates); |
|
241 |
|
242 IMPORT_C TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const; |
|
243 IMPORT_C void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); |
|
244 |
|
245 IMPORT_C TBool ReplyPath() const; |
|
246 IMPORT_C void SetReplyPath(TBool aReplyPath); |
|
247 |
|
248 IMPORT_C TBool StatusReportRequest() const; |
|
249 IMPORT_C void SetStatusReportRequest(TBool aRequest); |
|
250 |
|
251 IMPORT_C TInt MessageReference() const; |
|
252 IMPORT_C void SetMessageReference(TInt aMessageReference); |
|
253 |
|
254 IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const; |
|
255 IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aTimeIntervalMinutes); |
|
256 |
|
257 protected: |
|
258 const TSmsDataCodingScheme* DataCodingScheme() const; |
|
259 const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
260 const CSmsUserData* UserDataPtr() const; |
|
261 const CSmsAddress* ToFromAddressPtr() const; |
|
262 |
|
263 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
264 TUint8* EncodeL(TUint8* aPtr) const; |
|
265 void DecodeL(TGsmuLex8& aPdu); |
|
266 void InternalizeMessagePDUL(RReadStream& aStream); |
|
267 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
268 |
|
269 private: |
|
270 TSmsFirstOctet iFirstOctet; |
|
271 TSmsOctet iMessageReference; |
|
272 CSmsAddress* iDestinationAddress; |
|
273 TSmsProtocolIdentifier iProtocolIdentifier; |
|
274 TSmsDataCodingScheme iDataCodingScheme; |
|
275 TSmsValidityPeriod iValidityPeriod; |
|
276 CSmsUserData* iUserData; |
|
277 }; |
|
278 |
|
279 |
|
280 /** |
|
281 * SMS-DELIVER-REPORT PDU - MS to SC |
|
282 * @publishedAll |
|
283 * @released |
|
284 */ |
|
285 class CSmsDeliverReport : public CSmsPDU |
|
286 { |
|
287 public: |
|
288 CSmsDeliverReport(TBool aIsRPError=EFalse); |
|
289 ~CSmsDeliverReport(); |
|
290 |
|
291 inline TBool IsRPError() const; |
|
292 inline void SetIsRPError(TBool aIsRPError); |
|
293 |
|
294 IMPORT_C TInt FailureCause() const; |
|
295 IMPORT_C void SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause); |
|
296 |
|
297 protected: |
|
298 const TSmsDataCodingScheme* DataCodingScheme() const; |
|
299 const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
300 const TSmsParameterIndicator* ParameterIndicator() const; |
|
301 const CSmsUserData* UserDataPtr() const; |
|
302 |
|
303 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
304 TUint8* EncodeL(TUint8* aPtr) const; |
|
305 void DecodeL(TGsmuLex8& aPdu); |
|
306 void InternalizeMessagePDUL(RReadStream& aStream); |
|
307 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
308 |
|
309 private: |
|
310 TUint8 iIsRPError; |
|
311 |
|
312 TSmsFirstOctet iFirstOctet; |
|
313 TSmsFailureCause iFailureCause; |
|
314 TSmsParameterIndicator iParameterIndicator; |
|
315 TSmsProtocolIdentifier iProtocolIdentifier; |
|
316 TSmsDataCodingScheme iDataCodingScheme; |
|
317 CSmsUserData* iUserData; |
|
318 }; |
|
319 |
|
320 |
|
321 /** |
|
322 * SMS-SUBMIT-REPORT PDU - SC to MS |
|
323 * @publishedAll |
|
324 * @released |
|
325 */ |
|
326 class CSmsSubmitReport : public CSmsPDU |
|
327 { |
|
328 public: |
|
329 CSmsSubmitReport(TBool aIsRPError=EFalse); |
|
330 ~CSmsSubmitReport(); |
|
331 |
|
332 inline TBool IsRPError() const; |
|
333 inline void SetIsRPError(TBool aIsRPError); |
|
334 |
|
335 IMPORT_C TInt FailureCause() const; |
|
336 IMPORT_C void SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause); |
|
337 |
|
338 protected: |
|
339 const TSmsDataCodingScheme* DataCodingScheme() const; |
|
340 const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
341 const TSmsParameterIndicator* ParameterIndicator() const; |
|
342 const CSmsUserData* UserDataPtr() const; |
|
343 |
|
344 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
345 TUint8* EncodeL(TUint8* aPtr) const; |
|
346 void DecodeL(TGsmuLex8& aPdu); |
|
347 void InternalizeMessagePDUL(RReadStream& aStream); |
|
348 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
349 |
|
350 private: |
|
351 TUint8 iIsRPError; |
|
352 |
|
353 TSmsFirstOctet iFirstOctet; |
|
354 TSmsFailureCause iFailureCause; |
|
355 TSmsParameterIndicator iParameterIndicator; |
|
356 TSmsServiceCenterTimeStamp iServiceCenterTimeStamp; |
|
357 TSmsProtocolIdentifier iProtocolIdentifier; |
|
358 TSmsDataCodingScheme iDataCodingScheme; |
|
359 CSmsUserData* iUserData; |
|
360 }; |
|
361 |
|
362 |
|
363 /** |
|
364 * SMS-STATUS-REPORT PDU - SC to MS |
|
365 * @publishedAll |
|
366 * @released |
|
367 */ |
|
368 class CSmsStatusReport : public CSmsPDU |
|
369 { |
|
370 public: |
|
371 CSmsStatusReport(); |
|
372 ~CSmsStatusReport(); |
|
373 |
|
374 inline TBool ParameterIndicatorPresent() const; |
|
375 inline void SetParameterIndicatorPresent(TBool aPresent); |
|
376 |
|
377 IMPORT_C TBool MoreMessagesToSend() const; |
|
378 IMPORT_C void SetMoreMessagesToSend(TBool aMore); |
|
379 |
|
380 IMPORT_C TSmsFirstOctet::TSmsStatusReportQualifier StatusReportQualifier() const; |
|
381 IMPORT_C void SetStatusReportQualifier(TSmsFirstOctet::TSmsStatusReportQualifier aQualifier); |
|
382 |
|
383 IMPORT_C TInt MessageReference() const; |
|
384 IMPORT_C void SetMessageReference(TInt aMessageReference); |
|
385 |
|
386 IMPORT_C void ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours); |
|
387 IMPORT_C void SetServiceCenterTimeStamp(const TTime& aTime,TInt& aNumQuarterHours); |
|
388 |
|
389 IMPORT_C void DischargeTime(TTime& aTime,TInt& aNumQuarterHours); |
|
390 IMPORT_C void SetDischargeTime(const TTime& aTime,TInt& aNumQuarterHours); |
|
391 |
|
392 IMPORT_C TSmsStatus::TSmsStatusValue Status() const; |
|
393 IMPORT_C void SetStatus(TSmsStatus::TSmsStatusValue aValue); |
|
394 |
|
395 protected: |
|
396 const TSmsDataCodingScheme* DataCodingScheme() const; |
|
397 const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
398 const TSmsParameterIndicator* ParameterIndicator() const; |
|
399 const CSmsUserData* UserDataPtr() const; |
|
400 const CSmsAddress* ToFromAddressPtr() const; |
|
401 |
|
402 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
403 TUint8* EncodeL(TUint8* aPtr) const; |
|
404 void DecodeL(TGsmuLex8& aPdu); |
|
405 void InternalizeMessagePDUL(RReadStream& aStream); |
|
406 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
407 |
|
408 private: |
|
409 TUint8 iParameterIndicatorPresent; |
|
410 |
|
411 TSmsFirstOctet iFirstOctet; |
|
412 TSmsOctet iMessageReference; |
|
413 CSmsAddress* iRecipientAddress; |
|
414 TSmsServiceCenterTimeStamp iServiceCenterTimeStamp; |
|
415 TSmsServiceCenterTimeStamp iDischargeTime; |
|
416 TSmsStatus iStatus; |
|
417 TSmsParameterIndicator iParameterIndicator; |
|
418 TSmsProtocolIdentifier iProtocolIdentifier; |
|
419 TSmsDataCodingScheme iDataCodingScheme; |
|
420 CSmsUserData* iUserData; |
|
421 }; |
|
422 |
|
423 |
|
424 /** |
|
425 * SMS-COMMAND PDU - MS to SC |
|
426 * @publishedAll |
|
427 * @released |
|
428 */ |
|
429 class CSmsCommand : public CSmsPDU |
|
430 { |
|
431 public: |
|
432 CSmsCommand(); |
|
433 ~CSmsCommand(); |
|
434 |
|
435 IMPORT_C TBool StatusReportRequest() const; |
|
436 IMPORT_C void SetStatusReportRequest(TBool aRequest); |
|
437 |
|
438 IMPORT_C TInt MessageReference() const; |
|
439 IMPORT_C void SetMessageReference(TInt aMessageReference); |
|
440 |
|
441 IMPORT_C TInt CommandType() const; |
|
442 IMPORT_C void SetCommandType(TSmsCommandType::TSmsCommandTypeValue aCommandType); |
|
443 |
|
444 IMPORT_C TInt MessageNumber() const; |
|
445 IMPORT_C void SetMessageNumber(TInt aMessageNumber); |
|
446 |
|
447 IMPORT_C TInt NumInformationElements() const; |
|
448 IMPORT_C CSmsInformationElement& InformationElement(TInt aIndex) const; |
|
449 CSmsInformationElement*& InformationElementPtr(TInt aIndex) const; |
|
450 IMPORT_C TBool InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, |
|
451 TInt& aIndex) const; |
|
452 IMPORT_C void AddInformationElementL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, TDesC8& aData); |
|
453 IMPORT_C void RemoveInformationElement(TInt aIndex); |
|
454 |
|
455 IMPORT_C TInt MaxCommandDataLength() const; |
|
456 IMPORT_C TPtrC8 CommandData() const; |
|
457 IMPORT_C void SetCommandDataL(const TDesC8& aData); |
|
458 |
|
459 protected: |
|
460 const TSmsProtocolIdentifier* ProtocolIdentifier() const; |
|
461 const CSmsAddress* ToFromAddressPtr() const; |
|
462 |
|
463 void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
|
464 TUint8* EncodeL(TUint8* aPtr) const; |
|
465 void DecodeL(TGsmuLex8& aPdu); |
|
466 void InternalizeMessagePDUL(RReadStream& aStream); |
|
467 void ExternalizeMessagePDUL(RWriteStream& aStream) const; |
|
468 void DoSetStatusReportRequest(TBool aRequest); |
|
469 |
|
470 private: |
|
471 TSmsFirstOctet iFirstOctet; |
|
472 TSmsOctet iMessageReference; |
|
473 TSmsProtocolIdentifier iProtocolIdentifier; |
|
474 TSmsCommandType iCommandType; |
|
475 TSmsOctet iMessageNumber; |
|
476 CSmsAddress* iDestinationAddress; |
|
477 CSmsCommandData* iCommandData; |
|
478 }; |
|
479 |
|
480 #include "gsmupdu.inl" |
|
481 |
|
482 #endif // !defined __GSMUPDU_H__ |