1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
32 #include "gsmupdu.h" |
32 #include "gsmupdu.h" |
33 |
33 |
34 #include <emsinformationelement.h> |
34 #include <emsinformationelement.h> |
35 |
35 |
36 /** |
36 /** |
37 * @internalComponent |
37 * @publishedAll |
38 */ |
38 */ |
39 const TUint IoctlWriteSMSBufferSize = 256; |
39 const TUint IoctlWriteSMSBufferSize = 256; |
40 const TUint KMaxMobileNameSize = 32; |
40 const TUint KMaxMobileNameSize = 32; |
41 |
41 |
42 class CSmsBufferBase; |
42 class CSmsBufferBase; |
43 class CSmsCompressedBuffer; |
43 class CSmsCompressedBuffer; |
44 class TSmsUserDataSettings; |
44 class TSmsUserDataSettings; |
45 class CSmsEMSBufferSegmenter; |
45 class CSmsEMSBufferSegmenter; |
46 class CGsmCompressionBase; |
|
47 class CEmsUserPrompt; |
46 class CEmsUserPrompt; |
48 class CEmsObjectDistribution; |
47 class CEmsObjectDistribution; |
49 class CSmsIEOperation; |
48 class CSmsIEOperation; |
50 class CSmsNonIEOperation; |
49 class CSmsNonIEOperation; |
|
50 class CSmsMessageAdditionalAttributes; |
51 |
51 |
52 /** |
52 /** |
53 * This class is used in CSmsMessage only. |
53 * This class is used in CSmsMessage only. |
54 * @internalComponent |
54 * @publishedAll |
55 */ |
55 */ |
56 class TGsmSmsSlotEntry |
56 class TGsmSmsSlotEntry |
57 { |
57 { |
58 public: |
58 public: |
59 IMPORT_C TGsmSmsSlotEntry(); |
59 IMPORT_C TGsmSmsSlotEntry(); |
223 IMPORT_C void InternalizeBufferL(RReadStream& aStream); |
228 IMPORT_C void InternalizeBufferL(RReadStream& aStream); |
224 IMPORT_C void ExternalizeBufferL(RWriteStream& aStream) const; |
229 IMPORT_C void ExternalizeBufferL(RWriteStream& aStream) const; |
225 IMPORT_C void InternalizeVersionL(RReadStream& aStream); |
230 IMPORT_C void InternalizeVersionL(RReadStream& aStream); |
226 IMPORT_C void ExternalizeVersionL(RWriteStream& aStream) const; |
231 IMPORT_C void ExternalizeVersionL(RWriteStream& aStream) const; |
227 |
232 |
228 void* AdditionalInfo() {return iAdditionalInfo;}; |
233 void* AdditionalInfo() {return (void*)iAdditionalInfo;}; |
229 IMPORT_C CSmsIEOperation& GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier) const; |
234 IMPORT_C CSmsIEOperation& GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier) const; |
230 IMPORT_C CSmsNonIEOperation& GetOperationsForNonIEL(TSmsNonIEIdentifier) const; |
235 IMPORT_C CSmsNonIEOperation& GetOperationsForNonIEL(TSmsNonIEIdentifier) const; |
231 |
236 |
232 IMPORT_C TSmsStatusReportScheme Scheme() const; |
237 IMPORT_C TSmsStatusReportScheme Scheme() const; |
233 IMPORT_C void DecodePartialCompleteMessagePDUsL(const CArrayFix<TGsmSms>& aSmsArray, TBool aLastPartialCompleteMsg); |
238 IMPORT_C void DecodePartialCompleteMessagePDUsL(const CArrayFix<TGsmSms>& aSmsArray, TBool aLastPartialCompleteMsg); |
256 void PrepareCommandMessageL(void); |
261 void PrepareCommandMessageL(void); |
257 void InstallEmsInformationElementsL(CSmsUserData& aUserData, TInt aStartPosition); |
262 void InstallEmsInformationElementsL(CSmsUserData& aUserData, TInt aStartPosition); |
258 void InstallEmsInformationElementsL(CSmsCommand& aCommand, TInt aStartPosition); |
263 void InstallEmsInformationElementsL(CSmsCommand& aCommand, TInt aStartPosition); |
259 void InstallControlInformationElementsL(CSmsUserData& aUserData, TInt aSegmentSequenceNum); |
264 void InstallControlInformationElementsL(CSmsUserData& aUserData, TInt aSegmentSequenceNum); |
260 void InstallControlInformationElementsL(CSmsCommand& aCommand); |
265 void InstallControlInformationElementsL(CSmsCommand& aCommand); |
261 TBool AddEMSInformationElementsToMultiSegmentMessageL(CArrayFix<TGsmSms>& aSmsArray,CSmsEMSBufferSegmenter& aSegmenter,TUint& aCharsAdded,TBool aDoEncode,TSmsEncoding& aEncoding,RPointerArray<CEmsInformationElement>& aCorrectedFormatingIEArray,TUint& aCurEMSIEno,TUint& aBaseAddr); |
266 TBool AddEMSInformationElementsToMultiSegmentMessageL(CSmsEMSBufferSegmenter& aSegmenter, TUint& aCharsAdded, |
|
267 TBool aDoEncode, TSmsEncoding& aEncoding, |
|
268 RPointerArray<CEmsInformationElement>& aCorrectedFormatingIEArray, |
|
269 TUint& aCurEMSIEno, TUint& aBaseAddr); |
262 TBool AddEMSInformationElementsToSingleSegmentMessageL(CSmsEMSBufferSegmenter& aSegmenter, |
270 TBool AddEMSInformationElementsToSingleSegmentMessageL(CSmsEMSBufferSegmenter& aSegmenter, |
263 TSmsEncoding aEncoding); |
271 TSmsEncoding aEncoding); |
264 void AddControlInformationElementsToMultiSegmentMessageL(CArrayFix<TGsmSms>& aSmsArray); |
272 void AddControlInformationElementsToMultiSegmentMessageL(TBool aDoEncode); |
265 void AddControlInformationElementsToMultiSegmentMessageL(TSmsInformationElementCategories::TInformationElementCategory aCategory, TBool aMandatoryInPDU, CArrayFix<TGsmSms>& aSmsArray); |
273 void AddControlInformationElementsToMultiSegmentMessageL(TSmsInformationElementCategories::TInformationElementCategory aCategory, TBool aMandatoryInPDU, TBool aDoEncode); |
266 void AddCurrentPDUToSmsArrayL(CArrayFix<TGsmSms>& aSmsArray,TBool aDoEncode); |
274 void AddCurrentPDUToPDUArrayL(TBool aDoEncode); |
267 TBool AddIEToUserDataL(CEmsInformationElement* aIe, TInt aCharsAlreadyAdded,TUint& aCharsAddedToCurrentPDU,CSmsEMSBufferSegmenter& aSeg); |
275 TBool AddIEToUserDataL(CEmsInformationElement* aIe, TInt aCharsAlreadyAdded,TUint& aCharsAddedToCurrentPDU,CSmsEMSBufferSegmenter& aSeg); |
268 TInt FillPduL(CSmsEMSBufferSegmenter& aSeg, TInt aNumChars, TSmsEncoding aEncoding); |
276 TInt FillPduL(CSmsEMSBufferSegmenter& aSeg, TInt aNumChars, TSmsEncoding aEncoding); |
269 TInt NumMessageEmsPDUsL(); |
277 TInt NumMessageEmsPDUsL(); |
270 void CorrectFormattingL(TUint aCharsAddedToCurrentPDU,RPointerArray<CEmsInformationElement>& aCorrectedFormatingIEArray,TUint aBaseAddr); |
278 void CorrectFormattingL(TUint aCharsAddedToCurrentPDU,RPointerArray<CEmsInformationElement>& aCorrectedFormatingIEArray,TUint aBaseAddr); |
271 void CorrectFormattingInSinglePDUL(); |
279 void CorrectFormattingInSinglePDUL(); |
273 TBool CanBeRemoved(const CEmsInformationElement& aIE, TUint aIEIndex); |
281 TBool CanBeRemoved(const CEmsInformationElement& aIE, TUint aIEIndex); |
274 void AddEmsUserPromptL(const CEmsUserPrompt& aEmsIE); |
282 void AddEmsUserPromptL(const CEmsUserPrompt& aEmsIE); |
275 void AddEmsObjectDistributionL(const CEmsObjectDistribution& aObjectDistributionIE); |
283 void AddEmsObjectDistributionL(const CEmsObjectDistribution& aObjectDistributionIE); |
276 void UpdateUserPromptAndODIElementsStartPosition(); |
284 void UpdateUserPromptAndODIElementsStartPosition(); |
277 TInt AddReceivedEmsInformationElement(CEmsInformationElement* aIE); |
285 TInt AddReceivedEmsInformationElement(CEmsInformationElement* aIE); |
278 TSmsStatusReportScheme FindScheme(const CArrayPtr<CSmsPDU>& aSmsPDUArray); |
286 TSmsStatusReportScheme FindSchemeL(const CArrayPtr<CSmsPDU>& aSmsPDUArray); |
279 void InstallTPSRRInformationL(const CArrayPtr<CSmsPDU>& aSmsPDUArray, TInt aSegmentSequenceNum); |
287 void InstallTPSRRInformationL(const CArrayPtr<CSmsPDU>& aSmsPDUArray, TInt aSegmentSequenceNum); |
280 void EncodingTPSRRFromSchemesIntoSinglePDUL(); |
288 void EncodingTPSRRFromSchemesIntoSinglePDUL(); |
281 void DecodeOnlyTextL(CArrayPtr<CSmsPDU>& aSmsPDUArray,CSmsBufferBase& aBuffer); |
289 void DecodeOnlyTextL(CArrayPtr<CSmsPDU>& aSmsPDUArray,CSmsBufferBase& aBuffer); |
282 void AddIncompleteMessageInfoL(TInt aStartPDU, TInt aEndPDU, TBool aLastPartialCompleteMsg); |
290 void AddIncompleteMessageInfoL(TInt aStartPDU, TInt aEndPDU, TBool aLastPartialCompleteMsg); |
283 void MergeAlternative7bitEncoding(TSmsEncoding aEncoding) const; |
291 void MergeAlternative7bitEncoding(TSmsEncoding aEncoding) const; |
345 // for all other versions the corresponding enum values would be added i.e. ESmsMessageV5, etc. |
353 // for all other versions the corresponding enum values would be added i.e. ESmsMessageV5, etc. |
346 }; |
354 }; |
347 |
355 |
348 protected: |
356 protected: |
349 |
357 |
350 /** |
358 /** |
351 * iVersion is the version of CSmsMessage. This parameter will be |
359 * iVersion is the version of CSmsMessage. This parameter will be |
352 * used to identify what iAdditionalInfo points to for that particular |
360 * used to identify what iAdditionalInfo points to for that particular |
353 * version of CSmsMessage |
361 * version of CSmsMessage |
354 */ |
362 */ |
355 TInt iVersion; |
363 TInt iVersion; |
356 |
364 |
357 /** |
365 /** |
358 * iAdditionalInfo would point to any new added data structure. |
366 * iAdditionalInfo would point to any new added data structure. |
359 * iVersion would identify which data structure is valid for that |
367 * iVersion would identify which data structure is valid for that |
360 * * particular version of CSmsMessage |
368 * * particular version of CSmsMessage |
361 */ |
369 */ |
362 void* iAdditionalInfo; |
370 CSmsMessageAdditionalAttributes* iAdditionalInfo; |
363 }; |
371 }; |
364 |
372 |
365 #include <gsmumsg.inl> |
373 #include <gsmumsg.inl> |
366 |
374 |
367 #endif // !defined __GSMUMSG_H__ |
375 #endif // !defined __GSMUMSG_H__ |