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