24
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Name : CSatDataDownloadTsy.h
|
|
16 |
* Part of : Common SIM ATK TSY / commonsimatktsy
|
|
17 |
* DataDownload-related functionality of Sat Tsy
|
|
18 |
* Version : 1.0
|
|
19 |
*
|
|
20 |
*/
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
#ifndef CSATDATADOWNLOADTSY_H
|
|
25 |
#define CSATDATATDOWNLOADTSY_H
|
|
26 |
|
|
27 |
// INCLUDES
|
|
28 |
#include <e32base.h>
|
|
29 |
#include <etelsat.h>
|
|
30 |
#include <et_phone.h>
|
|
31 |
|
|
32 |
// FORWARD DECLARATION
|
|
33 |
class CSatTsy;
|
|
34 |
class CSatDataPackage;
|
|
35 |
|
|
36 |
//CONSTANTS
|
|
37 |
// Cell Broadcast isi msg length
|
|
38 |
const TUint8 KCbsMsgMaxLength = 92;
|
|
39 |
// Max length for file path
|
|
40 |
const TUint8 KMaxFilePath = 255;
|
|
41 |
// Master file
|
|
42 |
const TUint16 KMasterFileCbmids = 0x3F00;
|
|
43 |
// Dedicated file
|
|
44 |
const TUint16 KDedicatedFileCbmids = 0x7F20;
|
|
45 |
// Elementary file
|
|
46 |
const TUint16 KElementaryFileCbmids = 0x6F48;
|
|
47 |
// User data max size, Etel MM API Design Document 7.1.4 SMS message buffers
|
|
48 |
const TUint8 KTpduUserDataMaxLength = 140;
|
|
49 |
// RP-ACK min length ()
|
|
50 |
const TUint8 KSmsDeliverReportMinLength = 5;
|
|
51 |
|
|
52 |
// 3GPP TS 11.14, 7 Data download to SIM and 3GPP TS 23 038,
|
|
53 |
// 4 SMS Data coding scheme
|
|
54 |
const TUint8 KSmsTpduAddrOffset = 1;
|
|
55 |
const TUint8 KSmsTpduProtcolIdUSimDdl = 0x7F;
|
|
56 |
// Parameters(1)+TP-OA(min 2)+TP-PID(1)+DCS(1)+TP-SCTS(7)+TP-UDL(2)+TP-UD(?)
|
|
57 |
const TUint8 KSmsTpduMinLength = 13;
|
|
58 |
const TUint8 KSmsTpduSctsLength = 7;
|
|
59 |
// 3GPP TS 23.040, 9.2.3.27 TP-Parameter-Indicator
|
|
60 |
const TUint8 KAllOptParamsPresent = 0x07;
|
|
61 |
// 3GPP TS 23.040, 9.2.3.22 TP-Failure-Cause
|
|
62 |
const TUint8 KDataDownloadError = 0xD5;
|
|
63 |
|
|
64 |
// DESCRIPTION
|
|
65 |
/**
|
|
66 |
* Sat Data download handling
|
|
67 |
* @lib simatktsy
|
|
68 |
* @since S60 3.1
|
|
69 |
*/
|
|
70 |
|
|
71 |
NONSHARABLE_CLASS ( CSatDataDownloadTsy ) : public CBase
|
|
72 |
{
|
|
73 |
public: // Enumerations
|
|
74 |
|
|
75 |
/*
|
|
76 |
* This structure contains data needed for RP-ACK or Error report that
|
|
77 |
* is sent when saving the class 2 SMS (only when SMS PP Data Download
|
|
78 |
* is not supported )
|
|
79 |
*/
|
|
80 |
struct TSmsTpdu
|
|
81 |
{
|
|
82 |
TUint8 iParameters; // Parameters
|
|
83 |
TUint8 iProtocolId; // Protocol ID
|
|
84 |
TUint8 iDcs; // Data coding scheme
|
|
85 |
TBuf8<KTpduUserDataMaxLength> iUserData; // User data
|
|
86 |
};
|
|
87 |
|
|
88 |
public:
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Two-phased constructor.
|
|
92 |
* @param aSatTsy
|
|
93 |
* return CSatTsy*: created datadownload object
|
|
94 |
*/
|
|
95 |
static CSatDataDownloadTsy* NewL( CSatTsy* aSatTsy );
|
|
96 |
|
|
97 |
/**
|
|
98 |
* C++ Destructor.
|
|
99 |
*/
|
|
100 |
~CSatDataDownloadTsy( );
|
|
101 |
|
|
102 |
private:
|
|
103 |
|
|
104 |
/**
|
|
105 |
* By default C++ constructor is private.
|
|
106 |
*/
|
|
107 |
CSatDataDownloadTsy( );
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Class attributes are created in ConstructL.
|
|
111 |
*/
|
|
112 |
void ConstructL( );
|
|
113 |
|
|
114 |
public: // New functions
|
|
115 |
|
|
116 |
/*
|
|
117 |
* Creates envelope for cell broadcast download
|
|
118 |
* @param aDataPackage: Packaged parameters
|
|
119 |
*/
|
|
120 |
void CompleteCellBroadcastDdlL( const CSatDataPackage* aDataPackage );
|
|
121 |
|
|
122 |
/*
|
|
123 |
* Completes the SMS PP Data Download request received from DOS
|
|
124 |
* @param aDataPackage: Packaged SMS Address and TPDU
|
|
125 |
*/
|
|
126 |
void CompleteSmsPpDdlL( const CSatDataPackage* aDataPackage );
|
|
127 |
|
|
128 |
/*
|
|
129 |
* Creates envelope for SmsPp data download
|
|
130 |
* @param aSmsScAddress: Address of the originating SMS
|
|
131 |
* @param aSmsTpdu: SMS Transfer Protocol Data Unit
|
|
132 |
*/
|
|
133 |
void CreateSmsPpDdlEnvelopeL( const TDesC8& aSmsScAddress,
|
|
134 |
const TDesC8& aSmsTpdu );
|
|
135 |
|
|
136 |
/**
|
|
137 |
* Request to read Cbmids from Sim server
|
|
138 |
*/
|
|
139 |
void CompleteReadCbmidsL();
|
|
140 |
|
|
141 |
/*
|
|
142 |
* Sets the support status for SMS PP Data Download
|
|
143 |
* @param aDataPackage: ETrue = supported, otherwise EFalse
|
|
144 |
*/
|
|
145 |
void SetSmsPpDdlStatus( const CSatDataPackage* aDataPackage );
|
|
146 |
|
|
147 |
/*
|
|
148 |
* Creates the SMS-DELIVER-REPORT as an response to SMS PP DDL request
|
|
149 |
* @param aResult KErrNone/KErrWrite
|
|
150 |
*/
|
|
151 |
void CreateSmsDeliverReportL( TInt aResult );
|
|
152 |
|
|
153 |
private: // methods
|
|
154 |
|
|
155 |
/*
|
|
156 |
* Creates SMS Entry in order to save class 2 SMS
|
|
157 |
* @param aSmsScAddress: Address of the originating SMS
|
|
158 |
* @param aSmsTpdu: SMS Transfer Protocol Data Unit
|
|
159 |
*/
|
|
160 |
void CreateEntryForSavingSmsL( const TDesC8& aSmsScAddress,
|
|
161 |
const TDesC8& aSmsTpdu );
|
|
162 |
|
|
163 |
/*
|
|
164 |
* Creates SMS Entry in order to save class 2 SMS
|
|
165 |
* @param aSmsTpdu: SMS Transfer Protocol Data Unit
|
|
166 |
* @return KErrNone/KErrCorrupt
|
|
167 |
*/
|
|
168 |
TInt ParseSmsTpdu( const TDesC8& aSmsTpdu );
|
|
169 |
|
|
170 |
|
|
171 |
private: // Data
|
|
172 |
|
|
173 |
// Pointer to Sat TSY
|
|
174 |
CSatTsy* iSatTsy;
|
|
175 |
// Indicates whether the SMS PP Data Download is allocated in NAA
|
|
176 |
TBool iIsSmsPpDdlSupported;
|
|
177 |
// TPDU data is needed later for the report
|
|
178 |
TSmsTpdu iSmsTpdu;
|
|
179 |
};
|
|
180 |
|
|
181 |
#endif // CSATDATADOWNLOADTSY_H
|
|
182 |
|
|
183 |
// End of File
|