|
1 // Copyright (c) 2006-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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef BTPOWERCONTROL_H |
|
23 #define BTPOWERCONTROL_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <bluetooth/hci/hcitypes.h> |
|
27 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <bluetooth/btpowercontrolmessages.h> |
|
29 #endif |
|
30 |
|
31 class RHCIServerSession; |
|
32 |
|
33 NONSHARABLE_CLASS(RBTPowerControl) |
|
34 /** API used for managing the power state of the controller |
|
35 |
|
36 */ |
|
37 { |
|
38 public: |
|
39 IMPORT_C RBTPowerControl(); |
|
40 |
|
41 IMPORT_C TInt Open(); |
|
42 IMPORT_C void Close(); |
|
43 |
|
44 IMPORT_C void SetPower(TBTPowerState aState, TDes8* aDesc, TRequestStatus &aStatus); |
|
45 IMPORT_C TInt GetPower(TBTPowerState& aState, TDes8* aDesc); |
|
46 IMPORT_C void Cancel(); |
|
47 |
|
48 private: |
|
49 RHCIServerSession* iHCIServerSession; |
|
50 TUint32 iReserved; // Padding for possible future "per-copy" state. |
|
51 }; |
|
52 |
|
53 _LIT(KBTPowerControlPanic, "BTPwrCtrlClient"); |
|
54 enum TBTPowerControlPanic |
|
55 { |
|
56 EApiUsedWhenHandleIsNotOpen = 0, |
|
57 EHandleIsAlreadyOpen = 1, |
|
58 }; |
|
59 |
|
60 #endif // BTPOWERCONTROL_H |