|
1 // Copyright (c) 2001-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 |
|
22 #ifndef __ATGPRSCONTEXTACTIVATE_H |
|
23 #define __ATGPRSCONTEXTACTIVATE_H |
|
24 #include "ATBASE.H" |
|
25 |
|
26 |
|
27 |
|
28 /** |
|
29 Sends the AT command to attach a context to the network. |
|
30 CATGprsContextActivate inherits from the CATCommands class. |
|
31 This class transmits the following commands: ATD*99***%d#. |
|
32 @internalComponent |
|
33 */ |
|
34 class CATGprsContextActivate : public CATCommands |
|
35 { |
|
36 public: |
|
37 static CATGprsContextActivate * NewL(TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
38 ~CATGprsContextActivate(); |
|
39 virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams); |
|
40 virtual void Stop(TTsyReqHandle aTsyReqHandle); |
|
41 |
|
42 protected: |
|
43 CATGprsContextActivate(TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
44 void ConstructL(); |
|
45 virtual void EventSignal(TEventSource aSource); |
|
46 virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus); |
|
47 void Complete(TInt aError,TEventSource aSource); |
|
48 TInt ValidateExpectString(); |
|
49 private: |
|
50 CCommChatString* iExpectString; //< Pointer to response string. |
|
51 CCommChatString* iNoCarrierString; //< Pointer to response string. |
|
52 |
|
53 TInt iCid; //< Context id. |
|
54 enum |
|
55 { |
|
56 EATNotInProgress, |
|
57 ESendEricssonConnectCommand, |
|
58 EConnectEricssonReadComplete, |
|
59 ESendNormalConnectCommand, |
|
60 EConnectNormalReadComplete |
|
61 } iState; //< Enum for class states. |
|
62 }; |
|
63 |
|
64 |
|
65 |
|
66 #endif |