bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtSettingsObserver.h
branchRCL_3
changeset 56 9386f31cc85b
parent 0 f63038272f30
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtSettingsObserver.h	Wed Sep 01 12:20:04 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef BTSETTINGSOBSERVER_H_
+#define BTSETTINGSOBSERVER_H_
+
+#include <e32std.h>
+#include <e32base.h>
+#include <btengsettings.h>
+
+NONSHARABLE_CLASS( CBtSettingsObserver ) : public CBase,
+                                   public MBTEngSettingsObserver
+    {
+public:
+    /**
+     * Destructor.
+     */
+    ~CBtSettingsObserver();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CBtSettingsObserver* NewL();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CBtSettingsObserver* NewLC();
+    
+    TInt GetPowerState( TBTPowerStateValue& aState );
+    TInt SetPowerState( TBTPowerStateValue aState );
+    TInt GetVisibilityMode( TBTVisibilityMode& aMode );
+    TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime = 0 );
+    TInt GetLocalName( TDes& aName );
+    TInt SetLocalName( const TDes& aName );
+
+private:
+
+    // From MBTEngSettingsObserver
+    void PowerStateChanged( TBTPowerStateValue aState );
+    void VisibilityModeChanged( TBTVisibilityMode aState );
+    
+
+    CBtSettingsObserver();
+    void ConstructL();
+
+    
+private: //Data
+    
+    CBTEngSettings* iSettings; // Own.
+    CActiveSchedulerWait* iWaiter; //Own.
+    TInt iError;    
+    };
+
+#endif /*BTSETTINGSOBSERVER_H_*/