|
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 atgprscontextconnect.h |
|
15 // AT command definition |
|
16 // This file defines the AT command used for activating a PDP context. |
|
17 // |
|
18 |
|
19 #ifndef __ATGPRSCONTEXTCONNECT_H |
|
20 #define __ATGPRSCONTEXTCONNECT_H |
|
21 |
|
22 // user include |
|
23 #include "atcommandbase.h" |
|
24 #include "cltsypacketserviceshandler.h" |
|
25 |
|
26 |
|
27 /** |
|
28 * CATGprsContextConnect inherits from the CATCommands class. |
|
29 * Sends the AT command to attach a context to the network. |
|
30 */ |
|
31 class CATGprsContextConnect : public CAtCommandBase |
|
32 { |
|
33 public: |
|
34 static CATGprsContextConnect* NewL(CGlobalPhonemanager& aGloblePhone, |
|
35 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
36 /** |
|
37 * Destructor |
|
38 * |
|
39 */ |
|
40 ~CATGprsContextConnect(); |
|
41 /** |
|
42 * Virtual function. Inherited from CAtCommandBase |
|
43 * Start Execute AT Command |
|
44 */ |
|
45 virtual void ExecuteCommand(); |
|
46 /** |
|
47 * Virtual function. Inherited from CAtCommandBase |
|
48 * @param aResponseBuf Line buf reading from baseband |
|
49 */ |
|
50 virtual void ParseResponseL(const TDesC8& aResponseBuf); |
|
51 /* |
|
52 * Set the parameter of AT command |
|
53 * |
|
54 * @param aContext The context to be set configuration |
|
55 */ |
|
56 void SetContext(const TInt aContextId); |
|
57 TInt GetErrorValue(); |
|
58 virtual void StartRequest(); |
|
59 TUint GetConnectionSpeed(); |
|
60 |
|
61 protected: |
|
62 /** |
|
63 * Constructor |
|
64 * |
|
65 * @param aGloblePhone |
|
66 * @param aCtsyDispatcherCallback |
|
67 */ |
|
68 CATGprsContextConnect(CGlobalPhonemanager& aGloblePhone, |
|
69 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
70 /** |
|
71 * 2nd Constructor |
|
72 */ |
|
73 void ConstructL(); |
|
74 private: |
|
75 /* |
|
76 * The return value of AT command executed |
|
77 */ |
|
78 TInt iError; |
|
79 /* |
|
80 * The context to be set configuration |
|
81 */ |
|
82 TInt iContextId; |
|
83 TUint iConnectionSpeed; |
|
84 }; |
|
85 |
|
86 |
|
87 #endif //__ATGPRSCONTEXTCONNECT_H |