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 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CMMSMSTSY_H
|
|
21 |
#define CMMSMSTSY_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <etelmm.h>
|
|
25 |
#include <et_phone.h>
|
|
26 |
#include "MmTsy_timeoutdefs.h"
|
|
27 |
#include <ctsy/serviceapi/mctsysatservice.h>
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CMmSmsStorageTsy;
|
|
31 |
class CMmPhoneTsy;
|
|
32 |
class CMessStore;
|
|
33 |
class CMmSmsExtInterface;
|
|
34 |
class CMmSmsStorageTsy;
|
|
35 |
class CMmDataPackage;
|
|
36 |
class CSmsSendRequest;
|
|
37 |
class CListReadAllAttempt;
|
|
38 |
class CMmTsyReqHandleStore;
|
|
39 |
struct TSmsMsg;
|
|
40 |
struct TSmsParameters;
|
|
41 |
|
|
42 |
// CLASS DECLARATION
|
|
43 |
|
|
44 |
/**
|
|
45 |
* CMmSmsTsy contains extended sms functionality that is mode-independent
|
|
46 |
* Extension request handles and parameters are stored as attributes
|
|
47 |
*/
|
|
48 |
NONSHARABLE_CLASS( CMmSmsTsy ) : public CSubSessionExtBase,
|
|
49 |
public MCtsySatService
|
|
50 |
{
|
|
51 |
public:
|
|
52 |
|
|
53 |
enum TSmsRequestTypes
|
|
54 |
{
|
|
55 |
EMultimodeSmsReqHandleUnknown, //0
|
|
56 |
//SMS specific requests
|
|
57 |
EMultimodeSmsReceiveMessage,
|
|
58 |
EMultimodeSmsSetReceiveMode,
|
|
59 |
EMultimodeSmsAckStored,
|
|
60 |
EMultimodeSmsNackStored,
|
|
61 |
EMultimodeSmsResumeReception,
|
|
62 |
EMultimodeSmsSendMessage,
|
|
63 |
EMultimodeSmsSendMessageNoFdnCheck,
|
|
64 |
EMultimodeSmsSendSatMessage,
|
|
65 |
EMultimodeSmsGetMessageStoreInfo,
|
|
66 |
EMultimodeSmsReadSmspListPhase1,
|
|
67 |
EMultimodeSmsStoreSmspList,
|
|
68 |
EMultimodeSmsNotifyReceiveModeChange,
|
|
69 |
EMultimodeSmsNotifyMoSmsBearerChange,
|
|
70 |
EMultimodeSmsSetMoSmsBearer,
|
|
71 |
EMultimodeSmsNotifySmspListChange,
|
|
72 |
//SMS storage specific requests
|
|
73 |
EMultimodeSmsGetInfo,
|
|
74 |
EMultimodeSimStSmsReadSms,
|
|
75 |
EMultimodeSimStSmsWriteSms,
|
|
76 |
EMultimodeSimStSmsEraseSms,
|
|
77 |
EMultimodeSimStSmsEraseAllSms,
|
|
78 |
EMultimodeSimSmsNotifyStoreEvent,
|
|
79 |
EMultimodeSimStSmsReadAllSms,
|
|
80 |
EMultimodeSimStSmsGetNumOfLoc,
|
|
81 |
|
|
82 |
EMultimodeSmsMaxNumOfRequests
|
|
83 |
};
|
|
84 |
|
|
85 |
private:
|
|
86 |
|
|
87 |
/** SMS routing activity */
|
|
88 |
enum TSmsRoutingActivity
|
|
89 |
{
|
|
90 |
ERoutingNotActivated,
|
|
91 |
ERoutingActivating,
|
|
92 |
ERoutingActivated
|
|
93 |
};
|
|
94 |
|
|
95 |
public:
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Two-phased constructor.
|
|
99 |
* @param aMmPhone Pointer to the MmPhone
|
|
100 |
* @return Pointer to the created CMmSmsTsy object
|
|
101 |
*/
|
|
102 |
static CMmSmsTsy* NewL( CMmPhoneTsy* aMmPhone );
|
|
103 |
|
|
104 |
/**
|
|
105 |
* Destructor
|
|
106 |
*/
|
|
107 |
~CMmSmsTsy();
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Initialisation method that is called from ETel Server
|
|
111 |
*
|
|
112 |
*
|
|
113 |
*/
|
|
114 |
virtual void Init();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* New instances are created by given name
|
|
118 |
*
|
|
119 |
*
|
|
120 |
* @param aName Name of the object to be created
|
|
121 |
* @return Pointer to created object casted to CTelObject*
|
|
122 |
*/
|
|
123 |
virtual CTelObject* OpenNewObjectByNameL( const TDesC& aName );
|
|
124 |
|
|
125 |
/**
|
|
126 |
* New instances are created by given name
|
|
127 |
*
|
|
128 |
*
|
|
129 |
* @param aNewName Name of the object to be created
|
|
130 |
* @return Pointer to created object casted to CTelObject*
|
|
131 |
*/
|
|
132 |
virtual CTelObject* OpenNewObjectL( TDes& aNewName );
|
|
133 |
|
|
134 |
/**
|
|
135 |
* Handles extended client requests by calling ExtFunc method
|
|
136 |
*
|
|
137 |
*
|
|
138 |
* @param aTsyReqHandle Request handle
|
|
139 |
* @param aIpc IPC number of request
|
|
140 |
* @param aPackage Parameters for request
|
|
141 |
* @return Error value
|
|
142 |
*/
|
|
143 |
virtual TInt ExtFunc( const TTsyReqHandle aTsyReqHandle,
|
|
144 |
const TInt aIpc,
|
|
145 |
const TDataPackage& aPackage );
|
|
146 |
|
|
147 |
/**
|
|
148 |
* When the ETel server receives an "extension" client request,
|
|
149 |
* it will pass the IPC request number down to the TSY in order to find
|
|
150 |
* out what type of request it is
|
|
151 |
*
|
|
152 |
*
|
|
153 |
* @param aIpc IPC number of request
|
|
154 |
* @return Request mode for given IPC
|
|
155 |
*/
|
|
156 |
virtual CTelObject::TReqMode ReqModeL( const TInt aIpc );
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Returns number of slots to be used for given IPC
|
|
160 |
*
|
|
161 |
*
|
|
162 |
* @param aIpc IPC number of request
|
|
163 |
* @return Number of slots
|
|
164 |
*/
|
|
165 |
virtual TInt NumberOfSlotsL( const TInt aIpc );
|
|
166 |
|
|
167 |
/**
|
|
168 |
* Cancels request that's IPC number and request handle are given in
|
|
169 |
* parameters
|
|
170 |
*
|
|
171 |
*
|
|
172 |
* @param aIpc IPC number of request
|
|
173 |
* @param aTsyReqHandle Request handle
|
|
174 |
* @return Error value
|
|
175 |
*/
|
|
176 |
virtual TInt CancelService( const TInt aIpc,
|
|
177 |
const TTsyReqHandle aTsyReqHandle );
|
|
178 |
|
|
179 |
/**
|
|
180 |
* Register given notification
|
|
181 |
*
|
|
182 |
*
|
|
183 |
* @param aIpc Number of slots
|
|
184 |
* @return Error value
|
|
185 |
*/
|
|
186 |
virtual TInt RegisterNotification( const TInt aIpc );
|
|
187 |
|
|
188 |
/**
|
|
189 |
* Deregister given notification
|
|
190 |
*
|
|
191 |
*
|
|
192 |
* @param aIpc IPC number of request
|
|
193 |
* @return Error value
|
|
194 |
*/
|
|
195 |
virtual TInt DeregisterNotification( const TInt aIpc );
|
|
196 |
|
|
197 |
/**
|
|
198 |
* Return pointer to the SMS Storage sub-session
|
|
199 |
*
|
|
200 |
*
|
|
201 |
* @return Pointer to SMS Storage sub-session
|
|
202 |
*/
|
|
203 |
virtual CMmSmsStorageTsy* GetSmsStorageTsy();
|
|
204 |
|
|
205 |
/**
|
|
206 |
* Activate SMS routing
|
|
207 |
*
|
|
208 |
*
|
|
209 |
*/
|
|
210 |
virtual void ActivateSmsRoutingL();
|
|
211 |
|
|
212 |
/**
|
|
213 |
* This method completes reception of incoming unstored SMS
|
|
214 |
*
|
|
215 |
*
|
|
216 |
* @param aError Error code
|
|
217 |
* @param aDataPackage A data package containing TBool (indicates if
|
|
218 |
* some errors have occured while handling or acknowledging incoming Sms)
|
|
219 |
* and a TSmsMsg* (pointer to Sms message)
|
|
220 |
*/
|
|
221 |
virtual void CompleteReceiveMessage( TInt aError,
|
|
222 |
CMmDataPackage* aDataPackage );
|
|
223 |
|
|
224 |
/**
|
|
225 |
* Handle internally response for ActivateSmsRouting
|
|
226 |
*
|
|
227 |
*
|
|
228 |
* @param aError Error code
|
|
229 |
* @param aDataPackage Package data containing TUint8,
|
|
230 |
* status of the routing (active or not)
|
|
231 |
*/
|
|
232 |
virtual void CompleteActivateSmsRouting( TInt aError,
|
|
233 |
CMmDataPackage* aDataPackage );
|
|
234 |
|
|
235 |
/**
|
|
236 |
* Complete AckSmsStored request
|
|
237 |
*
|
|
238 |
*
|
|
239 |
* @param aError Error code
|
|
240 |
*/
|
|
241 |
virtual void CompleteAckSmsStored( TInt aError );
|
|
242 |
|
|
243 |
/**
|
|
244 |
* Complete NackSmsStored request
|
|
245 |
*
|
|
246 |
*
|
|
247 |
* @param aError Error code
|
|
248 |
*/
|
|
249 |
virtual void CompleteNackSmsStored( TInt aError );
|
|
250 |
|
|
251 |
/**
|
|
252 |
* Complete CompleteSendMessage request
|
|
253 |
*
|
|
254 |
*
|
|
255 |
* @param aError Error code
|
|
256 |
* @param aDataPackage
|
|
257 |
*/
|
|
258 |
virtual void CompleteSendMessage( TInt aError,
|
|
259 |
CMmDataPackage* aDataPackage );
|
|
260 |
|
|
261 |
/**
|
|
262 |
* Complete CompleteSendMessageNoFdnCheck request
|
|
263 |
*
|
|
264 |
*
|
|
265 |
* @param aError Error code
|
|
266 |
* @param aDataPackage
|
|
267 |
*/
|
|
268 |
virtual void CompleteSendMessageNoFdnCheck( TInt aError,
|
|
269 |
CMmDataPackage* aDataPackage );
|
|
270 |
|
|
271 |
/**
|
|
272 |
* From MCtsySatService
|
|
273 |
* Send SAT SMS message to the network
|
|
274 |
*
|
|
275 |
*
|
|
276 |
* @param aStkTsySatService Pointer to SAT service interface
|
|
277 |
* @param aSmsTpdu Pointer to Sms TPDU
|
|
278 |
* @param aScAddress Pointer to service address
|
|
279 |
* @param aMobileTON Pointer to type of number
|
|
280 |
* @param aMobileNPI Pointer to number plan
|
|
281 |
* @param aMoreToSend True if there is more to send
|
|
282 |
* @param aTsyReqHandle Request handle
|
|
283 |
* @return KErrNone
|
|
284 |
*/
|
|
285 |
virtual TInt SendSatMessage(
|
|
286 |
MStkTsySatService& aStkTsySatService,
|
|
287 |
TDes8* aSmsTpdu,
|
|
288 |
TDes16* aScAddress,
|
|
289 |
RMobilePhone::TMobileTON* aMobileTON,
|
|
290 |
RMobilePhone::TMobileNPI* aMobileNPI,
|
|
291 |
TBool aMoreToSend,
|
|
292 |
TTsyReqHandle aTsyReqHandle );
|
|
293 |
|
|
294 |
/**
|
|
295 |
* Complete SendSatMessage request
|
|
296 |
*
|
|
297 |
*
|
|
298 |
* @param aError Error code
|
|
299 |
*/
|
|
300 |
virtual void CompleteSendSatMessage( TInt aError );
|
|
301 |
|
|
302 |
/**
|
|
303 |
* Complete ResumeSmsReception request
|
|
304 |
*
|
|
305 |
*
|
|
306 |
* @param aError Error code
|
|
307 |
*/
|
|
308 |
virtual void CompleteResumeSmsReception( TInt aError );
|
|
309 |
|
|
310 |
/**
|
|
311 |
* Complete get sms message store info
|
|
312 |
*
|
|
313 |
*
|
|
314 |
* @param aError Error code
|
|
315 |
* @param aDataPackage
|
|
316 |
*/
|
|
317 |
virtual void CompleteGetMessageStoreInfo( TInt aError,
|
|
318 |
CMmDataPackage* aDataPackage );
|
|
319 |
|
|
320 |
/**
|
|
321 |
* Complete first phase of read all SMSP sets
|
|
322 |
*
|
|
323 |
*
|
|
324 |
* @param aError Error code
|
|
325 |
* @param aDataPackage
|
|
326 |
*/
|
|
327 |
virtual void CompleteReadAllSmspPhase1( TInt aError,
|
|
328 |
CMmDataPackage* aDataPackage );
|
|
329 |
|
|
330 |
/**
|
|
331 |
* Handle internally SMS servers response to SMS Parameter update
|
|
332 |
* request (Store SMSP list)
|
|
333 |
*
|
|
334 |
*
|
|
335 |
* @param aError Error code
|
|
336 |
*/
|
|
337 |
virtual void InternalStoreSmspList( TInt aError );
|
|
338 |
|
|
339 |
/**
|
|
340 |
* Set SMS Storage TSY
|
|
341 |
*
|
|
342 |
*
|
|
343 |
* @param aNewPointer Pointer to Storage Tsy
|
|
344 |
*/
|
|
345 |
virtual void SetSmsStorageTsy( CMmSmsStorageTsy* aNewPointer );
|
|
346 |
|
|
347 |
/**
|
|
348 |
* Return number of SMS location on SIM card
|
|
349 |
*
|
|
350 |
*
|
|
351 |
* @return Number of SMS location on SIM card
|
|
352 |
*/
|
|
353 |
virtual TInt16 GetSmsNumOfLoc();
|
|
354 |
|
|
355 |
/**
|
|
356 |
* Set Sms Number of Location on SIM Card
|
|
357 |
*
|
|
358 |
*
|
|
359 |
* @param aSmsNumOfUsedEntries Number of SMS location
|
|
360 |
*/
|
|
361 |
virtual void SetSmsNumOfLoc( TInt aSmsNumOfUsedEntries );
|
|
362 |
|
|
363 |
/**
|
|
364 |
* This method set Sms Send Attributes values for sending MMSAT
|
|
365 |
* message
|
|
366 |
*
|
|
367 |
*
|
|
368 |
* @param aMmPhone
|
|
369 |
* @param aSmsTpdu Pointer to Sms TPDU
|
|
370 |
* @param aScAddress Pointer to service address
|
|
371 |
* @param aMobileTON Pointer to type of number
|
|
372 |
* @param aMobileNPI Pointer to number plan
|
|
373 |
* @param aMoreToSend True if there is more to send
|
|
374 |
* @return Error code
|
|
375 |
*/
|
|
376 |
virtual TInt SendSatMessageL(
|
|
377 |
CMmPhoneTsy* aMmPhone,
|
|
378 |
TDes8* aSmsTpdu,
|
|
379 |
TDes16* aScAddress,
|
|
380 |
RMobilePhone::TMobileTON* aMobileTON,
|
|
381 |
RMobilePhone::TMobileNPI* aMobileNPI,
|
|
382 |
TBool aMoreToSend );
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Set the information about the CS hardware status: True if off-line,
|
|
386 |
* false if on-line
|
|
387 |
*
|
|
388 |
*
|
|
389 |
* @param aIsOffline
|
|
390 |
*/
|
|
391 |
void SetOffline( TBool aIsOffline );
|
|
392 |
|
|
393 |
/**
|
|
394 |
* Complete set bearer type for sending SMS messages
|
|
395 |
*
|
|
396 |
*
|
|
397 |
* @param aResult Error value
|
|
398 |
*/
|
|
399 |
void CompleteSetMoSmsBearer( TInt aResult );
|
|
400 |
|
|
401 |
#ifdef REQHANDLE_TIMER
|
|
402 |
/**
|
|
403 |
* Chooses the type of response, automatic or common
|
|
404 |
*
|
|
405 |
*
|
|
406 |
* @param aReqHandleType Req handle type
|
|
407 |
* @param aTsyReqHandle Req handle to be stored
|
|
408 |
*/
|
|
409 |
void SetTypeOfResponse( const TInt aReqHandleType,
|
|
410 |
const TTsyReqHandle aTsyReqHandle );
|
|
411 |
|
|
412 |
/**
|
|
413 |
* Complete request because of timer expiration
|
|
414 |
*
|
|
415 |
*
|
|
416 |
* @param aReqHandleType Request handle type
|
|
417 |
* @param aError Error value
|
|
418 |
*/
|
|
419 |
virtual void Complete( TInt aReqHandleType,
|
|
420 |
TInt aError );
|
|
421 |
#endif // REQHANDLE_TIMER
|
|
422 |
|
|
423 |
private:
|
|
424 |
|
|
425 |
/**
|
|
426 |
* C++ default constructor.
|
|
427 |
*/
|
|
428 |
CMmSmsTsy();
|
|
429 |
|
|
430 |
/**
|
|
431 |
* By default Symbian 2nd phase constructor is private.
|
|
432 |
*/
|
|
433 |
void ConstructL();
|
|
434 |
|
|
435 |
/**
|
|
436 |
* Resend an unsent message
|
|
437 |
*
|
|
438 |
*
|
|
439 |
*/
|
|
440 |
void ResendSms();
|
|
441 |
|
|
442 |
/**
|
|
443 |
* Handles extended client requests
|
|
444 |
*
|
|
445 |
*
|
|
446 |
* @param aTsyReqHandle Request handle
|
|
447 |
* @param aIpc IPC number of request
|
|
448 |
* @param aPackage Data Package
|
|
449 |
* @return Error value
|
|
450 |
*/
|
|
451 |
TInt DoExtFuncL( const TTsyReqHandle aTsyReqHandle,
|
|
452 |
const TInt aIpc,
|
|
453 |
const TDataPackage& aPackage );
|
|
454 |
|
|
455 |
/**
|
|
456 |
* Get SMS messaging capabilities
|
|
457 |
*
|
|
458 |
*
|
|
459 |
* @param aTsyReqHandle Request handle
|
|
460 |
* @param aCaps Pointer to the messaging capabilities
|
|
461 |
* @return KErrNone
|
|
462 |
*/
|
|
463 |
TInt GetCaps( const TTsyReqHandle aTsyReqHandle,
|
|
464 |
TDes8* aCaps );
|
|
465 |
|
|
466 |
/**
|
|
467 |
* Get receive mode
|
|
468 |
*
|
|
469 |
*
|
|
470 |
* @param aTsyReqHandle Request handle
|
|
471 |
* @param aReceiveMode Pointer to receive mode
|
|
472 |
* @return KErrNone
|
|
473 |
*/
|
|
474 |
TInt GetReceiveMode( const TTsyReqHandle aTsyReqHandle,
|
|
475 |
RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
|
|
476 |
|
|
477 |
/**
|
|
478 |
* Set receive mode
|
|
479 |
*
|
|
480 |
*
|
|
481 |
* @param aTsyReqHandle Request handle
|
|
482 |
* @param aReceiveMode Pointer to receive mode
|
|
483 |
* @return KErrNone
|
|
484 |
*/
|
|
485 |
TInt SetReceiveMode( const TTsyReqHandle aTsyReqHandle,
|
|
486 |
RMobileSmsMessaging::TMobileSmsReceiveMode const* aReceiveMode );
|
|
487 |
|
|
488 |
/**
|
|
489 |
* Set receive mode cancel
|
|
490 |
*
|
|
491 |
*
|
|
492 |
* @param aTsyReqHandle Request handle
|
|
493 |
* @return KErrNone
|
|
494 |
*/
|
|
495 |
TInt SetReceiveModeCancel( const TTsyReqHandle aTsyReqHandle );
|
|
496 |
|
|
497 |
/**
|
|
498 |
* Notify from receive mode changes
|
|
499 |
*
|
|
500 |
*
|
|
501 |
* @param aReceiveMode Pointer to receive mode
|
|
502 |
* @return KErrNone
|
|
503 |
*/
|
|
504 |
TInt NotifyReceiveModeChange(
|
|
505 |
RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
|
|
506 |
|
|
507 |
/**
|
|
508 |
* Cancel notify reveice mode change request
|
|
509 |
*
|
|
510 |
*
|
|
511 |
* @param aTsyReqHandle Request handle
|
|
512 |
* @return KErrNone
|
|
513 |
*/
|
|
514 |
TInt NotifyReceiveModeChangeCancel(
|
|
515 |
const TTsyReqHandle aTsyReqHandle );
|
|
516 |
|
|
517 |
/**
|
|
518 |
* Complete notify reveice mode change request
|
|
519 |
*
|
|
520 |
*
|
|
521 |
*/
|
|
522 |
void CompleteNotifyReceiveModeChange();
|
|
523 |
|
|
524 |
/**
|
|
525 |
* This method starts the reception of incoming unstored SMS
|
|
526 |
*
|
|
527 |
*
|
|
528 |
* @param aTsyReqHandle Request handle
|
|
529 |
* @param aMsgData Message data
|
|
530 |
* @param aMsgAttributes Message attributes
|
|
531 |
* @return Error value
|
|
532 |
*/
|
|
533 |
TInt ReceiveMessageL( const TTsyReqHandle aTsyReqHandle,
|
|
534 |
TDes8* aMsgData,
|
|
535 |
TDes8* aMsgAttributes );
|
|
536 |
|
|
537 |
/**
|
|
538 |
* Wait for next incoming unstored message cancel
|
|
539 |
*
|
|
540 |
*
|
|
541 |
* @param aTsyReqHandle Request handle
|
|
542 |
* @return Error value
|
|
543 |
*/
|
|
544 |
TInt ReceiveMessageCancel( const TTsyReqHandle aTsyReqHandle );
|
|
545 |
|
|
546 |
/**
|
|
547 |
* Store Class 2 message in TSY's internal memory
|
|
548 |
*
|
|
549 |
*
|
|
550 |
* @param aSmsMsg Pointer to TSmsMsg struct
|
|
551 |
*/
|
|
552 |
void StoreClass2MessageL( TSmsMsg const* aSmsMsg );
|
|
553 |
|
|
554 |
/**
|
|
555 |
* Deliver Stored Class 2 message to the SMS stack
|
|
556 |
*
|
|
557 |
*/
|
|
558 |
void DeliverClass2ToSmsStack();
|
|
559 |
|
|
560 |
/**
|
|
561 |
* Ack message
|
|
562 |
*
|
|
563 |
*
|
|
564 |
* @param aTsyReqHandle Request handle
|
|
565 |
* @param aMsgData SMS PDU
|
|
566 |
* @param aMemoryFull Is SMS stack's memory now full
|
|
567 |
* @return Error value
|
|
568 |
*/
|
|
569 |
TInt AckSmsStoredL( const TTsyReqHandle aTsyReqHandle,
|
|
570 |
const TDesC8* aMsgData,
|
|
571 |
TBool const* aMemoryFull );
|
|
572 |
|
|
573 |
/**
|
|
574 |
* Route RP-Error request to messagehandler
|
|
575 |
*
|
|
576 |
*
|
|
577 |
* @param aTsyReqHandle Request handle
|
|
578 |
* @param aMsgData Pointer to message data
|
|
579 |
* @param aRpCause Pointer to RP cause value
|
|
580 |
* @return Error value
|
|
581 |
*/
|
|
582 |
TInt NackSmsStoredL( const TTsyReqHandle aTsyReqHandle,
|
|
583 |
const TDesC8* aMsgData,
|
|
584 |
TInt* aRpCause );
|
|
585 |
|
|
586 |
/**
|
|
587 |
* Resume sms message reception
|
|
588 |
*
|
|
589 |
*
|
|
590 |
* @param aTsyReqHandle Request handle
|
|
591 |
* @return Error value
|
|
592 |
*/
|
|
593 |
TInt ResumeSmsReceptionL( const TTsyReqHandle aTsyReqHandle );
|
|
594 |
|
|
595 |
/**
|
|
596 |
* Retrieve the current setting for the bearer type used
|
|
597 |
* for sending SMS messages
|
|
598 |
*
|
|
599 |
*
|
|
600 |
* @param aTsyReqHandle Request handle
|
|
601 |
* @param aBearer Pointer to bearer
|
|
602 |
* @return KErrNone
|
|
603 |
*/
|
|
604 |
TInt GetMoSmsBearer( const TTsyReqHandle aTsyReqHandle,
|
|
605 |
RMobileSmsMessaging::TMobileSmsBearer* aBearer );
|
|
606 |
|
|
607 |
/**
|
|
608 |
* Set the bearer type for sending SMS messages
|
|
609 |
*
|
|
610 |
*
|
|
611 |
* @param aTsyReqHandle Request handle
|
|
612 |
* @param aBearer Pointer to bearer
|
|
613 |
* @return KErrNone
|
|
614 |
*/
|
|
615 |
TInt SetMoSmsBearer( const TTsyReqHandle aTsyReqHandle,
|
|
616 |
RMobileSmsMessaging::TMobileSmsBearer* aBearer );
|
|
617 |
|
|
618 |
/**
|
|
619 |
* Set the bearer type cancel
|
|
620 |
*
|
|
621 |
*
|
|
622 |
* @param aTsyReqHandle Request handle
|
|
623 |
* @return KErrNone
|
|
624 |
*/
|
|
625 |
TInt SetMoSmsBearerCancel( const TTsyReqHandle aTsyReqHandle );
|
|
626 |
|
|
627 |
/**
|
|
628 |
* Notify from SMS bearer change
|
|
629 |
*
|
|
630 |
*
|
|
631 |
* @param aBearer Pointer to bearer
|
|
632 |
* @return KErrNone
|
|
633 |
*/
|
|
634 |
TInt NotifyMoSmsBearerChange(
|
|
635 |
RMobileSmsMessaging::TMobileSmsBearer* aBearer );
|
|
636 |
|
|
637 |
/**
|
|
638 |
* Notify from SMS bearer change cancel
|
|
639 |
*
|
|
640 |
*
|
|
641 |
* @param aTsyReqHandle Request handle
|
|
642 |
* @return KErrNone
|
|
643 |
*/
|
|
644 |
TInt NotifyMoSmsBearerChangeCancel(
|
|
645 |
const TTsyReqHandle aTsyReqHandle );
|
|
646 |
|
|
647 |
/**
|
|
648 |
* Send message
|
|
649 |
*
|
|
650 |
*
|
|
651 |
* @param aTsyReqHandle Request handle
|
|
652 |
* @param aMsgData Pointer to Message Data
|
|
653 |
* @param aMsgAttributes Pointer to Message Attributes
|
|
654 |
* @return Error value
|
|
655 |
*/
|
|
656 |
TInt SendMessageL( const TTsyReqHandle aTsyReqHandle,
|
|
657 |
TDes8* aMsgData,
|
|
658 |
TDes8* aMsgAttributes );
|
|
659 |
|
|
660 |
/**
|
|
661 |
* Cancels an outstanding SendMessageNoFdnCheck request
|
|
662 |
*
|
|
663 |
*
|
|
664 |
* @param aTsyReqHandle Request handle
|
|
665 |
* @return Error value
|
|
666 |
*/
|
|
667 |
TInt SendMessageNoFdnCheckCancel( const TTsyReqHandle aTsyReqHandle );
|
|
668 |
|
|
669 |
/**
|
|
670 |
* Send sat message
|
|
671 |
*
|
|
672 |
*
|
|
673 |
* @param aSmsTpdu Pointer to SMS PDU
|
|
674 |
* @param aScAddress Pointer to SC address
|
|
675 |
* @param aMobileTON Type of number
|
|
676 |
* @param aMobileNPI Numberin plan identific
|
|
677 |
* @param aTsyReqHandle Request handle
|
|
678 |
*/
|
|
679 |
void DoSendSatMessageL( TDes8* aSmsTpdu,
|
|
680 |
TDes16* aScAddress,
|
|
681 |
RMobilePhone::TMobileTON* aMobileTON,
|
|
682 |
RMobilePhone::TMobileNPI* aMobileNPI,
|
|
683 |
TBool aMoreToSend,
|
|
684 |
TTsyReqHandle aTsyReqHandle );
|
|
685 |
|
|
686 |
/**
|
|
687 |
* Enumerate sms message stores
|
|
688 |
*
|
|
689 |
*
|
|
690 |
* @param aTsyReqHandle Request handle
|
|
691 |
* @param aCount Pointer to message count
|
|
692 |
* @return KErrNone
|
|
693 |
*/
|
|
694 |
TInt EnumerateMessageStores( const TTsyReqHandle aTsyReqHandle,
|
|
695 |
TInt* aCount );
|
|
696 |
|
|
697 |
/**
|
|
698 |
* Get sms message store info
|
|
699 |
*
|
|
700 |
*
|
|
701 |
* @param aTsyReqHandle Request handle
|
|
702 |
* @param aIndex Index
|
|
703 |
* @param aInfo Information
|
|
704 |
* @return Error value
|
|
705 |
*/
|
|
706 |
TInt GetMessageStoreInfoL( const TTsyReqHandle aTsyReqHandle,
|
|
707 |
TInt const* aIndex,
|
|
708 |
TDes8* aInfo );
|
|
709 |
|
|
710 |
/**
|
|
711 |
* Get sms message store info cancel
|
|
712 |
*
|
|
713 |
*
|
|
714 |
* @param aTsyReqHandle Request handle
|
|
715 |
* @return KErrNone
|
|
716 |
*/
|
|
717 |
TInt GetMessageStoreInfoCancel( const TTsyReqHandle aTsyReqHandle );
|
|
718 |
|
|
719 |
/**
|
|
720 |
* Read SMSP list phase 1
|
|
721 |
*
|
|
722 |
*
|
|
723 |
* @param aTsyReqHandle Request handle
|
|
724 |
* @param aId Pointer to client id
|
|
725 |
* @param aBufSize Pointer to buffer size
|
|
726 |
* @return Error value
|
|
727 |
*/
|
|
728 |
TInt ReadSmspListPhase1L( const TTsyReqHandle aTsyReqHandle,
|
|
729 |
RMobilePhone::TClientId const* aId,
|
|
730 |
TInt* aBufSize );
|
|
731 |
|
|
732 |
/**
|
|
733 |
* Read SMSP list phase 2
|
|
734 |
*
|
|
735 |
*
|
|
736 |
* @param aTsyReqHandle Request handle
|
|
737 |
* @param aId Pointer to client id
|
|
738 |
* @param aBuffer Pointer to buffer
|
|
739 |
* @return KErrNone
|
|
740 |
*/
|
|
741 |
TInt ReadSmspListPhase2( TTsyReqHandle aTsyReqHandle,
|
|
742 |
RMobilePhone::TClientId const* aId,
|
|
743 |
TDes8* aBuffer );
|
|
744 |
|
|
745 |
/**
|
|
746 |
* Cancel read SMSP list
|
|
747 |
*
|
|
748 |
*
|
|
749 |
* @param aTsyReqHandle Request handle
|
|
750 |
* @return KErrNone
|
|
751 |
*/
|
|
752 |
TInt ReadAllSmspCancel( const TTsyReqHandle aTsyReqHandle );
|
|
753 |
|
|
754 |
/**
|
|
755 |
* Create SMSP list from read entries
|
|
756 |
*
|
|
757 |
*
|
|
758 |
* @param aSmspList List of SMSP entries
|
|
759 |
*/
|
|
760 |
void CreateSmspListL( CArrayPtrFlat<TSmsParameters>& aSmspList );
|
|
761 |
|
|
762 |
/**
|
|
763 |
* Store SMSP list
|
|
764 |
*
|
|
765 |
*
|
|
766 |
* @param aTsyReqHandle Request handle
|
|
767 |
* @param aBuffer Pointer to buffer
|
|
768 |
* @return KErrNone
|
|
769 |
*/
|
|
770 |
TInt StoreSmspList( const TTsyReqHandle aTsyReqHandle,
|
|
771 |
TDes8* aBuffer );
|
|
772 |
|
|
773 |
/**
|
|
774 |
* This method trap and calls ProcessStoreSmspListL-method
|
|
775 |
*
|
|
776 |
*
|
|
777 |
*/
|
|
778 |
void CallProcessStoreSmspList();
|
|
779 |
|
|
780 |
/**
|
|
781 |
* Call CompleteStoreSmspList-method or make new SMS parameter update
|
|
782 |
* request to DOS
|
|
783 |
*
|
|
784 |
*
|
|
785 |
*/
|
|
786 |
void ProcessStoreSmspListL();
|
|
787 |
|
|
788 |
/**
|
|
789 |
* Complete StoreAllSmsp request to the client
|
|
790 |
*
|
|
791 |
*
|
|
792 |
* @param aError Cause value that is used while completing request
|
|
793 |
*/
|
|
794 |
void CompleteStoreSmspList( TInt aError );
|
|
795 |
|
|
796 |
/**
|
|
797 |
* Notify SMSP list change
|
|
798 |
*
|
|
799 |
*
|
|
800 |
* @return KErrNone
|
|
801 |
*/
|
|
802 |
TInt NotifySmspListChange();
|
|
803 |
|
|
804 |
/**
|
|
805 |
* Notify SMSP list change cancel
|
|
806 |
*
|
|
807 |
*
|
|
808 |
* @param aTsyReqHandle Request handle
|
|
809 |
* @return KErrNone
|
|
810 |
*/
|
|
811 |
TInt NotifySmspListChangeCancel( const TTsyReqHandle aTsyReqHandle );
|
|
812 |
|
|
813 |
/**
|
|
814 |
* Complete notify SMSP list
|
|
815 |
*
|
|
816 |
*
|
|
817 |
*/
|
|
818 |
void CompleteNotifySmspListChange();
|
|
819 |
|
|
820 |
/**
|
|
821 |
* Reset all class attributes
|
|
822 |
*
|
|
823 |
*
|
|
824 |
*/
|
|
825 |
void ResetVariables();
|
|
826 |
|
|
827 |
/**
|
|
828 |
* Checks wether or not a ETel request can be performed while
|
|
829 |
* offline mode is enabled
|
|
830 |
*
|
|
831 |
*
|
|
832 |
* @param aIpc Ipc number of the request
|
|
833 |
* @return TBool
|
|
834 |
*/
|
|
835 |
TBool IsRequestPossibleInOffline( TInt aIpc ) const;
|
|
836 |
|
|
837 |
/**
|
|
838 |
* Checks if error code is a relay protocol error
|
|
839 |
*
|
|
840 |
*
|
|
841 |
* @param aError Cause value received from LTSY
|
|
842 |
* @return TBool
|
|
843 |
*/
|
|
844 |
static TBool IsRPError(TInt aError);
|
|
845 |
|
|
846 |
private:
|
|
847 |
|
|
848 |
/**
|
|
849 |
* A pointer to the Phone TSY
|
|
850 |
* Not own.
|
|
851 |
*/
|
|
852 |
CMmPhoneTsy* iMmPhone;
|
|
853 |
|
|
854 |
/**
|
|
855 |
* A pointer to the SMS extension
|
|
856 |
* Own.
|
|
857 |
*/
|
|
858 |
CMmSmsExtInterface* iMmSmsExtInterface;
|
|
859 |
|
|
860 |
/**
|
|
861 |
* A pointer to the SMS storage sub-session
|
|
862 |
* Not own.
|
|
863 |
*/
|
|
864 |
CMmSmsStorageTsy* iMmSmsStorageTsy;
|
|
865 |
|
|
866 |
/**
|
|
867 |
* A pointer to the SAT service interface provided by the SAT
|
|
868 |
* TSY.
|
|
869 |
* Not own.
|
|
870 |
*/
|
|
871 |
MStkTsySatService* iTsySatMessaging;
|
|
872 |
|
|
873 |
/**
|
|
874 |
* Routing activity
|
|
875 |
*/
|
|
876 |
TSmsRoutingActivity iServerRoutingActivity;
|
|
877 |
|
|
878 |
/**
|
|
879 |
* Receive mode
|
|
880 |
*/
|
|
881 |
RMobileSmsMessaging::TMobileSmsReceiveMode iMobileSmsReceiveMode;
|
|
882 |
|
|
883 |
/**
|
|
884 |
* Notify receive mode pointer
|
|
885 |
* Not own.
|
|
886 |
*/
|
|
887 |
RMobileSmsMessaging::TMobileSmsReceiveMode* iNotifyReceiveModeChangePtr;
|
|
888 |
|
|
889 |
/**
|
|
890 |
* Wait for unstored message pointer
|
|
891 |
* Not own.
|
|
892 |
*/
|
|
893 |
TAny* iReceiveMessageParamsPtr;
|
|
894 |
|
|
895 |
/**
|
|
896 |
* Wait for unstored message pointer
|
|
897 |
* Not own.
|
|
898 |
*/
|
|
899 |
TDes8* iReceiveMessagePduPtr;
|
|
900 |
|
|
901 |
/**
|
|
902 |
* Notify SMS bearer pointer
|
|
903 |
* Not own.
|
|
904 |
*/
|
|
905 |
RMobileSmsMessaging::TMobileSmsBearer* iNotifySmsBearerPtr;
|
|
906 |
|
|
907 |
/**
|
|
908 |
* A pointer to send message attributes
|
|
909 |
* Not own.
|
|
910 |
*/
|
|
911 |
TDes8* iSendMessageMsgAttrPckgPtr;
|
|
912 |
|
|
913 |
/**
|
|
914 |
* A pointer to get message store info
|
|
915 |
* Not own.
|
|
916 |
*/
|
|
917 |
TDes8* iGetMessageStoreInfoPtr;
|
|
918 |
|
|
919 |
/**
|
|
920 |
* Store all parameter sets buffer
|
|
921 |
* Not own.
|
|
922 |
*/
|
|
923 |
TDes8* iStoreSmspBufferPtr;
|
|
924 |
|
|
925 |
/**
|
|
926 |
* Store all parameter sets index
|
|
927 |
*/
|
|
928 |
TInt iStoreSmspIndex;
|
|
929 |
|
|
930 |
/**
|
|
931 |
* Request handle type
|
|
932 |
*/
|
|
933 |
TSmsRequestTypes iReqHandleType;
|
|
934 |
|
|
935 |
/**
|
|
936 |
* Pointer to TSY request handle store
|
|
937 |
* Own.
|
|
938 |
*/
|
|
939 |
CMmTsyReqHandleStore* iTsyReqHandleStore;
|
|
940 |
|
|
941 |
/**
|
|
942 |
* A table for Sms request handles
|
|
943 |
*/
|
|
944 |
TTsyReqHandle iSmsReqHandles[EMultimodeSmsMaxNumOfRequests];
|
|
945 |
|
|
946 |
/**
|
|
947 |
* SMSP list, in streamed format, for two phased list retrieval
|
|
948 |
* Not own.
|
|
949 |
*/
|
|
950 |
CBufBase* iSMSPList;
|
|
951 |
|
|
952 |
/**
|
|
953 |
* SMSP size buffer, for two phased list retrieval
|
|
954 |
*/
|
|
955 |
TInt* iRetSMSPSize;
|
|
956 |
|
|
957 |
/**
|
|
958 |
* SMSP client id for two phased list retrieval
|
|
959 |
*/
|
|
960 |
RMobilePhone::TClientId* iSMSPClientId;
|
|
961 |
|
|
962 |
/**
|
|
963 |
* SMS message array for incoming messages that are waiting
|
|
964 |
* acknowledging from SMS stack
|
|
965 |
* Own.
|
|
966 |
*/
|
|
967 |
CArrayPtrFlat<TSmsMsg>* iSmsMsgArray;
|
|
968 |
|
|
969 |
/**
|
|
970 |
* Flag that indicates if client storage is full
|
|
971 |
*/
|
|
972 |
TBool iClientStorageFull;
|
|
973 |
|
|
974 |
/**
|
|
975 |
* Number of SMS Locations on Sim Card
|
|
976 |
*/
|
|
977 |
TUint8 iSmsNumOfLoc;
|
|
978 |
|
|
979 |
/**
|
|
980 |
* SMS send request
|
|
981 |
* stores the last sent message for possible re-send attempts
|
|
982 |
* Own.
|
|
983 |
*/
|
|
984 |
CSmsSendRequest* iSmsSendReq;
|
|
985 |
|
|
986 |
/**
|
|
987 |
* On-line/off-line status of CS hardware.
|
|
988 |
* At this moment, only needed for method ResumeSmsReception
|
|
989 |
*/
|
|
990 |
TBool iIsOffline;
|
|
991 |
|
|
992 |
/**
|
|
993 |
* true if a ResumeSmsReception request has come during off-line
|
|
994 |
* mode. See method ResumeSmsReception
|
|
995 |
*/
|
|
996 |
TBool iResumeSmsReceptionPending;
|
|
997 |
|
|
998 |
/**
|
|
999 |
* Indicating status of NoFdnCheck
|
|
1000 |
*/
|
|
1001 |
enum TSmsNoFdnCheckStatus
|
|
1002 |
{
|
|
1003 |
ESmsNoFdnCheckUnknown,
|
|
1004 |
ESmsNoFdnCheckUsed,
|
|
1005 |
ESmsNoFdnCheckNotUsed
|
|
1006 |
};
|
|
1007 |
|
|
1008 |
/**
|
|
1009 |
* Indicating if send message no fdn check request is ongoing
|
|
1010 |
*/
|
|
1011 |
TSmsNoFdnCheckStatus iSmsNoFdnCheckFlag;
|
|
1012 |
|
|
1013 |
TInt iExpectAckOrNack;
|
|
1014 |
|
|
1015 |
};
|
|
1016 |
#endif // CMMSMSTSY_H
|
|
1017 |
|
|
1018 |
// End of File
|