|
1 /* |
|
2 * Copyright (c) 2002-2004 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: This file contains the header file of the CPEClientEmergencyCallMonitor class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPECLIENTEMERGENCYCALLMONITOR_H |
|
19 #define CPECLIENTEMERGENCYCALLMONITOR_H |
|
20 |
|
21 //INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <CPhCltEmergencyCall.h> |
|
24 #include <mphcltdialemergencyrequestobserver.h> |
|
25 #include "mpeclientcallrequestmonitor.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RTASecuritySession; |
|
29 class CPEMessageHandler; |
|
30 class MPEPhoneModelInternal; |
|
31 class CPhCltCallNotify; |
|
32 class CPhCltDialData; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Monitor Emergency call requests from the phone server(/phone client). |
|
38 * |
|
39 * |
|
40 * @lib PhoneEngine.lib |
|
41 * @since S60_5.0 |
|
42 */ |
|
43 NONSHARABLE_CLASS( CPEClientEmergencyCallMonitor ) |
|
44 : public CBase, |
|
45 public MPEClientCallRequestMonitor, |
|
46 public MPhCltDialEmergencyRequestObserver |
|
47 { |
|
48 public: //Constructors and destructor |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * @param aModel Used to send client dial message to phone application. |
|
52 * @param aEngineInfo To where phone number is saved. |
|
53 * @param aPhoneServer Gived to RPhCltCallNotify in Open call. |
|
54 */ |
|
55 static CPEClientEmergencyCallMonitor* NewL( |
|
56 MPEPhoneModelInternal& aModel, |
|
57 CPhCltCallNotify& ACallNotifier ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CPEClientEmergencyCallMonitor(); |
|
63 |
|
64 public: //From MPEClientCallMonitor |
|
65 /** |
|
66 * Gets dial data |
|
67 * @return Reference to TPhCltTelephoneNumber, telephony number. |
|
68 */ |
|
69 CPhCltDialData* ClientDialData(); |
|
70 |
|
71 /** |
|
72 * Sends respond to the phone client |
|
73 * @param aRespond contains respond to the phone client. |
|
74 */ |
|
75 void SendRespond( const TInt aRespond ); |
|
76 |
|
77 public: |
|
78 /** |
|
79 * Emergency dial request observer |
|
80 */ |
|
81 void EmergencyDialRequest(); |
|
82 |
|
83 public: //New functions |
|
84 /** |
|
85 * Starts monitoring phone client. |
|
86 */ |
|
87 void StartMonitoring( ); |
|
88 |
|
89 /** |
|
90 * Cancels asyncronous request(s). |
|
91 */ |
|
92 void Cancel(); |
|
93 |
|
94 /** |
|
95 * Tells whether this monitor is active. |
|
96 */ |
|
97 TBool IsActive(); |
|
98 |
|
99 |
|
100 public: |
|
101 |
|
102 /** |
|
103 * Informs object that asyncronous request is ready. |
|
104 */ |
|
105 void DialEmergencyRequest(); |
|
106 |
|
107 private: |
|
108 /** |
|
109 * C++ default constructor. |
|
110 * @param aModel Used to send client dial message to phone application. |
|
111 * @param aEngineInfo To where phone number is saved. |
|
112 */ |
|
113 CPEClientEmergencyCallMonitor( MPEPhoneModelInternal& aModel, |
|
114 CPhCltCallNotify& aCallNotifier ); |
|
115 |
|
116 /** |
|
117 * By default Symbian 2nd phase constructor is private. |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 private: //Data |
|
122 // MPEPhoneModelInternal is used to send message to the phone application |
|
123 MPEPhoneModelInternal& iModel; |
|
124 // Notifies call request from the client/server interface. |
|
125 CPhCltCallNotify& iCallNotifier; |
|
126 // Client originated call (on/off) |
|
127 TBool iClientOriginatedCall; |
|
128 //Emergency number. |
|
129 TBuf<KPhCltEmergencyNumberSize> iEmergencyNumber; |
|
130 // Monitoring flag |
|
131 TBool iMonitoring; |
|
132 }; |
|
133 |
|
134 #endif // CPECLIENTEMERGENCYCALLMONITOR_H |
|
135 |
|
136 // End of File |