|
1 // |
|
2 /* |
|
3 * ============================================================================== |
|
4 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 * All rights reserved. |
|
6 * This component and the accompanying materials are made available |
|
7 * under the terms of "Eclipse Public License v1.0" |
|
8 * which accompanies this distribution, and is available |
|
9 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 * |
|
11 * Initial Contributors: |
|
12 * Nokia Corporation - initial contribution. |
|
13 * |
|
14 * Contributors: |
|
15 * |
|
16 * Description: |
|
17 * |
|
18 * ============================================================================== |
|
19 */ |
|
20 |
|
21 #ifndef BTCTRLDCMOADAPTER_H |
|
22 #define BTCTRLDCMOADAPTER_H |
|
23 |
|
24 #include <dcmointerface.h> |
|
25 #include <dcmoconst.h> |
|
26 |
|
27 |
|
28 // An implementation of the CDCMOInterface definition |
|
29 class CBluetoothCtrlDcmoAdapter : public CDCMOInterface |
|
30 { |
|
31 public: |
|
32 // Standardised safe construction which leaves nothing the cleanup stack. |
|
33 static CBluetoothCtrlDcmoAdapter* NewL(TAny* aInitParams); |
|
34 |
|
35 // Destructor |
|
36 ~CBluetoothCtrlDcmoAdapter(); |
|
37 |
|
38 private: |
|
39 // Implementation of CDCMOInterface |
|
40 virtual TDCMOStatus GetDCMOPluginIntAttributeValueL(TDCMONode aId, TInt& aValue); |
|
41 virtual TDCMOStatus GetDCMOPluginStrAttributeValueL(TDCMONode aId, TDes& aStrValue); |
|
42 virtual TDCMOStatus SetDCMOPluginIntAttributeValueL(TDCMONode aId, TInt aValue); |
|
43 virtual TDCMOStatus SetDCMOPluginStrAttributeValueL(TDCMONode aId, const TDes& aStrValue); |
|
44 virtual void GetLocalizedNameL( HBufC*& aLocName ); |
|
45 |
|
46 private: |
|
47 |
|
48 enum TBluetoothDcmoPanic |
|
49 { |
|
50 EPropertyBufferTooSmall = 0, |
|
51 EDescriptionBufferTooSmall = 1 |
|
52 }; |
|
53 |
|
54 // Construction |
|
55 CBluetoothCtrlDcmoAdapter(TAny* aInitParams); |
|
56 static TDCMOStatus MapFeatureControlError(TInt aErrorCode); |
|
57 static void Panic(TBluetoothDcmoPanic aPanic); |
|
58 |
|
59 private: |
|
60 // Parameters taken from client |
|
61 CDCMOInterface::TDCMOInterfaceInitParams* iInitParams; |
|
62 }; |
|
63 |
|
64 #endif // BTCTRLDCMOADAPTER_H |