equal
deleted
inserted
replaced
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: |
17 |
17 |
18 |
18 |
19 |
19 |
20 /** |
20 /** |
21 @file |
21 @file |
|
22 @publishedAll |
22 */ |
23 */ |
23 |
24 |
24 #ifndef __GSMUELEM_H__ |
25 #ifndef __GSMUELEM_H__ |
25 #define __GSMUELEM_H__ |
26 #define __GSMUELEM_H__ |
26 |
27 |
33 |
34 |
34 class RFs; |
35 class RFs; |
35 class RReadStream; |
36 class RReadStream; |
36 class RWriteStream; |
37 class RWriteStream; |
37 class CSmsEMSBufferSegmenter; |
38 class CSmsEMSBufferSegmenter; |
38 |
39 struct TEncodeParams; |
39 |
40 |
40 // class declarations |
41 // class declarations |
41 |
42 |
42 /** |
43 /** |
43 * Decoding error. |
44 * Decoding error. |
44 * @publishedAll |
45 * @publishedAll |
45 * @released |
46 * @released |
46 */ |
47 */ |
47 const TInt KErrGsmuDecoding = KErrCorrupt; |
48 const TInt KErrGsmuDecoding = KErrCorrupt; |
48 /** |
|
49 * @internalComponent |
|
50 */ |
|
51 _LIT8(KMOSES,"\x40\x4d\x64\xd3\x50\x00"); |
|
52 /** |
|
53 * @internalComponent |
|
54 */ |
|
55 _LIT16(KNETWORK,"NETWORK"); |
|
56 |
|
57 |
|
58 // Constants |
|
59 /** |
|
60 * @internalComponent |
|
61 */ |
|
62 const TUint8 KSms7BitAlphabetEscapeChar=0x1b; |
|
63 |
|
64 |
49 |
65 /** |
50 /** |
66 * Thin wrapper over TLex8 to provide leaving functions when getting the next |
51 * Thin wrapper over TLex8 to provide leaving functions when getting the next |
67 * character(s). |
52 * character(s). |
68 * |
53 * |
461 ESmsApplicationError31=0xFE, |
446 ESmsApplicationError31=0xFE, |
462 // |
447 // |
463 /** Unspecified error cause. */ |
448 /** Unspecified error cause. */ |
464 ESmsErrorUnspecified=0xFF, |
449 ESmsErrorUnspecified=0xFF, |
465 |
450 |
466 /** @internalComponent */ |
451 /** @publishedAll */ |
467 ESmsErrorFree=0x100 |
452 ESmsErrorFree=0x100 |
468 }; |
453 }; |
469 public: |
454 public: |
470 TSmsFailureCause(); |
455 TSmsFailureCause(); |
471 inline TInt Error() const; |
456 inline TInt Error() const; |
1218 /** |
1203 /** |
1219 * Alpha-numeric. |
1204 * Alpha-numeric. |
1220 * Coded according to 3GPP TS 23.038 - GSM 7-bit default alphabet. |
1205 * Coded according to 3GPP TS 23.038 - GSM 7-bit default alphabet. |
1221 */ |
1206 */ |
1222 EGsmSmsTONAlphaNumeric=0x50, |
1207 EGsmSmsTONAlphaNumeric=0x50, |
1223 EGsmSmsTONAbbreviatedNumber=0x60, ///< Abbreviated number |
1208 EGsmSmsTONAbbreviatedNumber=0x60, //< Abbreviated number |
1224 EGsmSmsTONReserverved=0x70, ///< Reserved for extension |
1209 EGsmSmsTONReserverved=0x70, //< Reserved for extension |
1225 }; |
1210 }; |
1226 |
1211 |
1227 /** Numbering-plan-identification defined in ETSI 3GPP TS 23.040. */ |
1212 /** Numbering-plan-identification defined in ETSI 3GPP TS 23.040. */ |
1228 enum TGsmSmsNumberingPlanIdentification |
1213 enum TGsmSmsNumberingPlanIdentification |
1229 { |
1214 { |
1307 */ |
1292 */ |
1308 class TGsmSmsTelNumber |
1293 class TGsmSmsTelNumber |
1309 { |
1294 { |
1310 public: |
1295 public: |
1311 /** |
1296 /** |
1312 * @internalComponent |
1297 * @publishedAll |
1313 * If the address is an alphanumeric address, |
1298 * If the address is an alphanumeric address, |
1314 * it can represent a voice message waiting indicator |
1299 * it can represent a voice message waiting indicator |
1315 * as defined in the Common PCN Handset Specification |
1300 * as defined in the Common PCN Handset Specification |
1316 * v4.2. The specification allows other indicators |
1301 * v4.2. The specification allows other indicators |
1317 * to be defined in the future. |
1302 * to be defined in the future. |
1352 |
1337 |
1353 IMPORT_C TBool IsInstanceOf(TTypeOfIndicator aType); |
1338 IMPORT_C TBool IsInstanceOf(TTypeOfIndicator aType); |
1354 |
1339 |
1355 public: |
1340 public: |
1356 |
1341 |
1357 TGsmSmsTypeOfAddress iTypeOfAddress; ///< The type-of-address of iTelNumber |
1342 TGsmSmsTypeOfAddress iTypeOfAddress; //< The type-of-address of iTelNumber |
1358 TBuf<TGsmSmsTelNumberMaxLen> iTelNumber; ///< Telephone number, in format of iTypeOfAddress |
1343 TBuf<TGsmSmsTelNumberMaxLen> iTelNumber; //< Telephone number, in format of iTypeOfAddress |
1359 }; |
1344 }; |
1360 |
1345 |
1361 |
1346 |
1362 /** |
1347 /** |
1363 * CSmsAddress - address of the recipient or SC |
1348 * CSmsAddress - address of the recipient or SC |
1387 |
1372 |
1388 TUint8* EncodeL(TUint8* aPtr) const; |
1373 TUint8* EncodeL(TUint8* aPtr) const; |
1389 void DecodeL(TGsmuLex8& aPdu); |
1374 void DecodeL(TGsmuLex8& aPdu); |
1390 void InternalizeL(RReadStream& aStream); |
1375 void InternalizeL(RReadStream& aStream); |
1391 void ExternalizeL(RWriteStream& aStream) const; |
1376 void ExternalizeL(RWriteStream& aStream) const; |
|
1377 |
|
1378 CSmsAddress* DuplicateL() const; |
|
1379 |
1392 private: |
1380 private: |
1393 CSmsAddress(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
1381 CSmsAddress(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs); |
1394 void NewBufferL(TInt aLength); |
1382 void NewBufferL(TInt aLength); |
1395 void DoSetParsedAddressL(const TDesC& aAddress); |
1383 void DoSetParsedAddressL(const TDesC& aAddress); |
1396 private: |
1384 private: |
1493 inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); |
1481 inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); |
1494 inline const TTimeIntervalMinutes& TimeIntervalMinutes() const; |
1482 inline const TTimeIntervalMinutes& TimeIntervalMinutes() const; |
1495 inline void SetTimeIntervalMinutes(const TTimeIntervalMinutes& aTimeIntervalMinutes); |
1483 inline void SetTimeIntervalMinutes(const TTimeIntervalMinutes& aTimeIntervalMinutes); |
1496 TTime Time() const; |
1484 TTime Time() const; |
1497 TUint8* EncodeL(TUint8* aPtr) const; |
1485 TUint8* EncodeL(TUint8* aPtr) const; |
|
1486 TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const; |
1498 void DecodeL(TGsmuLex8& aPdu); |
1487 void DecodeL(TGsmuLex8& aPdu); |
1499 void InternalizeL(RReadStream& aStream); |
1488 void InternalizeL(RReadStream& aStream); |
1500 void ExternalizeL(RWriteStream& aStream) const; |
1489 void ExternalizeL(RWriteStream& aStream) const; |
1501 private: |
1490 private: |
1502 TSmsFirstOctet& iFirstOctet; |
1491 TSmsFirstOctet& iFirstOctet; |
1734 /** SC specific use 31. */ |
1723 /** SC specific use 31. */ |
1735 ESmsIEISCSpecificUse31=0xDE, |
1724 ESmsIEISCSpecificUse31=0xDE, |
1736 /** SC specific use 32. */ |
1725 /** SC specific use 32. */ |
1737 ESmsIEISCSpecificUse32=0xDF, |
1726 ESmsIEISCSpecificUse32=0xDF, |
1738 /** |
1727 /** |
1739 * @internalComponent |
1728 * @publishedAll |
1740 */ |
1729 */ |
1741 ESmsIEMaximum = 0xFF |
1730 ESmsIEMaximum = 0xFF |
1742 }; |
1731 }; |
1743 |
1732 |
1744 public: |
1733 public: |
1765 HBufC8* iData; |
1754 HBufC8* iData; |
1766 }; |
1755 }; |
1767 |
1756 |
1768 |
1757 |
1769 /** |
1758 /** |
1770 * @internalComponent |
1759 * @publishedAll |
1771 * |
1760 * |
1772 * TSmsInformationElementCategories |
1761 * TSmsInformationElementCategories |
1773 * |
1762 * |
1774 * This class specifies where information elements are located SMS Messages. |
1763 * This class specifies where information elements are located SMS Messages. |
1775 * |
1764 * |
1823 static const TInformationElementCategory categories[ENumberOfIndices]; |
1812 static const TInformationElementCategory categories[ENumberOfIndices]; |
1824 }; |
1813 }; |
1825 |
1814 |
1826 |
1815 |
1827 /** |
1816 /** |
1828 * @internalComponent |
1817 * @publishedAll |
1829 */ |
1818 */ |
1830 typedef CSmsInformationElement::TSmsInformationElementIdentifier TSmsId; |
1819 typedef CSmsInformationElement::TSmsInformationElementIdentifier TSmsId; |
1831 |
1820 |
1832 |
1821 |
1833 /** |
1822 /** |
1860 |
1849 |
1861 TUint8* EncodeL(TUint8* aPtr) const; |
1850 TUint8* EncodeL(TUint8* aPtr) const; |
1862 void DecodeL(TGsmuLex8& aPdu); |
1851 void DecodeL(TGsmuLex8& aPdu); |
1863 void InternalizeL(RReadStream& aStream); |
1852 void InternalizeL(RReadStream& aStream); |
1864 void ExternalizeL(RWriteStream& aStream) const; |
1853 void ExternalizeL(RWriteStream& aStream) const; |
|
1854 |
|
1855 CSmsCommandData* DuplicateL() const; |
|
1856 |
1865 private: |
1857 private: |
1866 CSmsCommandData(TSmsFirstOctet& aFirstOctet); |
1858 CSmsCommandData(TSmsFirstOctet& aFirstOctet); |
1867 |
1859 |
1868 TInt HeaderLength() const; |
1860 TInt HeaderLength() const; |
1869 TInt TotalHeaderLengthInUDLUnits() const; |
1861 TInt TotalHeaderLengthInUDLUnits() const; |
1915 */ |
1907 */ |
1916 class CSmsUserData : public CBase |
1908 class CSmsUserData : public CBase |
1917 { |
1909 { |
1918 public: |
1910 public: |
1919 enum {KSmsMaxUserDataSize=140}; |
1911 enum {KSmsMaxUserDataSize=140}; |
|
1912 enum {KSmsMaxUserDataLengthInChars=(KSmsMaxUserDataSize*8)/7}; |
1920 |
1913 |
1921 public: |
1914 public: |
1922 static CSmsUserData* NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme); |
1915 static CSmsUserData* NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme); |
1923 ~CSmsUserData(); |
1916 ~CSmsUserData(); |
1924 |
1917 |
1958 |
1951 |
1959 TBool IsBinaryData() const; |
1952 TBool IsBinaryData() const; |
1960 |
1953 |
1961 TUint8* EncodeL(TUint8* aPtr) const; |
1954 TUint8* EncodeL(TUint8* aPtr) const; |
1962 void DecodeL(TGsmuLex8& aPdu); |
1955 void DecodeL(TGsmuLex8& aPdu); |
1963 void DecodeL(TGsmuLex8& aPdu, TBool aAcceptTruncation); |
1956 void DecodeL(TGsmuLex8& aPdu, TBool aAcceptTruncation); |
1964 void InternalizeL(RReadStream& aStream); |
1957 void InternalizeL(RReadStream& aStream); |
1965 void ExternalizeL(RWriteStream& aStream) const; |
1958 void ExternalizeL(RWriteStream& aStream) const; |
|
1959 |
|
1960 CSmsUserData* DuplicateL(TSmsFirstOctet& aFirstOctet, const TSmsDataCodingScheme& aDataCodingScheme) const; |
|
1961 |
1966 private: |
1962 private: |
1967 CSmsUserData(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme); |
1963 CSmsUserData(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme); |
1968 void ConstructL(); |
1964 void ConstructL(); |
1969 TInt HeaderLength() const; |
1965 TInt HeaderLength() const; |
1970 TInt TotalHeaderLengthInUDLUnits() const; |
1966 TInt TotalHeaderLengthInUDLUnits() const; |
2078 * Enhanced Voice Mail Delete Confirmations. It encapsulates |
2074 * Enhanced Voice Mail Delete Confirmations. It encapsulates |
2079 * the attributes and encoding / decoding algorithms common to |
2075 * the attributes and encoding / decoding algorithms common to |
2080 * both types of Enhanced Voice Mail Information Element. |
2076 * both types of Enhanced Voice Mail Information Element. |
2081 * |
2077 * |
2082 * @publishedAll |
2078 * @publishedAll |
|
2079 * @released |
2083 */ |
2080 */ |
2084 class CEnhancedVoiceMailBoxInformation : public CBase |
2081 class CEnhancedVoiceMailBoxInformation : public CBase |
2085 { |
2082 { |
2086 public: |
2083 public: |
2087 enum {KSmsMaxEnhancedVoiceMailSize = CSmsUserData::KSmsMaxUserDataSize - 3}; |
2084 enum {KSmsMaxEnhancedVoiceMailSize = CSmsUserData::KSmsMaxUserDataSize - 3}; |
2146 /** |
2143 /** |
2147 * This class encapsulates the attributes of a VM Notification as described in 23.040 V6.5.0. |
2144 * This class encapsulates the attributes of a VM Notification as described in 23.040 V6.5.0. |
2148 * It is used as one of the attributes a Enhanced Voice Mail Notification. |
2145 * It is used as one of the attributes a Enhanced Voice Mail Notification. |
2149 * |
2146 * |
2150 * @publishedAll |
2147 * @publishedAll |
|
2148 * @released |
2151 */ |
2149 */ |
2152 class CVoiceMailNotification : public CBase |
2150 class CVoiceMailNotification : public CBase |
2153 { |
2151 { |
2154 public: |
2152 public: |
2155 IMPORT_C void SetMessageId(TUint16 aMessageId); |
2153 IMPORT_C void SetMessageId(TUint16 aMessageId); |
2217 * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information |
2215 * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information |
2218 * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with |
2216 * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with |
2219 * only the Enhanced Voice Mail Information Element and no other information elements or text. |
2217 * only the Enhanced Voice Mail Information Element and no other information elements or text. |
2220 * |
2218 * |
2221 * @publishedAll |
2219 * @publishedAll |
|
2220 * @released |
2222 */ |
2221 */ |
2223 class CEnhancedVoiceMailNotification : public CEnhancedVoiceMailBoxInformation |
2222 class CEnhancedVoiceMailNotification : public CEnhancedVoiceMailBoxInformation |
2224 { |
2223 { |
2225 public: |
2224 public: |
2226 enum {KMaxNumberOfNotifications = 15}; |
2225 enum {KMaxNumberOfNotifications = 15}; |
2255 * 9.2.3.24.13.1. |
2254 * 9.2.3.24.13.1. |
2256 * |
2255 * |
2257 * It is used as one of the attributes of a Enhanced Voice Mail Delete Confirmation. |
2256 * It is used as one of the attributes of a Enhanced Voice Mail Delete Confirmation. |
2258 * |
2257 * |
2259 * @publishedAll |
2258 * @publishedAll |
|
2259 * @released |
2260 */ |
2260 */ |
2261 class CVoiceMailDeletion : public CBase |
2261 class CVoiceMailDeletion : public CBase |
2262 { |
2262 { |
2263 public: |
2263 public: |
2264 IMPORT_C void SetMessageId(TUint16 aMessageId); |
2264 IMPORT_C void SetMessageId(TUint16 aMessageId); |
2290 * This class encapsulates the attributes of an Enhanced Voice Delete Confirmation as described in |
2290 * This class encapsulates the attributes of an Enhanced Voice Delete Confirmation as described in |
2291 * 9.2.3.24.13.2. An enhanced voice delete confirmation is added to a CSmsMessage using the |
2291 * 9.2.3.24.13.2. An enhanced voice delete confirmation is added to a CSmsMessage using the |
2292 * interface provided by the class CSmsEnhancedVoiceMailOperations. |
2292 * interface provided by the class CSmsEnhancedVoiceMailOperations. |
2293 * |
2293 * |
2294 * @publishedAll |
2294 * @publishedAll |
|
2295 * @released |
2295 */ |
2296 */ |
2296 class CEnhancedVoiceMailDeleteConfirmations : public |
2297 class CEnhancedVoiceMailDeleteConfirmations : public |
2297 CEnhancedVoiceMailBoxInformation |
2298 CEnhancedVoiceMailBoxInformation |
2298 { |
2299 { |
2299 public: |
2300 public: |