24
|
1 |
/**
|
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Header for NetDial ETel interface.
|
|
16 |
*
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
/**
|
|
23 |
@file Nd_etel.h
|
|
24 |
@internalComponent
|
|
25 |
*/
|
|
26 |
|
|
27 |
|
|
28 |
#ifndef __ND_ETEL_H__
|
|
29 |
#define __ND_ETEL_H__
|
|
30 |
|
|
31 |
#include <cdblen.h>
|
|
32 |
#include <etelmm.h>
|
|
33 |
|
|
34 |
// Forward declarations
|
|
35 |
|
|
36 |
class CCommsDbNetDialAccess;
|
|
37 |
|
|
38 |
class MNetDialEtelObserver
|
|
39 |
/**
|
|
40 |
MNetDialEtelObserver class is used by CTelServerProcessor to complete the request of the calling state.
|
|
41 |
|
|
42 |
@internalComponent
|
|
43 |
*/
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
virtual void TelFunctionComplete(TInt aError) =0;
|
|
47 |
};
|
|
48 |
|
|
49 |
class CTelServerProcessor : public CActive
|
|
50 |
/**
|
|
51 |
CTelServerProcessor, one of these per CNetDial object. Implements calls to ETEL.
|
|
52 |
|
|
53 |
@internalComponent
|
|
54 |
*/
|
|
55 |
{
|
|
56 |
private:
|
|
57 |
enum {
|
|
58 |
EIdle,
|
|
59 |
EDialUp,
|
|
60 |
EWait,
|
|
61 |
EHangUpDialOut,
|
|
62 |
EHangUpDialIn
|
|
63 |
#ifdef SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT
|
|
64 |
,EListenForStatusChange
|
|
65 |
#endif
|
|
66 |
} iState;
|
|
67 |
public:
|
|
68 |
static CTelServerProcessor* NewL(CCommsDbNetDialAccess* aDb, TInt aPriority =EPriorityStandard);
|
|
69 |
CTelServerProcessor(CCommsDbNetDialAccess* aDb, TInt aPriority);
|
|
70 |
~CTelServerProcessor();
|
|
71 |
void StartDialUpL(MNetDialEtelObserver& aObserver);
|
|
72 |
void StartReconnectL(MNetDialEtelObserver& aObserver);
|
|
73 |
#ifdef SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT
|
|
74 |
void ListenForStatusChange(MNetDialEtelObserver& aObserver);
|
|
75 |
#endif
|
|
76 |
void WaitForIncomingCallL(MNetDialEtelObserver& aObserver);
|
|
77 |
void StartHangUpAfterDialOut(MNetDialEtelObserver& aObserver);
|
|
78 |
void StartHangUpAfterDialIn(MNetDialEtelObserver& aObserver);
|
|
79 |
void GetCommPortL(RCall::TCommPort& aCommPort);
|
|
80 |
void ReturnCommPortL();
|
|
81 |
void CloseCall();
|
|
82 |
TBool CommPortLoaned() const;
|
|
83 |
TBool CallActive() const;
|
|
84 |
private:
|
|
85 |
void ConstructL();
|
|
86 |
void OpenNewCallL();
|
|
87 |
void GetPhoneInfoL(RTelServer::TPhoneInfo& aInfo);
|
|
88 |
void GetLineInfoL(RPhone::TLineInfo& aInfo,const TDesC& aPhoneName, TUint aLineType);
|
|
89 |
void SetMmParametersL();
|
|
90 |
void DialL();
|
|
91 |
#ifdef SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT
|
|
92 |
void HandleStatusChange();
|
|
93 |
void CancelListenForStatusChange();
|
|
94 |
#endif
|
|
95 |
void StartHangUp();
|
|
96 |
static void DialUpCompleted(TAny* aPtr,TInt aStatus);
|
|
97 |
static void HangUpCompleted(TAny* aPtr,TInt aStatus);
|
|
98 |
// from CActive
|
|
99 |
virtual void DoCancel();
|
|
100 |
virtual void RunL();
|
|
101 |
//
|
|
102 |
TBool RepeatDialL();
|
|
103 |
void Assertions();
|
|
104 |
RCall& ActiveCall();
|
|
105 |
private:
|
|
106 |
enum {
|
|
107 |
EUnknown =0,
|
|
108 |
ECoreCallOnly,
|
|
109 |
EMmDataCall,
|
|
110 |
EMmHscsdCall
|
|
111 |
|
|
112 |
} iCallType;
|
|
113 |
|
|
114 |
CCommsDbNetDialAccess* iDb;
|
|
115 |
RTelServer iTelServer;
|
|
116 |
// Core call
|
|
117 |
RCall iCall;
|
|
118 |
RCall::TCallParams iCallParams;
|
|
119 |
RCall::TCallParamsPckg iCallParamsPckg;
|
|
120 |
#ifdef SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT
|
|
121 |
RCall::TStatus iCallStatus;
|
|
122 |
#endif
|
|
123 |
|
|
124 |
// MM API phone object
|
|
125 |
RMobilePhone iMmPhone;
|
|
126 |
// MM API call object
|
|
127 |
RMobileCall iMmCall;
|
|
128 |
// MM API call parameters
|
|
129 |
RMobileCall::TMobileCallParamsV1 iMmCallParams;
|
|
130 |
RMobileCall::TMobileCallParamsV1Pckg iMmCallParamsPckg;
|
|
131 |
// MM API data call parameters
|
|
132 |
RMobileCall::TMobileDataCallParamsV1 iMmDataCallParams;
|
|
133 |
RMobileCall::TMobileDataCallParamsV1Pckg iMmDataCallParamsPckg;
|
|
134 |
// MM API hscsd call parameters
|
|
135 |
RMobileCall::TMobileHscsdCallParamsV1 iMmHscsdParams;
|
|
136 |
RMobileCall::TMobileHscsdCallParamsV1Pckg iMmHscsdParamsPckg;
|
|
137 |
|
|
138 |
TBool iTsyLoaded;
|
|
139 |
TDialString iTelNum;
|
|
140 |
MNetDialEtelObserver* iCurrentObserver;
|
|
141 |
TBool iLoaned;
|
|
142 |
TBool iCallOpen;
|
|
143 |
TUint32 iDialCounter;
|
|
144 |
TBuf<KCommsDbSvrMaxFieldLength> iTsyName;
|
|
145 |
TUint32 iMaxDialAttempts;
|
|
146 |
};
|
|
147 |
|
|
148 |
#endif
|