24
|
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 |
#ifndef __ATGPRSNTWKREGSTATUS_H
|
|
22 |
#define __ATGPRSNTWKREGSTATUS_H
|
|
23 |
|
|
24 |
#include "ATBASE.H"
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
// Forward declarations
|
|
29 |
class CATGprsNtwkRegStatusChange;
|
|
30 |
|
|
31 |
class CATGprsNtwkRegStatus : public CATCommands
|
|
32 |
/**
|
|
33 |
This state machine uses the "AT+CGREG?" command to find out the phones current network
|
|
34 |
registration status.
|
|
35 |
@internalComponent
|
|
36 |
*/
|
|
37 |
{
|
|
38 |
public: // Public methods
|
|
39 |
|
|
40 |
// Factory function
|
|
41 |
static CATGprsNtwkRegStatus* NewL(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals,CATGprsNtwkRegStatusChange* aATGprsNtwkRegStatusChange);
|
|
42 |
|
|
43 |
// C++ destructor
|
|
44 |
~CATGprsNtwkRegStatus();
|
|
45 |
|
|
46 |
private: // Private methods
|
|
47 |
|
|
48 |
// C++ constuctor and Symbian standard 2nd stage constructor
|
|
49 |
CATGprsNtwkRegStatus(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aPhoneGlobals,CATGprsNtwkRegStatusChange* aATGprsNtwkRegStatusChange);
|
|
50 |
void ConstructL();
|
|
51 |
|
|
52 |
// Methods inherited from CATCommands
|
|
53 |
virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams);
|
|
54 |
virtual void Stop(TTsyReqHandle aTsyReqHandle);
|
|
55 |
virtual void EventSignal(TEventSource aSource);
|
|
56 |
virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus);
|
|
57 |
void Complete(TInt aError,TEventSource aSource);
|
|
58 |
|
|
59 |
// Utility methods
|
|
60 |
void ParseResponseL();
|
|
61 |
|
|
62 |
private: // Private data
|
|
63 |
CATGprsNtwkRegStatusChange* iATGprsNtwkRegStatusChange; //< Pointer to an object owned by our client
|
|
64 |
RPacketService::TRegistrationStatus* iRegStatus; //< Pointer to clients structure initialised in ::Start()
|
|
65 |
enum { EIdle=0,EWaitForWrite,EWaitForRead } iState; //< Enum for class states.
|
|
66 |
};
|
|
67 |
|
|
68 |
#endif
|
|
69 |
|
|
70 |
|