|
1 /* |
|
2 * Copyright (c) 2002 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: CPhCltDialEmergencyRequestMonitor observer getting notifications about call requests |
|
15 * from Phone Server. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CPHCLTDIALEMERGENCYREQUESTMONITOR_H |
|
20 #define CPHCLTDIALEMERGENCYREQUESTMONITOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <PhCltTypes.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RPhCltServer; |
|
29 class RPhCltCallNotify; |
|
30 class MPhCltDialEmergencyRequestObserver; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * CCallNotify observer getting notifications about call requests |
|
37 * from Phone Server. |
|
38 * |
|
39 * @lib phoneclient.lib |
|
40 * @since 1.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CPhCltDialEmergencyRequestMonitor ): public CActive |
|
43 { |
|
44 public: // Constructors and destructors. |
|
45 |
|
46 |
|
47 static CPhCltDialEmergencyRequestMonitor* NewL(RPhCltCallNotify& aCltNotify); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CPhCltDialEmergencyRequestMonitor(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 |
|
57 /** |
|
58 * Notifies when a emergency call request arrives. |
|
59 * |
|
60 * @param aStatus Status to be changed when call request have arrived. |
|
61 */ |
|
62 void NotifyEmergencyCall( |
|
63 MPhCltDialEmergencyRequestObserver* aObserver, |
|
64 TDesC& aEmergencyNumber ); |
|
65 |
|
66 |
|
67 /** |
|
68 * Respond to client request to make emergency call |
|
69 * |
|
70 * @param aResultCode Result of the response. |
|
71 */ |
|
72 TInt RespondEmergencyToClient( const TInt aResultCode ); |
|
73 |
|
74 |
|
75 private: |
|
76 |
|
77 /* |
|
78 * Constructor. |
|
79 */ |
|
80 CPhCltDialEmergencyRequestMonitor(RPhCltCallNotify& aCallNotify); |
|
81 |
|
82 |
|
83 private: // Functions from base classes |
|
84 |
|
85 /** |
|
86 * From CActive. |
|
87 * Called when send request is completed. |
|
88 */ |
|
89 void RunL(); |
|
90 |
|
91 /** |
|
92 * From CActive. |
|
93 * Called when RunL leaves. |
|
94 */ |
|
95 TInt RunError(TInt aError); |
|
96 |
|
97 /** |
|
98 * From CActive. |
|
99 * Called when active request is canceled. |
|
100 */ |
|
101 void DoCancel(); |
|
102 |
|
103 private: |
|
104 |
|
105 //RClass instance |
|
106 RPhCltCallNotify& iCallNotify; |
|
107 |
|
108 //Pointer to emergencynumber |
|
109 TPtr8 iEmergencyCallNumberPtr; |
|
110 |
|
111 // Pointer to dial observer |
|
112 MPhCltDialEmergencyRequestObserver* iObserver; |
|
113 |
|
114 }; |
|
115 |
|
116 |
|
117 #endif // CPHCLTDIALEMERGENCYREQUESTMONITOR_H |
|
118 |
|
119 // End of File |