CHeadsetStatus Class Reference
class CHeadsetStatus : public CBase |
API for checking the headset status. This implementation is a wrapper that encapsulates internal interface for extended SDK
Usage: Include HeadsetStatus.h and link against HeadsetStatus.lib
Note: If you intend to call HeadsetConnectedL more than once it is more efficient to declare the instance from CHeadsetStatus as a member variable and create it in ConstructL and delete it in destructor.
Observing is only enbaled in Series 60 3.1 with __ACCESSORY_FW flag enabled!
TBool connected( EFalse );
CHeadsetStatus* wrapper = CHeadsetStatus::NewL();
CleanupStack::PushL( wrapper );
TInt err( wrapper->HeadsetConnectedL( connected ) );
CleanupStack::PopAndDestroy( wrapper );
Constructor & Destructor Documentation
CHeadsetStatus()
CHeadsetStatus | ( | ) | [private] |
~CHeadsetStatus()
IMPORT_C | ~CHeadsetStatus | ( | ) | |
Member Functions Documentation
ConstructL()
void | ConstructL | ( | ) | [private] |
Symbian OS 2nd phase constructor
HeadsetConnectedL(TBool &)
IMPORT_C TInt | HeadsetConnectedL | ( | TBool & | aState | ) | |
Used to query the headset connectivity status.
IsObserving()
IMPORT_C TBool | IsObserving | ( | ) | const |
Checks whether already observing.
NewL()
Symbian two phased constructor.
SetObserver(MHeadsetStatusObserver *)
Sets observer through headset status notifications are received. NULL pointer will lead to panic.
StartObserving()
IMPORT_C void | StartObserving | ( | ) | |
Starts observing headset status changes.
StopObserving()
IMPORT_C void | StopObserving | ( | ) | |
Stops observing headset status changes. This is not nessecary to be called in destructor. Listening will be automatically stopped when CHeadsetStatus object is deleted.
Member Data Documentation
CHeadsetStatusContainer * iContainer
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.