|
1 /* |
|
2 * Copyright (c) 2009-2010 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: Create the call and emergency call to ETelMM |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSETUPCALLREQUESTHANDLER_H |
|
20 #define CSETUPCALLREQUESTHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "msatmultimodeapi.h" |
|
24 |
|
25 #include "csetupcallstatushandler.h" |
|
26 |
|
27 class CSetUpCallHandler; |
|
28 class MSatAsyncToSync; |
|
29 |
|
30 /** |
|
31 * This is the handler for the ETel MM api Request. |
|
32 * This active objects is registered with ETelMM Api to send request and |
|
33 * receive notifications about some Request Complete. |
|
34 * |
|
35 * @lib CallControlCmd |
|
36 * @since S60 v5.0.1 |
|
37 */ |
|
38 |
|
39 class CSetupCallRequestHandler : public CActive, |
|
40 public MSetupCallStatusObserver |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @param aPhone A reference to the MSatMultiModeApi. |
|
48 * @param aDispatcher Pointer to Ss handler |
|
49 * @return a pointer to the newly created object. |
|
50 */ |
|
51 static CSetupCallRequestHandler* NewL( MSatMultiModeApi& aPhone, |
|
52 CSetUpCallHandler* aDispatcher ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CSetupCallRequestHandler(); |
|
58 |
|
59 /** |
|
60 * Access RMobileCall::DialNoFdnCheck by MSatMultiModeApi |
|
61 * for the paramter information please see the etelmm.h |
|
62 */ |
|
63 void DialNumber( const TDesC8& aCallParams, const TDesC& aTelNumber, |
|
64 TBool aTerminateOtherCall, MSatAsyncToSync* aAsyncToSync ); |
|
65 |
|
66 /** |
|
67 * Access RMobileCall::DialEmergencyCall by MSatMultiModeApi |
|
68 * for the paramter information please see the etelmm.h |
|
69 */ |
|
70 void DialEmergencyCall( const TDesC& aTelNumber ); |
|
71 |
|
72 /** |
|
73 * Cancel the asynchronous operations that required to the ETel MM api |
|
74 */ |
|
75 void CancelOperation(); |
|
76 |
|
77 /** |
|
78 * From MSetupCallStatusObserver |
|
79 * The call status update notification from ETel MM |
|
80 */ |
|
81 void CallSatatusChanged( const TInt status ); |
|
82 |
|
83 protected: |
|
84 |
|
85 /** |
|
86 * From CActive, handles the request completion. |
|
87 */ |
|
88 void RunL(); |
|
89 |
|
90 |
|
91 /** |
|
92 * From CActive, handle the request cancel |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * C++ default constructor. |
|
100 * @param aPriority An active object priority value. |
|
101 * @param aPhone A reference to MSatMultiModeApi. |
|
102 */ |
|
103 CSetupCallRequestHandler( MSatMultiModeApi& aPhone, |
|
104 CSetUpCallHandler* aDispatcher ); |
|
105 |
|
106 /** |
|
107 * Two phase contruction. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 private: //new method |
|
112 |
|
113 void HandleSetupCallStatusChange(); |
|
114 |
|
115 private: // Data |
|
116 |
|
117 /** |
|
118 * Reference to the MSatMultiModeApi |
|
119 */ |
|
120 MSatMultiModeApi& iPhone; |
|
121 |
|
122 /** |
|
123 * Pointer to SendSs command handler |
|
124 */ |
|
125 CSetUpCallHandler* iDispatcher; |
|
126 |
|
127 /** |
|
128 * Use to monite the status of call |
|
129 * Own |
|
130 */ |
|
131 CSetupCallStatusHandler *iStatusHandler; |
|
132 |
|
133 /** |
|
134 * Current call is an emergency call. |
|
135 */ |
|
136 TBool iEmergencyCall; |
|
137 |
|
138 /** |
|
139 * Terminal response to the SIM has been send |
|
140 */ |
|
141 TBool iResponsed; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // CSETUPCALLREQUESTHANDLER_H |