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: CPhCltCallNotify observer getting notifications about call requests |
|
15 * from Phone Server. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CPHCLTCALLNOTIFY_H |
|
20 #define CPHCLTCALLNOTIFY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <phclttypes.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RPhCltServer; |
|
29 class CPhCltDialData; |
|
30 class MPhCltDialRequestObserver; |
|
31 class MPhCltDialEmergencyRequestObserver; |
|
32 class CPhCltExtPhoneDialData; |
|
33 class RPhCltCallNotify; |
|
34 class MPhCltComHandRequestObserver; |
|
35 class CPhCltDialRequestMonitor; |
|
36 class CPhCltDialEmergencyRequestMonitor; |
|
37 class CPhCltComHandRequestMonitor; |
|
38 |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * CCallNotify observer getting notifications about call requests |
|
44 * from Phone Server. |
|
45 * |
|
46 * @lib phoneclient.lib |
|
47 * @since 1.0 |
|
48 */ |
|
49 class CPhCltCallNotify : public CBase |
|
50 { |
|
51 public: // Constructors and destructors. |
|
52 |
|
53 |
|
54 IMPORT_C static CPhCltCallNotify* NewL(); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 IMPORT_C virtual ~CPhCltCallNotify(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Open subsession to server. |
|
65 * |
|
66 * @param aServer Pre-opened server session. |
|
67 * @return Symbian OS error code of the success of the opening. |
|
68 */ |
|
69 IMPORT_C TInt Open( RPhCltServer& aServer ); |
|
70 |
|
71 /** |
|
72 * Close subsession. |
|
73 */ |
|
74 IMPORT_C void Close(); |
|
75 |
|
76 /** |
|
77 * Notify dial requests through given observer. |
|
78 * @param aObserver dial request observer |
|
79 */ |
|
80 IMPORT_C void NotifyDialRequest( |
|
81 MPhCltDialRequestObserver* aObserver ); |
|
82 |
|
83 /** |
|
84 * Cancel pending call attempt notification. |
|
85 */ |
|
86 IMPORT_C void CancelNotifyDialRequest(); |
|
87 |
|
88 /** |
|
89 * Respond to client request to make a call |
|
90 * |
|
91 * @param aResultCode Result of the response. |
|
92 */ |
|
93 IMPORT_C TInt RespondClient( const TInt aResultCode ); |
|
94 |
|
95 /** |
|
96 * Notifies when a emergency call request arrives. |
|
97 * |
|
98 * @param aStatus Status to be changed when call request have arrived. |
|
99 */ |
|
100 IMPORT_C void NotifyEmergencyCall( |
|
101 MPhCltDialEmergencyRequestObserver* aObserver, |
|
102 TDesC& aEmergencyNumber ); |
|
103 |
|
104 /** |
|
105 * Cancel pending emergency call attempt notification. |
|
106 */ |
|
107 IMPORT_C void CancelNotifyEmergencyCall() const; |
|
108 |
|
109 /** |
|
110 * Respond to client request to make emergency call |
|
111 * |
|
112 * @param aResultCode Result of the response. |
|
113 */ |
|
114 IMPORT_C TInt RespondEmergencyToClient( const TInt aResultCode ); |
|
115 |
|
116 /** |
|
117 * Notifies when a Command handler request arrives. |
|
118 * |
|
119 * @param aStatus Status to be changed when command handler request |
|
120 * has arrived. |
|
121 * @param aCommandArgs Command argument storage place. |
|
122 * That is, packaged version of class |
|
123 * TPhCltComHandCommandParameters. |
|
124 */ |
|
125 IMPORT_C void NotifyComHandCommand( |
|
126 MPhCltComHandRequestObserver* aObserver, |
|
127 TDes8& aCommandArgs ); |
|
128 |
|
129 /** |
|
130 * Cancel pending command handler request notification. |
|
131 */ |
|
132 IMPORT_C void CancelNotifyComHandCommand() const; |
|
133 |
|
134 /** |
|
135 * Respond to client's command handler request. |
|
136 * |
|
137 * @param aResultCode Result of the response |
|
138 * (previous function execution). |
|
139 * @return KErrNone if respond succeeded, otherwise Symbian error code. |
|
140 */ |
|
141 IMPORT_C TInt RespondComHandClient( const TInt aResultCode ); |
|
142 |
|
143 |
|
144 private: |
|
145 |
|
146 /* |
|
147 * Constructor. |
|
148 */ |
|
149 CPhCltCallNotify(); |
|
150 |
|
151 /** |
|
152 * Memory allocations in ConstructL. |
|
153 */ |
|
154 void ConstructL(); |
|
155 |
|
156 private: |
|
157 |
|
158 //RClass instance |
|
159 RPhCltCallNotify* iCallNotify; |
|
160 |
|
161 CPhCltDialRequestMonitor* iDialMonitor; |
|
162 CPhCltDialEmergencyRequestMonitor* iDialEmergencyMonitor; |
|
163 CPhCltComHandRequestMonitor* iComHandMonitor; |
|
164 }; |
|
165 |
|
166 |
|
167 #endif // CPHCLTCALLNOTIFY_H |
|
168 |
|
169 // End of File |
|