|
1 /* |
|
2 * Copyright (c) 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: Extended Phone RemCon Handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "btmchandlerapi.h" |
|
20 #include "btmcprotocol.h" |
|
21 #include "debug.h" |
|
22 |
|
23 EXPORT_C CBtmcHandlerApi* CBtmcHandlerApi::NewL( |
|
24 MBtmcObserver& aObserver, TBtmcProfileId aProfile, const TDesC8& aBTDevAddr, TBool aAccessoryInitiated) |
|
25 { |
|
26 CBtmcHandlerApi* self=new (ELeave) CBtmcHandlerApi(); |
|
27 CleanupStack::PushL(self); |
|
28 self->ConstructL(aObserver, aProfile, aBTDevAddr, aAccessoryInitiated); |
|
29 CleanupStack::Pop(self); |
|
30 return self; |
|
31 } |
|
32 |
|
33 EXPORT_C CBtmcHandlerApi::~CBtmcHandlerApi() |
|
34 { |
|
35 TRACE_FUNC_ENTRY |
|
36 delete iHandler; |
|
37 TRACE_FUNC_EXIT |
|
38 } |
|
39 |
|
40 EXPORT_C void CBtmcHandlerApi::HandleProtocolDataL(const TDesC8& aData) |
|
41 { |
|
42 TRACE_FUNC_ENTRY |
|
43 iHandler->NewProtocolDataL(aData); |
|
44 TRACE_FUNC_EXIT |
|
45 } |
|
46 |
|
47 EXPORT_C void CBtmcHandlerApi::HandleNrecCompletedL(TInt aErr) |
|
48 { |
|
49 iHandler->HandleNrecCompletedL(aErr); |
|
50 } |
|
51 |
|
52 EXPORT_C void CBtmcHandlerApi::ActivateRemoteVolumeControl() |
|
53 { |
|
54 iHandler->ActivateRemoteVolumeControl(); |
|
55 } |
|
56 |
|
57 EXPORT_C void CBtmcHandlerApi::DeActivateRemoteVolumeControl() |
|
58 { |
|
59 iHandler->DeActivateRemoteVolumeControl(); |
|
60 } |
|
61 |
|
62 EXPORT_C TInt CBtmcHandlerApi::GetRemoteSupportedFeature() |
|
63 { |
|
64 return iHandler->GetRemoteSupportedFeature(); |
|
65 } |
|
66 |
|
67 CBtmcHandlerApi::CBtmcHandlerApi() |
|
68 { |
|
69 } |
|
70 |
|
71 void CBtmcHandlerApi::ConstructL(MBtmcObserver& aObserver, TBtmcProfileId aProfile, const TDesC8& aBTDevAddr, TBool aAccessoryInitiated) |
|
72 { |
|
73 TRACE_FUNC_ENTRY |
|
74 iHandler = CBtmcProtocol::NewL(aObserver, aProfile, aBTDevAddr, aAccessoryInitiated); |
|
75 TRACE_FUNC_EXIT |
|
76 } |
|
77 |
|
78 // End of file |