24
|
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 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalAll
|
|
19 |
*/
|
|
20 |
|
|
21 |
#ifndef __ATDIAL_H__
|
|
22 |
#define __ATDIAL_H__
|
|
23 |
|
|
24 |
#include "ATCALL.H"
|
|
25 |
|
|
26 |
|
|
27 |
class CATDialVoice : public CATVoiceCallConnectCommands
|
|
28 |
/**
|
|
29 |
Dial command specific to voice call
|
|
30 |
@internalComponent
|
|
31 |
*/
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
static CATDialVoice* NewL(CATIO* aIo, CTelObject* aTelObject,CATInit* aInit,CPhoneGlobals* aPhoneGlobals);
|
|
35 |
|
|
36 |
private:
|
|
37 |
CATDialVoice(CATIO* aIo, CTelObject* aTelObject,CATInit* aInit,CPhoneGlobals* aPhoneGlobals);
|
|
38 |
|
|
39 |
// CATCommands inherited stuff
|
|
40 |
virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams);
|
|
41 |
virtual void Stop(TTsyReqHandle aTsyReqHandle);
|
|
42 |
virtual void EventSignal(TEventSource aSource);
|
|
43 |
virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus);
|
|
44 |
|
|
45 |
// Utility methods
|
|
46 |
TInt AddDialExpectStrings();
|
|
47 |
TInt ValidateDialExpectString();
|
|
48 |
void RemoveDialExpectStrings();
|
|
49 |
|
|
50 |
private:
|
|
51 |
CCommChatString* iCallMonitoringExpectString; // This object not owned by this class
|
|
52 |
CCommChatString* iCallEndExpectString; // This object not owned by this class
|
|
53 |
CCommChatString* iBusyExpectString; // This object not owned by this class
|
|
54 |
CCommChatString* iNoDialToneExpectString; // This object not owned by this class
|
|
55 |
CCommChatString* iNoAnswerExpectString; // This object not owned by this class
|
|
56 |
CCommChatString* iDelayedExpectString; // This object not owned by this class
|
|
57 |
TDesC* iTelnum;
|
|
58 |
enum {
|
|
59 |
EATNotInProgress,
|
|
60 |
EATInitialising,
|
|
61 |
EATSendDialCommand,
|
|
62 |
EATDialWaitForWriteComplete,
|
|
63 |
EATDialReadComplete,
|
|
64 |
EATTickleWaitForWriteComplete,
|
|
65 |
EATTickleReadComplete,
|
|
66 |
EATCancellingWaitForWriteComplete,
|
|
67 |
EATCancellingReadCompleted,
|
|
68 |
EDTRDropped,
|
|
69 |
EWaitForDTRRaiseSettle,
|
|
70 |
EATHangupWaitForWriteComplete,
|
|
71 |
EATHangupReadCompleted
|
|
72 |
} iState;
|
|
73 |
|
|
74 |
//
|
|
75 |
// The below TBuf class data are not strictly required, but they are used
|
|
76 |
// to help keep the memory usage of the TSY at a constant.
|
|
77 |
TBuf8<KCommsDbSvrMaxFieldLength> iCallEndString;
|
|
78 |
TBuf8<KCommsDbSvrMaxFieldLength> iBusyString;
|
|
79 |
TBuf8<KCommsDbSvrMaxFieldLength> iNoDialToneString;
|
|
80 |
TBuf8<KCommsDbSvrMaxFieldLength> iNoAnswerString;
|
|
81 |
};
|
|
82 |
|
|
83 |
|
|
84 |
class CATDialData : public CATDataCallConnectCommands
|
|
85 |
/**
|
|
86 |
Dial command specific to data call
|
|
87 |
@internalAll
|
|
88 |
*/
|
|
89 |
{
|
|
90 |
public:
|
|
91 |
static CATDialData* NewL(CATIO* aIo, CTelObject* aTelObject,CATInit* aInit,CPhoneGlobals* aPhoneGlobals);
|
|
92 |
|
|
93 |
private:
|
|
94 |
CATDialData(CATIO* aIo, CTelObject* aTelObject,CATInit* aInit,CPhoneGlobals* aPhoneGlobals);
|
|
95 |
|
|
96 |
// CATCommands inherited stuff
|
|
97 |
virtual void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams);
|
|
98 |
virtual void Stop(TTsyReqHandle aTsyReqHandle);
|
|
99 |
virtual void EventSignal(TEventSource aSource);
|
|
100 |
virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus);
|
|
101 |
|
|
102 |
// Utility functions
|
|
103 |
void AddDialExpectStringsL();
|
|
104 |
void ValidateDialExpectStringL();
|
|
105 |
void RemoveDialExpectStrings();
|
|
106 |
TBool SendBearerCapsCommand(TEventSource aSource);
|
|
107 |
void StartDialCommand(TEventSource aSource);
|
|
108 |
|
|
109 |
private:
|
|
110 |
CCommChatString* iBusyExpectString; // This object not owned by this class
|
|
111 |
CCommChatString* iSpeedExpectString; // This object not owned by this class
|
|
112 |
CCommChatString* iNoDialToneExpectString; // This object not owned by this class
|
|
113 |
CCommChatString* iNoAnswerExpectString; // This object not owned by this class
|
|
114 |
CCommChatString* iDelayedExpectString; // This object not owned by this class
|
|
115 |
TDesC* iTelnum;
|
|
116 |
enum {
|
|
117 |
EATNotInProgress,
|
|
118 |
EATInitialising,
|
|
119 |
EATBearerCapsWaitForWriteComplete,
|
|
120 |
EATBearerCapsReadComplete,
|
|
121 |
EATDialWaitForWriteComplete,
|
|
122 |
EATDialReadComplete,
|
|
123 |
EATSpeedReadComplete,
|
|
124 |
EATCancellingWaitForWriteComplete,
|
|
125 |
EATCancellingReadCompleted,
|
|
126 |
EDTRDropped,
|
|
127 |
EWaitForDTRRaiseSettle,
|
|
128 |
EATHangupWaitForWriteComplete,
|
|
129 |
EATHangupReadCompleted
|
|
130 |
} iState;
|
|
131 |
|
|
132 |
//
|
|
133 |
// The below TBuf class data are not strictly required, but they are used
|
|
134 |
// to help keep the memory usage of the TSY at a constant.
|
|
135 |
TBuf8<KCommsDbSvrMaxFieldLength> iBusyString;
|
|
136 |
TBuf8<KCommsDbSvrMaxFieldLength> iNoDialToneString;
|
|
137 |
TBuf8<KCommsDbSvrMaxFieldLength> iNoAnswerString;
|
|
138 |
};
|
|
139 |
|
|
140 |
|
|
141 |
#endif
|