|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Call Notify |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // Include Files |
|
21 #include "RPhCltCallNotify.h" |
|
22 #include "RPhCltServer.h" |
|
23 |
|
24 |
|
25 // ============================= LOCAL FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // Stub function to complete an asynchronous request |
|
29 // |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 static void CompleteRequest( TRequestStatus& aStatus, TInt aCompletionCode ) |
|
33 { |
|
34 TRequestStatus* status = &aStatus; |
|
35 User::RequestComplete( status, aCompletionCode ); |
|
36 } |
|
37 |
|
38 |
|
39 // ============================ MEMBER FUNCTIONS =============================== |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // RPhCltCallNotify::RPhCltCallNotify |
|
43 // C++ constructor can NOT contain any code, that |
|
44 // might leave. |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 EXPORT_C RPhCltCallNotify::RPhCltCallNotify() |
|
48 : RSubSessionBase() |
|
49 { |
|
50 } |
|
51 |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // RPhCltCallNotify::Open |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 EXPORT_C TInt RPhCltCallNotify::Open( RPhCltServer& aServer ) |
|
58 { |
|
59 return CreateSubSession( |
|
60 aServer, |
|
61 EPhoneServerNotifySubSessionOpen, |
|
62 TIpcArgs() ); |
|
63 } |
|
64 |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // RPhCltCallNotify::Close |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 EXPORT_C void RPhCltCallNotify::Close() |
|
71 { |
|
72 CloseSubSession( EPhoneServerNotifySubSessionClose ); |
|
73 } |
|
74 |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // RPhCltCallNotify::NotifyCallAttempt |
|
78 // |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 EXPORT_C void RPhCltCallNotify::NotifyCallAttempt( |
|
82 TRequestStatus& aStatus, |
|
83 TDes8& aCallArgs ) |
|
84 { |
|
85 SendReceive( |
|
86 EPhoneServerNotifySubSessionNotifyCallRequest, |
|
87 TIpcArgs( &aCallArgs ), |
|
88 aStatus ); |
|
89 } |
|
90 |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // RPhCltCallNotify::CancelNotifyCallAttempt |
|
94 // |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 EXPORT_C void RPhCltCallNotify::CancelNotifyCallAttempt() const |
|
98 { |
|
99 SendReceive( |
|
100 EPhoneServerNotifySubSessionNotifyCallRequestCancel, |
|
101 TIpcArgs() ); |
|
102 } |
|
103 |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // RPhCltCallNotify::NotifyPhoneStatusRequest |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 EXPORT_C void RPhCltCallNotify::NotifyPhoneStatusRequest( |
|
110 TRequestStatus& aStatus ) |
|
111 { |
|
112 // Stub |
|
113 __ASSERT_DEBUG( EFalse, User::Invariant() ); |
|
114 CompleteRequest( aStatus, KErrNone ); |
|
115 } |
|
116 |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // RPhCltCallNotify::CancelNotifyPhoneStatusRequest |
|
120 // |
|
121 // NOT SUPPORTED. |
|
122 // ----------------------------------------------------------------------------- |
|
123 // |
|
124 EXPORT_C void RPhCltCallNotify::CancelNotifyPhoneStatusRequest() const |
|
125 { |
|
126 // Stub, don't call |
|
127 __ASSERT_DEBUG( EFalse, User::Invariant() ); |
|
128 } |
|
129 |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // RPhCltCallNotify::ReportPhoneStatus |
|
133 // |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 EXPORT_C void RPhCltCallNotify::ReportPhoneStatus( |
|
137 TRequestStatus& aStatus, |
|
138 const TInt aPhoneStatus ) |
|
139 { |
|
140 // Stub |
|
141 __ASSERT_DEBUG( EFalse, User::Invariant() ); |
|
142 CompleteRequest( aStatus, aPhoneStatus ); |
|
143 } |
|
144 |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // RPhCltCallNotify::CancelReportPhoneStatus |
|
148 // |
|
149 // NOT SUPPORTED. |
|
150 // ----------------------------------------------------------------------------- |
|
151 // |
|
152 EXPORT_C void RPhCltCallNotify::CancelReportPhoneStatus() const |
|
153 { |
|
154 // Stub, don't call |
|
155 __ASSERT_DEBUG( EFalse, User::Invariant() ); |
|
156 } |
|
157 |
|
158 |
|
159 // ----------------------------------------------------------------------------- |
|
160 // RPhCltCallNotify::RespondClient |
|
161 // |
|
162 // ----------------------------------------------------------------------------- |
|
163 // |
|
164 EXPORT_C TInt RPhCltCallNotify::RespondClient( const TInt aResultCode ) |
|
165 { |
|
166 return Send( |
|
167 EPhoneServerNotifySubSessionReportCallResult, |
|
168 TIpcArgs( aResultCode ) ); |
|
169 } |
|
170 |
|
171 // End of File |