|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "emergencycallrfadaptationref.h" |
|
17 |
|
18 /** |
|
19 Function to create new Emergency Call RF Adaptation Plugin. |
|
20 |
|
21 @return new instance of MEmergencyCallRfAdaptation for Emergency Call RF Adaptations. |
|
22 |
|
23 @internalComponent |
|
24 @released |
|
25 */ |
|
26 EXPORT_C MEmergencyCallRfAdaptation* CreateEmergencyCallRfAdaptationRefL() |
|
27 { |
|
28 CEmergencyCallRfAdaptationRef* emergencyCallRfAdaptation = CEmergencyCallRfAdaptationRef::NewL(); |
|
29 return (static_cast<MEmergencyCallRfAdaptation*> (emergencyCallRfAdaptation)); |
|
30 } |
|
31 |
|
32 CEmergencyCallRfAdaptationRef* CEmergencyCallRfAdaptationRef::NewL() |
|
33 { |
|
34 CEmergencyCallRfAdaptationRef* self = new(ELeave) CEmergencyCallRfAdaptationRef; |
|
35 return self; |
|
36 } |
|
37 |
|
38 CEmergencyCallRfAdaptationRef::~CEmergencyCallRfAdaptationRef() |
|
39 { |
|
40 } |
|
41 |
|
42 CEmergencyCallRfAdaptationRef::CEmergencyCallRfAdaptationRef() |
|
43 { |
|
44 } |
|
45 |
|
46 /** |
|
47 Deletes and frees memory allocated. |
|
48 */ |
|
49 void CEmergencyCallRfAdaptationRef::Release() |
|
50 { |
|
51 delete this; |
|
52 } |
|
53 |
|
54 /** |
|
55 Request RF activation so that an emergency call can be made. |
|
56 Reference implementation completes the request with KErrNone as support for RF activation is not available on Techview/H4 hrp. |
|
57 |
|
58 @param aStatus to complete when the operation has finished |
|
59 @see TRequestStatus |
|
60 */ |
|
61 void CEmergencyCallRfAdaptationRef::ActivateRfForEmergencyCall(TRequestStatus& aStatus) |
|
62 { |
|
63 aStatus = KRequestPending; |
|
64 TRequestStatus* status = &aStatus; |
|
65 User::RequestComplete(status, KErrNone); |
|
66 } |
|
67 |
|
68 /** |
|
69 Request RF deactivation after an emergency call have been made. |
|
70 Reference implementation completes the request with KErrNone as support for RF deactivation is not available on Techview/H4 hrp. |
|
71 |
|
72 @param aStatus to complete when the operation has finished |
|
73 @see TRequestStatus |
|
74 */ |
|
75 void CEmergencyCallRfAdaptationRef::DeactivateRfForEmergencyCall(TRequestStatus& aStatus) |
|
76 { |
|
77 aStatus = KRequestPending; |
|
78 TRequestStatus* status = &aStatus; |
|
79 User::RequestComplete(status, KErrNone); |
|
80 } |
|
81 |
|
82 /** |
|
83 Cancel the outstanding request. Reference implementation completes the requests immediately so there is nothing to cancel. |
|
84 On a device, Cancel() needs an implementation as the Request might be outstanding and it needs to be cancelled. |
|
85 */ |
|
86 void CEmergencyCallRfAdaptationRef::Cancel() |
|
87 { |
|
88 } |