|
1 /* |
|
2 * Copyright (c) 2002 - 2008 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: Class which is resposible for handling communication with |
|
15 * Bt settings API |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef BTSETTINGS_H |
|
21 #define BTSETTINGS_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 #include <btengsettings.h> |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * CBtSettings |
|
31 */ |
|
32 NONSHARABLE_CLASS( CBtSettings ) : public CBase, |
|
33 public MBTEngSettingsObserver |
|
34 { |
|
35 public: |
|
36 // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 ~CBtSettings(); |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CBtSettings* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CBtSettings* NewLC(); |
|
52 |
|
53 TInt GetPowerState( TBTPowerStateValue& aState ); |
|
54 TInt SetPowerState( TBTPowerStateValue aState ); |
|
55 TInt GetVisibilityMode( TBTVisibilityMode& aMode ); |
|
56 TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime = 0 ); |
|
57 TInt GetLocalName( TDes& aName ); |
|
58 TInt SetLocalName( const TDes& aName ); |
|
59 |
|
60 |
|
61 private: |
|
62 |
|
63 // From MBTEngSettingsObserver |
|
64 void PowerStateChanged( TBTPowerStateValue aState ); |
|
65 void VisibilityModeChanged( TBTVisibilityMode aState ); |
|
66 |
|
67 /** |
|
68 * Constructor for performing 1st stage construction |
|
69 */ |
|
70 CBtSettings(); |
|
71 |
|
72 /** |
|
73 * EPOC default constructor for performing 2nd stage construction |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 |
|
78 private: //Data |
|
79 |
|
80 CBTEngSettings* iSettings; // Own. |
|
81 CActiveSchedulerWait* iWaiter; //Own. |
|
82 TInt iError; |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // BTSETTINGS_H |