|
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 _ATGPRSCONFIG_H |
|
23 #define _ATGPRSCONFIG_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include "et_tsy.h" |
|
27 #include "et_phone.h" |
|
28 #include "ATBASE.H" |
|
29 #include <etelpckt.h> |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 class CATGPRSSetConfig : public CATCommands |
|
35 /** |
|
36 Sends the AT command to configure a specific context or to |
|
37 set the specific context settings. |
|
38 Both CATGPRSSetConfig and CATGPRSGetConfig inherits from the CATCommands class. |
|
39 This class transmits the following commands: AT+CGQREQ=, AT+CGDCONT=, AT+CGQMIN= |
|
40 @internalComponent |
|
41 */ |
|
42 { |
|
43 public: |
|
44 static CATGPRSSetConfig* NewL(TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
45 ~CATGPRSSetConfig(); |
|
46 virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aConfig); |
|
47 virtual void Stop(TTsyReqHandle aTsyReqHandle); |
|
48 |
|
49 private: |
|
50 CATGPRSSetConfig(TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
51 void ConstructL(); |
|
52 virtual void EventSignal(TEventSource aSource); |
|
53 virtual void Complete(TInt aErr, TEventSource aSource); |
|
54 virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus); |
|
55 TInt MakeupCGDCONT(); |
|
56 |
|
57 private: |
|
58 RPacketContext::TContextConfigGPRS* iContextConfigGPRS; //< Context settings. |
|
59 TInt iCid; //< Context id. |
|
60 enum |
|
61 { |
|
62 EATNotInProgress, |
|
63 EWaitForSetCGDCONTComplete, |
|
64 EWaitForSetCGDCONTOK |
|
65 }iState; //< Enum for class states. |
|
66 }; |
|
67 |
|
68 /** |
|
69 * Sends the AT command to get the current context configuration |
|
70 * CATGPRSGetConfig inherits from the CATBase class. |
|
71 * This class transmits the following commands: AT+CGQREQ=, AT+CGDCONT=, AT+CGQMIN= |
|
72 */ |
|
73 class CATGPRSGetConfig : public CATCommands |
|
74 { |
|
75 public: |
|
76 static CATGPRSGetConfig* NewL(TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
77 |
|
78 ~CATGPRSGetConfig (); |
|
79 virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aConfig); |
|
80 virtual void Stop(TTsyReqHandle aTsyReqHandle); |
|
81 |
|
82 private: |
|
83 CATGPRSGetConfig (TInt aCid, CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals); |
|
84 void ConstructL(); |
|
85 virtual void EventSignal(TEventSource aSource); |
|
86 virtual void Complete(TInt aErr, TEventSource aSource); |
|
87 virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus); |
|
88 void ParseCGDCONTResponseL(); |
|
89 |
|
90 private: |
|
91 RPacketContext::TContextConfigGPRS* iContextConfigV1; //< Context settings. |
|
92 TInt iCid; //< Context id. |
|
93 enum |
|
94 { |
|
95 EATNotInProgress, |
|
96 EWaitForGetCGDCONTComplete, |
|
97 EWaitForGetCGDCONTOK |
|
98 }iState; //< Enum for class states. |
|
99 }; |
|
100 #endif |