CBTEngSettings Class Reference
class CBTEngSettings : public CBase
|
Class
CBTEngSettings
This class provides functionality for getting and setting Bluetooth settings.
btengsettings.lib
-
Since
-
S60 v3.2
Constructor & Destructor Documentation
CBTEngSettings(MBTEngSettingsObserver *)
~CBTEngSettings()
~CBTEngSettings
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ChangePowerStateTemporarily()
IMPORT_C
TInt
|
ChangePowerStateTemporarily
|
(
|
)
|
|
Sets the Bluetooth power state (on or off). If a callback interface has been provided, the result is communicated through PowerStateChanged() when to power state change has been fully completed. If bluetooth is on, power will be switched off gracefully after all temporary connections have been disconnected. If a non-temporary connection has been established in the mean time (e.g. with a headset), power will be switched on permanently. Note: power will only be switched off gracefully if it has also been switched on through this method, otherwise KErrAccessDenied will be returned.
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
Symbian 2nd-phase constructor
GetCenRepKeyL(const TUid, const TInt, TInt &, const TInt, const TInt, const TInt, const TInt)
void
|
GetCenRepKeyL
|
(
|
const
TUid
|
aUid,
|
|
const
TInt
|
aKey,
|
|
TInt
&
|
aValue,
|
|
const
TInt
|
aMinRange1,
|
|
const
TInt
|
aMaxRange1,
|
|
const
TInt
|
aMinRange2 = 0,
|
|
const
TInt
|
aMaxRange2 = 0
|
|
)
|
[private]
|
Helper function for reading a Central Repository key, and verifying that the value is within the appropriate range.
Parameters
const
TUid
aUid
|
UID of the key to be read.
|
const
TInt
aKey
|
The key to be read.
|
TInt
& aValue
|
Default value of the key; on return contains the value as read from CenRep.
|
const
TInt
aMinRange1
|
Lower limit of the first valid range of key values.
|
const
TInt
aMaxRange1
|
Upper limit of the first valid range of key values.
|
const
TInt
aMinRange2 = 0
|
Lower limit of the second valid range of key values.
|
const
TInt
aMaxRange2 = 0
|
Upper limit of the second valid range of key values.
|
GetLocalName(TDes &)
IMPORT_C
TInt
|
GetLocalName
|
(
|
TDes
&
|
aName
|
)
|
|
Gets Bluetooth local name. If the name has not been set, a zero-lenght name is returned.
GetLocalNameModified(TBool &)
TInt
|
GetLocalNameModified
|
(
|
TBool
&
|
aStatus
|
)
|
[private]
|
Helper function to get the status from Central Repository of whether the local name has been modified.
Parameters
TBool
& aStatus
|
On return, contains the current status of the local name.
|
GetOfflineModeSettings(TCoreAppUIsNetworkConnectionAllowed &, TBTEnabledInOfflineMode &)
IMPORT_C
TInt
|
GetOfflineModeSettings
|
(
|
TCoreAppUIsNetworkConnectionAllowed
&
|
aOffline,
|
|
TBTEnabledInOfflineMode
&
|
aOfflineAllowed
|
|
)
|
|
Gets Bluetooth offline mode settings.
Parameters
TCoreAppUIsNetworkConnectionAllowed
& aOffline
|
On return, indicates whether Offline Mode is active.
|
TBTEnabledInOfflineMode
& aOfflineAllowed
|
On return, indicates wether Bluetooth is allowed to be turned on in offline mode.
|
GetPowerState(TBTPowerStateValue &)
IMPORT_C
TInt
|
GetPowerState
|
(
|
TBTPowerStateValue
&
|
aState
|
)
|
|
Gets the Bluetooth power state (on or off).
Parameters
TBTPowerStateValue
& aState
|
On return, contains the current power mode.
|
GetVisibilityMode(TBTVisibilityMode &)
IMPORT_C
TInt
|
GetVisibilityMode
|
(
|
TBTVisibilityMode
&
|
aMode
|
)
|
|
Gets Bluetooth visibility mode (hidden, limited or general discoverable mode).
Parameters
TBTVisibilityMode
& aMode
|
On return, contains the current visibility mode.
|
HandleBTRegistryNameSetting(TDes &)
TInt
|
HandleBTRegistryNameSetting
|
(
|
TDes
&
|
aName
|
)
|
[private]
|
Helper function for getting/setting BT local name in BT Registry.
Parameters
TDes
& aName
|
The BT local device name to be read or written. If it contains an empty string, it will hold the name on return, otherwise the contained string will be set to BT Registry.
|
NewL(MBTEngSettingsObserver *)
NewLC(MBTEngSettingsObserver *)
SetLocalName(const TDes &)
IMPORT_C
TInt
|
SetLocalName
|
(
|
const
TDes
&
|
aName
|
)
|
|
Sets Bluetooth local name.
SetPowerState(TBTPowerStateValue)
IMPORT_C
TInt
|
SetPowerState
|
(
|
TBTPowerStateValue
|
aState
|
)
|
|
Sets the Bluetooth power state (on or off). If a callback interface has been provided, the result is communicated through PowerStateChanged() when to power state change has been fully completed.
Parameters
TBTPowerStateValue
aState
|
Power mode to be set.
|
SetVisibilityMode(TBTVisibilityMode, TInt)
IMPORT_C
TInt
|
SetVisibilityMode
|
(
|
TBTVisibilityMode
|
aMode,
|
|
TInt
|
aTime = 0
|
|
)
|
|
Sets Bluetooth visibility mode (hidden, limited or general discoverable mode).
Parameters
TBTVisibilityMode
aMode
|
Discoverability mode to be set to Central Repository.
|
TInt
aTime = 0
|
Time during which the phone remains in general discoverable state (in minutes), only used with EBTDiscModeTemporary (otherwise ignored).
|
Member Data Documentation
MBTEngSettingsObserver * iObserver
Observer for changes in BT settings. Not own.
CBTEngSettingsNotify * iSettingsWatcher
Timer for temporary discoverable mode. Own.
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.