|
1 // Copyright (c) 1997-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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __MSMSREAD_H__ |
|
22 #define __MSMSREAD_H__ |
|
23 |
|
24 #include "smsbase.H" |
|
25 #include "mSMSSTOR.H" |
|
26 #include "et_phone_util.h" |
|
27 |
|
28 typedef TBuf8<400> TSpecialPdu; |
|
29 |
|
30 class CATSmsMessagingRead : public CATSmsCommands |
|
31 { |
|
32 public: |
|
33 static CATSmsMessagingRead* NewL(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, |
|
34 CPhoneGlobals* aGsmStatus); |
|
35 |
|
36 virtual void EventSignal(TEventSource aSource); |
|
37 virtual void CompleteWithIOError(TEventSource aSource, TInt aStatus); |
|
38 void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams); |
|
39 void Stop(TTsyReqHandle aTsyReqHandle); |
|
40 void StopReadSms(TTsyReqHandle aTsyReqHandle); |
|
41 void Complete(TInt aError); |
|
42 void Complete(TTsyReqHandle aReqHandle,TInt aError); |
|
43 virtual void Complete(TInt aError, TEventSource aSource); |
|
44 RMobileSmsStore::TMobileSmsStoreStatus GsmMsgStatusToStoreStatus(TInt aMsgStat); |
|
45 |
|
46 private: |
|
47 CATSmsMessagingRead(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, |
|
48 CPhoneGlobals* aMmStatus); |
|
49 void CMGRResponseL(); |
|
50 void StartReadSequence(); |
|
51 void PopulateScaFieldsAndRemove(TPtrC8& aPdu, RMobilePhone::TMobileAddress& aGsmServiceCentre); |
|
52 |
|
53 private: |
|
54 enum { |
|
55 EATNotInProgress, |
|
56 EATWaitForSendingCMGRRequestComplete, |
|
57 EATWaitForCMGRResponseComplete, |
|
58 EATWaitForSendingPrefMemComplete, |
|
59 EATWaitForPrefMemResponse |
|
60 } iState; |
|
61 |
|
62 TBuf8<KGenericBufferSize> iTxBuffer; |
|
63 RMobileSmsStore::TMobileGsmSmsEntryV1* iMsgEntry; |
|
64 TSpecialPdu iPdu; |
|
65 TInt iMsgLength; |
|
66 TInt iMsgLocation; |
|
67 RMobilePhone::TMobileAddress iGsmServiceCentre; |
|
68 TStorageType iShortStoreName; |
|
69 CMobileSmsStore* iSmsStore; |
|
70 TBool iCancelled; |
|
71 }; |
|
72 |
|
73 #endif |
|
74 |
|
75 |
|
76 |
|
77 |