CFepGenericGlobalSettings Class Reference

class CFepGenericGlobalSettings : public CBase

Reads and writes generic FEP settings.

Used by the CCoeFep class. The generic FEP settings are whether the FEP is on or off and what key combinations should turn the FEP on or off. Also used to synchronise these settings across all running instances of the FEP. These settings are generic, unlike FEP attributes which are FEP-specific. FEP attributes are stored, restored and synchronised using class MFepAttributeStorer. Generic FEP settings are changed locally using the Set...() member functions. Then, to store these as the system settings and to apply them globally, call StoreChangesAndBroadcastL().

Class CCoeFep initialises its generic FEP settings from the global system settings during construction. Its generic FEP settings are updated when the settings are changed by a call to StoreChangesAndBroadcastL() by another running instance of the FEP.

Inherits from

  • CFepGenericGlobalSettings
Public Member Functions
IMPORT_C TBoolIsOn()
IMPORT_C CFepGenericGlobalSettings *NewL(CCoeEnv &, const TFepOnOrOffKeyData &, const TFepOnOrOffKeyData &, TBool)
IMPORT_C CFepGenericGlobalSettings *NewL()
IMPORT_C CFepGenericGlobalSettings *NewLC(CCoeEnv &, const TFepOnOrOffKeyData &, const TFepOnOrOffKeyData &, TBool)
IMPORT_C CFepGenericGlobalSettings *NewLC()
IMPORT_C TFepOnOrOffKeyDataOffKeyData()
IMPORT_C TFepOnOrOffKeyDataOnKeyData()
IMPORT_C voidReadOnOrOffKeyData(CRepository &, TFepOnOrOffKeyData &, TUint32, TInt *)
IMPORT_C voidReadOnState(CRepository &, TBool &, TInt *)
IMPORT_C voidRefreshL()
IMPORT_C voidSetIsOn(TBool)
IMPORT_C voidSetOffKeyData(const TFepOnOrOffKeyData &)
IMPORT_C voidSetOnKeyData(const TFepOnOrOffKeyData &)
IMPORT_C voidStoreChangesAndBroadcastL()
IMPORT_C voidWriteOnOrOffKeyDataAndBroadcastL(CRepository &, const TFepOnOrOffKeyData &, TUint32)
IMPORT_C voidWriteOnStateAndBroadcastL(CRepository &, TBool, TUint32)
Private Member Functions
CFepGenericGlobalSettings()
voidConstructL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumanonymous { EFlagIsOn = 0x00000001, EFlagStoreIsOn = 0x00000002, EFlagStoreOnKeyData = 0x00000004, EFlagStoreOffKeyData = 0x00000008 }
Private Attributes
TUint iFlags
TFepOnOrOffKeyData iOffKeyData
TFepOnOrOffKeyData iOnKeyData

Constructor & Destructor Documentation

CFepGenericGlobalSettings()

CFepGenericGlobalSettings()[private]

Member Functions Documentation

ConstructL()

voidConstructL()[private]

IsOn()

IMPORT_C TBoolIsOn()const

Tests whether the FEP is on or off.

NewL(CCoeEnv &, const TFepOnOrOffKeyData &, const TFepOnOrOffKeyData &, TBool)

IMPORT_C CFepGenericGlobalSettings *NewL(CCoeEnv &aConeEnvironment,
const TFepOnOrOffKeyData &aDefaultOnKeyData,
const TFepOnOrOffKeyData &aDefaultOffKeyData,
TBoolaDefaultIsOn
)[static]

Allocates and constructs a new generic FEP settings object.

Reads the generic FEP data from the system settings. If the data is not present in the system settings, it is read from the default values specified.

Parameters

CCoeEnv & aConeEnvironmentThe FEP's control environment.
const TFepOnOrOffKeyData & aDefaultOnKeyDataDefault key event data for switching the FEP on.
const TFepOnOrOffKeyData & aDefaultOffKeyDataDefault key event data for switching the FEP off.
TBool aDefaultIsOnWhether the FEP is on or off by default.

NewL()

IMPORT_C CFepGenericGlobalSettings *NewL()[static]

Allocates and constructs a new generic FEP settings object.

Reads the generic FEP data from the system settings.

NewLC(CCoeEnv &, const TFepOnOrOffKeyData &, const TFepOnOrOffKeyData &, TBool)

IMPORT_C CFepGenericGlobalSettings *NewLC(CCoeEnv &aConeEnvironment,
const TFepOnOrOffKeyData &aDefaultOnKeyData,
const TFepOnOrOffKeyData &aDefaultOffKeyData,
TBoolaDefaultIsOn
)[static]

Allocates and constructs a new generic FEP settings object.

Reads the generic FEP data from the system settings. If the data is not present in the system settings, it is read from the default values specified. Leaves a pointer to the object on the cleanup stack.

Parameters

CCoeEnv & aConeEnvironmentThe FEP's control environment.
const TFepOnOrOffKeyData & aDefaultOnKeyDataDefault key event data for switching the FEP on.
const TFepOnOrOffKeyData & aDefaultOffKeyDataDefault key event data for switching the FEP off.
TBool aDefaultIsOnWhether the FEP is on or off by default.

NewLC()

IMPORT_C CFepGenericGlobalSettings *NewLC()[static]

Allocates and constructs a new generic FEP settings object.

Reads the generic FEP data from the system settings. Leaves a pointer to the object on the cleanup stack.

OffKeyData()

IMPORT_C TFepOnOrOffKeyDataOffKeyData()const

Gets the key event data which turns the FEP off.

OnKeyData()

IMPORT_C TFepOnOrOffKeyDataOnKeyData()const

Gets the key event data which turns the FEP on.

ReadOnOrOffKeyData(CRepository &, TFepOnOrOffKeyData &, TUint32, TInt *)

IMPORT_C voidReadOnOrOffKeyData(CRepository &aRepository,
TFepOnOrOffKeyData &aOnOrOffKeyData,
TUint32aRepositoryKeyMask_OnOrOff,
TInt *aError = NULL
)[static]

Parameters

CRepository & aRepository
TFepOnOrOffKeyData & aOnOrOffKeyData
TUint32 aRepositoryKeyMask_OnOrOff
TInt * aError = NULL

ReadOnState(CRepository &, TBool &, TInt *)

IMPORT_C voidReadOnState(CRepository &aRepository,
TBool &aOnState,
TInt *aError = NULL
)[static]

Parameters

CRepository & aRepository
TBool & aOnState
TInt * aError = NULL

RefreshL()

IMPORT_C voidRefreshL()

Reads the generic FEP data from the system settings.

If the FEP data is not present in the system settings, then it is set from the default values (as passed to the NewL()).

This function is called during construction of the object.

SetIsOn(TBool)

IMPORT_C voidSetIsOn(TBoolaIsOn)

Sets a flag indicating whether the FEP is on or off.

Parameters

TBool aIsOnETrue if the FEP is on, EFalse if the FEP is off.

SetOffKeyData(const TFepOnOrOffKeyData &)

IMPORT_C voidSetOffKeyData(const TFepOnOrOffKeyData &aOffKeyData)

Sets the key event data which turns the FEP off.

Parameters

const TFepOnOrOffKeyData & aOffKeyDataThe key event data which turns the FEP off.

SetOnKeyData(const TFepOnOrOffKeyData &)

IMPORT_C voidSetOnKeyData(const TFepOnOrOffKeyData &aOnKeyData)

Sets the key event data which turns the FEP on.

Parameters

const TFepOnOrOffKeyData & aOnKeyDataThe key event data which turns the FEP on.

StoreChangesAndBroadcastL()

IMPORT_C voidStoreChangesAndBroadcastL()

Stores the local copies of the generic FEP data as the system settings.

Causes all other running instances of the FEP to be updated with the new settings.
capability
WriteDeviceData To prevent corruption of FEP settings.

WriteOnOrOffKeyDataAndBroadcastL(CRepository &, const TFepOnOrOffKeyData &, TUint32)

IMPORT_C voidWriteOnOrOffKeyDataAndBroadcastL(CRepository &aRepository,
const TFepOnOrOffKeyData &aOnOrOffKeyData,
TUint32aRepositoryKey
)[static]

Parameters

CRepository & aRepository
const TFepOnOrOffKeyData & aOnOrOffKeyData
TUint32 aRepositoryKey

WriteOnStateAndBroadcastL(CRepository &, TBool, TUint32)

IMPORT_C voidWriteOnStateAndBroadcastL(CRepository &aRepository,
TBoolaOnState,
TUint32aRepositoryKeyMask_DefaultOrDynamic
)[static]

Parameters

CRepository & aRepository
TBool aOnState
TUint32 aRepositoryKeyMask_DefaultOrDynamic

Member Enumerations Documentation

Enum anonymous

Enumerators

EFlagIsOn = 0x00000001
EFlagStoreIsOn = 0x00000002
EFlagStoreOnKeyData = 0x00000004
EFlagStoreOffKeyData = 0x00000008

Member Data Documentation

TUint iFlags

TUint iFlags[private]

TFepOnOrOffKeyData iOffKeyData

TFepOnOrOffKeyData iOffKeyData[private]

TFepOnOrOffKeyData iOnKeyData

TFepOnOrOffKeyData iOnKeyData[private]