bthci/hci2implementations/hctls/brcmh4/inc/controllermanager.h
author Christophe Porcel <christophe.porcel@broadcom.com>
Wed, 28 Jul 2010 17:24:32 +0100
branchbroadcom_h4
changeset 37 f53839ff73b7
permissions -rw-r--r--
Broadcom H4 contribution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     2
// All rights reserved.
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     7
//
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     8
// Initial Contributors:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    10
//
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    11
// Contributors:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    12
//
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    13
// Description:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    14
//
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    15
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    16
/**
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    17
 @file
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    18
 @internalComponent
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    19
*/
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    20
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    21
#ifndef CONTROLLERMANAGER_H
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    22
#define CONTROLLERMANAGER_H
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    23
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    24
#include <e32base.h>
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    25
#include <bluetooth/hci/hctlpowerinterface.h>
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    26
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    27
class MControllerStateObserver;
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    28
class CHCTLBcmH4;
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    29
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    30
/**
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    31
This is the class that implements a controller manager.
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    32
This is a class which provides a framework for managing the
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    33
power management and reset of the host controller.
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    34
*/
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    35
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    36
NONSHARABLE_CLASS(CControllerManager) : public CBase, public MHCTLPowerInterface
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    37
    {
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    38
public:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    39
    static CControllerManager* NewL(CHCTLBcmH4& aHctl);
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    40
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    41
	void SetControllerStateObserver(MControllerStateObserver& aControllerStateObserver);
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    42
	void HardReset();
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    43
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    44
private:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    45
	// From MHCTLPowerInterface
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    46
	virtual TInt MhpiGetPower(TBTPowerState& aState);
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    47
	virtual TInt MhpiSetPower(const TBTPowerState aState);
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    48
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    49
    CControllerManager(CHCTLBcmH4& aHctl);
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    50
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    51
private:
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    52
    MControllerStateObserver* iControllerStateObserver;
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    53
    CHCTLBcmH4& iHctl;
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    54
    };
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    55
f53839ff73b7 Broadcom H4 contribution
Christophe Porcel <christophe.porcel@broadcom.com>
parents:
diff changeset
    56
#endif // CONTROLLERMANAGER_H