1 // Copyright (c) 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 // @file atgprsconfig.h |
|
15 // AT command definition |
|
16 // This contains CATGPRSSetConfig which is defines the AT command used |
|
17 // for setting GPRS context configuration. |
|
18 // |
|
19 |
|
20 #ifndef _ATGPRSCONFIG_H |
|
21 #define _ATGPRSCONFIG_H |
|
22 |
|
23 // user include |
|
24 #include "atcommandbase.h" |
|
25 #include "cltsypacketserviceshandler.h" |
|
26 |
|
27 /** |
|
28 * CATGPRSSetConfig inherits from the CAtCommandBase class. |
|
29 * This class provide the common functionalities for setting |
|
30 * GPRS context configuration. |
|
31 * |
|
32 */ |
|
33 class CATGPRSSetConfig : public CAtCommandBase |
|
34 { |
|
35 public: |
|
36 static CATGPRSSetConfig* NewL(CGlobalPhonemanager& aGloblePhone, |
|
37 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
38 /** |
|
39 * Destructor |
|
40 * |
|
41 */ |
|
42 ~CATGPRSSetConfig(); |
|
43 /** |
|
44 * This Function creates the at set string for the AT+CGDCONT command. |
|
45 */ |
|
46 TInt MakeupCGDCONT(); |
|
47 /* |
|
48 * Set the parameter of AT command |
|
49 * |
|
50 * @param aContext The context to be set configuration |
|
51 */ |
|
52 void SetContext(const TInt aContextId); |
|
53 /** |
|
54 * Virtual function. Inherited from CAtCommandBase |
|
55 * Start Execute AT Command |
|
56 */ |
|
57 virtual void ExecuteCommand(); |
|
58 /** |
|
59 * Virtual function. Inherited from CAtCommandBase |
|
60 * @param aResponseBuf Line buf reading from baseband |
|
61 */ |
|
62 virtual void ParseResponseL(const TDesC8& aResponseBuf); |
|
63 /** |
|
64 * Will be called by AT Manager whenever a event was triggered |
|
65 * |
|
66 * @param aEventSource |
|
67 * @param aStatus |
|
68 */ |
|
69 virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus); |
|
70 virtual void StartRequest(); |
|
71 |
|
72 protected: |
|
73 /** |
|
74 * Constructor |
|
75 * |
|
76 * @param aGloblePhone |
|
77 * @param aCtsyDispatcherCallback |
|
78 */ |
|
79 CATGPRSSetConfig( CGlobalPhonemanager& aGloblePhone, |
|
80 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
81 /** |
|
82 * 2nd Constructor |
|
83 */ |
|
84 void ConstructL(); |
|
85 private: |
|
86 /* |
|
87 * The return value of AT command executed |
|
88 */ |
|
89 TInt iError; |
|
90 /* |
|
91 * The context to be set configuration |
|
92 */ |
|
93 TInt iContextId; |
|
94 |
|
95 TBool iDeleteContext; |
|
96 |
|
97 }; |
|
98 #endif |
|