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 atgprsntwkregstatus.h |
|
15 // AT command definition |
|
16 // This file defines the AT command used for getting out the phones current network |
|
17 //registration status.. |
|
18 // |
|
19 |
|
20 #ifndef __ATGPRSNTWKREGSTATUS_H |
|
21 #define __ATGPRSNTWKREGSTATUS_H |
|
22 |
|
23 //system include |
|
24 #include <etelpckt.h> |
|
25 |
|
26 //user include |
|
27 #include "atcommandbase.h" |
|
28 |
|
29 class CATGprsNtwkRegStatusChange; |
|
30 /** |
|
31 * CATGprsNtwkRegStatus inherits from the CAtCommandBase class. |
|
32 * Sends the AT command to find out the phones current network |
|
33 * registration status. |
|
34 * This class transmits the following commands: AT+CGREG? |
|
35 */ |
|
36 class CATGprsNtwkRegStatus : public CAtCommandBase |
|
37 { |
|
38 public: |
|
39 static CATGprsNtwkRegStatus* NewL(CGlobalPhonemanager& aGloblePhone, |
|
40 CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
41 CATGprsNtwkRegStatusChange& aNtwkRegStatusChange); |
|
42 /** |
|
43 * Destructor |
|
44 * |
|
45 */ |
|
46 ~CATGprsNtwkRegStatus(); |
|
47 /** |
|
48 * Virtual function. Inherited from CAtCommandBase |
|
49 * Start Execute AT Command |
|
50 */ |
|
51 virtual void ExecuteCommand(); |
|
52 /** |
|
53 * Virtual function. Inherited from CAtCommandBase |
|
54 * @param aResponseBuf Line buf reading from baseband |
|
55 */ |
|
56 virtual void ParseResponseL(const TDesC8& aResponseBuf); |
|
57 /** |
|
58 * Will be called by AT Manager whenever a event was triggered |
|
59 * |
|
60 * @param aEventSource |
|
61 * @param aStatus |
|
62 */ |
|
63 virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus); |
|
64 virtual void StartRequest(); |
|
65 |
|
66 protected: |
|
67 /** |
|
68 * Constructor |
|
69 * |
|
70 * @param aGloblePhone |
|
71 * @param aCtsyDispatcherCallback |
|
72 * @param aNtwkRegStatusChange |
|
73 */ |
|
74 CATGprsNtwkRegStatus(CGlobalPhonemanager& aGloblePhone, |
|
75 CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
76 CATGprsNtwkRegStatusChange& aNtwkRegStatusChange); |
|
77 /** |
|
78 * 2nd Constructor |
|
79 */ |
|
80 void ConstructL(); |
|
81 private: |
|
82 /* |
|
83 * The return value of AT command executed |
|
84 */ |
|
85 TInt iError; |
|
86 RPacketService::TRegistrationStatus iGprsRegistrationStatus; |
|
87 CATGprsNtwkRegStatusChange& iNtwkRegStatusChange; |
|
88 }; |
|
89 |
|
90 #endif |
|