1 /* |
|
2 * Copyright (c) 2009 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: BT power manager definition based on btpm.h. |
|
15 * This is needed for accessing the blue tooth power management |
|
16 * DLL directly to turn on the blue tooth in NCP environment, |
|
17 * since the NCP releases do not contain the required headers. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __HTIBTPOWERMANAGER_H |
|
23 #define __HTIBTPOWERMANAGER_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32std.h> |
|
27 #include <es_sock.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * The observer class that is interested in power mode change |
|
33 */ |
|
34 class MBTPowerManagerObserver |
|
35 { |
|
36 public: |
|
37 virtual void HandlePowerChange(TBool aNewState) = 0; |
|
38 }; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * This base class of BT power management |
|
44 */ |
|
45 class CBTPowerManagerBase : public CBase |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Get the current power state |
|
51 * @param aState Reference where the current power state to be saved to |
|
52 * @return KErrNone if successful otherwise one of the system wide error codes |
|
53 */ |
|
54 virtual TInt GetPowerState(TBool& aState) = 0; |
|
55 |
|
56 /** |
|
57 * Set the current power state |
|
58 * @param aState the current power state |
|
59 * @return KErrNone if successful otherwise one of the system wide error codes |
|
60 */ |
|
61 virtual TInt SetPowerState(TBool aState) = 0; |
|
62 |
|
63 /** |
|
64 * Notify observers that the power state has been changed |
|
65 */ |
|
66 virtual void NotifyPowerChange() = 0; |
|
67 |
|
68 /** |
|
69 * Notify observers that the power change has been cancelled |
|
70 */ |
|
71 virtual void NotifyPowerChangeCancel() = 0; |
|
72 |
|
73 /** |
|
74 * Set the device into test mode |
|
75 * @return KErrNone if successful otherwise one of the system wide error codes |
|
76 */ |
|
77 virtual TInt SetDUTMode() = 0; |
|
78 }; |
|
79 |
|
80 typedef CBTPowerManagerBase* (*TNewBTPowerManagerL)(MBTPowerManagerObserver* aObserver); |
|
81 |
|
82 #endif // __HTIBTPOWERMANAGER_H |
|
83 |
|
84 // End of File |
|