|
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 __CMT_UNSTORED_H__ |
|
22 #define __CMT_UNSTORED_H__ |
|
23 |
|
24 #include "smsbase.H" |
|
25 |
|
26 // Forward class declarations |
|
27 class CReceiveSmsQueue; |
|
28 |
|
29 |
|
30 class CATSmsWaitForAndHandleCMTUnstored : public CATBase |
|
31 { |
|
32 public: // public methods |
|
33 static CATSmsWaitForAndHandleCMTUnstored* NewL(CATIO* aIo, CTelObject* aTelObject, CPhoneGlobals* aGlobals, |
|
34 CReceiveSmsQueue& aReceiveQueue); |
|
35 ~CATSmsWaitForAndHandleCMTUnstored(); |
|
36 |
|
37 void Enable(); |
|
38 void Disable(); |
|
39 |
|
40 |
|
41 private: // private methods |
|
42 CATSmsWaitForAndHandleCMTUnstored(CATIO* aIo, CTelObject* aTelObject, CPhoneGlobals* aGlobals, |
|
43 CReceiveSmsQueue& aReceiveQueue); |
|
44 // Utility methods |
|
45 void ParseFirstCMTLineL(TInt& aPduLen); |
|
46 void ParseSecondCMTLineL(RMobileSmsMessaging::TMobileSmsGsmTpdu& aPdu,RMobileSmsMessaging::TMobileSmsReceiveAttributesV1& aAttr); |
|
47 |
|
48 // Pure virtuals from CATBase |
|
49 virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus); |
|
50 virtual void EventSignal(TEventSource aSource); |
|
51 |
|
52 private: // private data |
|
53 // State machine states and current state |
|
54 enum TState {ENoState=0, EWaitForCMT, EWaitForCmtSecondLine, EWaitForCmtSecondLineThenDisable}; |
|
55 TState iState; |
|
56 |
|
57 TInt iPduLen; // Stores the length that the phone states the PDU is |
|
58 |
|
59 CCommChatString* iCMTExpectString; // The CMT expect string, this object not owned by this class |
|
60 CCommChatString* iCDSExpectString; // The CDS expect string, this object not owned by this class |
|
61 CCommChatString* iWaitForAnything; // The '*' anything expect string, this object not owned by this class |
|
62 |
|
63 CReceiveSmsQueue& iReceiveQueue; // Reference to our client's receive queue |
|
64 }; |
|
65 |
|
66 #endif |