|
1 /* |
|
2 * Copyright (c) 2007 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: Implements CSPVoiceCall for CS Call Plug-in |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSPVOICECALL_H |
|
20 #define CSPVOICECALL_H |
|
21 |
|
22 |
|
23 #include <mccpemergencycall.h> // For MCCPEmergencyCall |
|
24 |
|
25 #include "cspcall.h" // For CSPCall |
|
26 |
|
27 |
|
28 class MCCPForwardProvider; |
|
29 class MCCPObserver; |
|
30 class RMobileCall; |
|
31 class CSPEtelCallStatusMonitor; |
|
32 class CSPEtelCallEventMonitor; |
|
33 class CSPEtelCallWaitingRequester; |
|
34 |
|
35 /** |
|
36 * Call class for CS Call Plug-in. Implements the API defined by CCP in classes |
|
37 * MCCPCall and MCCPCSCall |
|
38 * |
|
39 * @lib csplugin.dll |
|
40 */ |
|
41 class CSPVoiceCall : public CSPCall, |
|
42 public MCCPEmergencyCall |
|
43 { |
|
44 |
|
45 public: |
|
46 /* |
|
47 * Creates a new CSPVoiceCall object for MO or MT call. |
|
48 * @param aName dialled number (MO) or call name (MT) |
|
49 * @param aLine line for opening the call |
|
50 * @param aMobileOriginated direction of call |
|
51 * @param aParams call parameters |
|
52 * @param aCommonInfo common info interface |
|
53 * @param aIsEmergency is emergency call |
|
54 * @return pointer to created call object |
|
55 */ |
|
56 static CSPVoiceCall* NewL( const TDesC& aName, |
|
57 RMobileLine& aLine, |
|
58 TBool aMobileOriginated, |
|
59 const CCCECallParameters& aParams, |
|
60 MCSPCommonInfo& aCommonInfo, |
|
61 TBool aIsEmergency ); |
|
62 |
|
63 /** |
|
64 * C++ default destructor |
|
65 */ |
|
66 virtual ~CSPVoiceCall(); |
|
67 |
|
68 /** |
|
69 * Goes one-to-one from conference. |
|
70 * @return system wide error code |
|
71 */ |
|
72 TInt GoOneToOne(); |
|
73 |
|
74 // from base class CSPCall |
|
75 |
|
76 /** |
|
77 * From MCCPCSCall |
|
78 * Switch in the alternating call mode of an alternating call |
|
79 * @return system wide error code |
|
80 */ |
|
81 TInt SwitchAlternatingCall(); |
|
82 |
|
83 /** |
|
84 * From MCCPCall |
|
85 * Answer call. |
|
86 * @return system wide error code |
|
87 */ |
|
88 TInt Answer(); |
|
89 |
|
90 /** |
|
91 * Ends an ongoing call. |
|
92 * @return KErrNone If request was started succesfully. |
|
93 * @return KErrAlreadyExists If call is already in idle state. |
|
94 */ |
|
95 TInt HangUp(); |
|
96 |
|
97 /** |
|
98 * From MCCPCall |
|
99 * Cancels the ongoing dial request |
|
100 * @return system wide error code |
|
101 */ |
|
102 TInt Cancel(); |
|
103 |
|
104 // from base class MCCPEmergencyCall |
|
105 |
|
106 /** |
|
107 * Dials an emergency call. |
|
108 * @param aRecipient Emergency call address suggested to be used. |
|
109 * Can be given also in CConvergedCallProvider::NewEmergencyCallL. |
|
110 * Plug-in will use given address and/or its own known one. |
|
111 * Preferred address usage order: |
|
112 * 1) Plug-in own emergency address |
|
113 * 2) Address given in Dial |
|
114 * 3) Address given in CConvergedCallProvider::NewEmergencyCallL. |
|
115 * @return KErrNone if request was started succesfully. |
|
116 * @return KErrNotReady If call is not in idle state. |
|
117 * @return KErrNotSupported Emergency call is not supported. |
|
118 */ |
|
119 TInt Dial( const TDesC& aEmergencyNumber); |
|
120 |
|
121 protected: |
|
122 |
|
123 /* |
|
124 * Voice call constructor. |
|
125 * @param aLine open line ready for use |
|
126 * @param aServiceId service ID |
|
127 * @param aCallType type of call (voice/video/data/fax) |
|
128 * @param aLineType primary/aux line type |
|
129 * @param aMobileOriginated direction of call |
|
130 * @param aName remote party or call name depending on direction |
|
131 * @param aExtMoCall true in case of externally created MO call |
|
132 * @param aIsEmergency is emergency call flag |
|
133 * @param aBearer bearer capabilities for SAT |
|
134 * @param aSubAddress sub adrress for SAT |
|
135 * @param aOrigin call origin (i.e. SAT or Phone) |
|
136 */ |
|
137 CSPVoiceCall( RMobileLine& aLine, |
|
138 TBool aMobileOriginated, |
|
139 const TDesC& aName, |
|
140 MCSPCommonInfo& aCommonInfo, |
|
141 TBool aIsEmergency ); |
|
142 |
|
143 /* |
|
144 * Constructing 2nd phase. |
|
145 */ |
|
146 void ConstructL( const CCCECallParameters& aParams ); |
|
147 |
|
148 /** |
|
149 * Set default call parameters to be used in dial. |
|
150 */ |
|
151 void SetDefaultCallParameters(); |
|
152 |
|
153 /** |
|
154 * From CSPCall. |
|
155 * Starts dialing to recipient. |
|
156 * Bypasses FDN check according to aFdnCheck. |
|
157 * @param aFdnCheck True if FDN checking is used |
|
158 * @return system wide error code |
|
159 */ |
|
160 TInt DialFdnCond( TBool aFdnCheck ); |
|
161 |
|
162 protected: // Data |
|
163 |
|
164 /** |
|
165 * Call parametrs. |
|
166 */ |
|
167 RMobileCall::TMobileCallParamsV7 iCallParams; |
|
168 |
|
169 /** |
|
170 * Package of call paremeters. |
|
171 */ |
|
172 RMobileCall::TMobileCallParamsV7Pckg iCallParamsPckg; |
|
173 |
|
174 /** |
|
175 * Stores the emergency number. |
|
176 */ |
|
177 RMobileENStore::TEmergencyNumber iEmergencyNumber; |
|
178 |
|
179 friend class UT_CSPVoiceCall; |
|
180 |
|
181 }; |
|
182 |
|
183 |
|
184 #endif // CSPVOICECALL_H |