telephonyserverplugins/multimodetsy/hayes/ATWAIT.H
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-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 // Wait for asynchronous notifications
       
    15 // +CRING:		incoming call
       
    16 // +CREG:		network registration change
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalAll 
       
    23 */
       
    24 
       
    25 #ifndef __ATWAIT_H__
       
    26 #define __ATWAIT_H__
       
    27 
       
    28 #include "ATBASE.H"
       
    29 
       
    30 class CATWaitForCall;
       
    31 class CSetLineToIdle : public CTimer
       
    32 /**
       
    33 @internalComponent
       
    34 */
       
    35 	{
       
    36 public:
       
    37 	static CSetLineToIdle* NewL(CATWaitForCall* aWait);
       
    38 	~CSetLineToIdle();
       
    39 	void Start();
       
    40 	void Stop();
       
    41 protected:
       
    42 	CSetLineToIdle(CATWaitForCall* aWait);
       
    43 	virtual void RunL();
       
    44 private:
       
    45 	CATWaitForCall* iWait;
       
    46 	};
       
    47 
       
    48 class CCallHayes;
       
    49 class CATWaitForCall : public CATBase
       
    50 /**
       
    51 @internalComponent
       
    52 */
       
    53 	{
       
    54 public:
       
    55 	static CATWaitForCall* NewL(CATIO* aIo,CTelObject* aTelObject,CPhoneGlobals* aPhoneGlobals);
       
    56 	~CATWaitForCall();
       
    57 	void StartWait();
       
    58 	void EndRing();
       
    59 	void ResetRingCounter();
       
    60 	RMobilePhone::TMobilePhoneRegistrationStatus MappingRegistrationStatusFromETSIToMM(TInt *aNumber);
       
    61 protected:
       
    62 	CATWaitForCall(CATIO* aIo,CTelObject* aTelObject,CPhoneGlobals* aPhoneGlobals);
       
    63 	void ConstructL();
       
    64 	TInt ParseIncomingCallIndicationL();
       
    65 	void ParseNetworkRegistrationL();
       
    66 	virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus);
       
    67 	virtual void EventSignal(TEventSource aSource);
       
    68 protected:
       
    69 	CCommChatString* iRingExpectString;
       
    70 	CCommChatString* iCRingExpectString;
       
    71 	CCommChatString* iRegExpectString;
       
    72 	CCommChatString* iTailExpectString;
       
    73 	CSetLineToIdle* iSetLineToIdle;
       
    74 	TInt iRingCounter;
       
    75 	enum {
       
    76 		EATWaitForUnsolicited,
       
    77 		EATWaitForCRingRead,
       
    78 		EATWaitForCRegRead
       
    79 		} iState;
       
    80 	};
       
    81 
       
    82 #endif