bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtSettingsObserver.h
branchRCL_3
changeset 56 9386f31cc85b
parent 0 f63038272f30
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
       
     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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTSETTINGSOBSERVER_H_
       
    19 #define BTSETTINGSOBSERVER_H_
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <btengsettings.h>
       
    24 
       
    25 NONSHARABLE_CLASS( CBtSettingsObserver ) : public CBase,
       
    26                                    public MBTEngSettingsObserver
       
    27     {
       
    28 public:
       
    29     /**
       
    30      * Destructor.
       
    31      */
       
    32     ~CBtSettingsObserver();
       
    33 
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      */
       
    37     static CBtSettingsObserver* NewL();
       
    38 
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      */
       
    42     static CBtSettingsObserver* NewLC();
       
    43     
       
    44     TInt GetPowerState( TBTPowerStateValue& aState );
       
    45     TInt SetPowerState( TBTPowerStateValue aState );
       
    46     TInt GetVisibilityMode( TBTVisibilityMode& aMode );
       
    47     TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime = 0 );
       
    48     TInt GetLocalName( TDes& aName );
       
    49     TInt SetLocalName( const TDes& aName );
       
    50 
       
    51 private:
       
    52 
       
    53     // From MBTEngSettingsObserver
       
    54     void PowerStateChanged( TBTPowerStateValue aState );
       
    55     void VisibilityModeChanged( TBTVisibilityMode aState );
       
    56     
       
    57 
       
    58     CBtSettingsObserver();
       
    59     void ConstructL();
       
    60 
       
    61     
       
    62 private: //Data
       
    63     
       
    64     CBTEngSettings* iSettings; // Own.
       
    65     CActiveSchedulerWait* iWaiter; //Own.
       
    66     TInt iError;    
       
    67     };
       
    68 
       
    69 #endif /*BTSETTINGSOBSERVER_H_*/