Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <FEPBCONFIG.H>
Link against: fepbase.lib

Class MFepAttributeStorer

class MFepAttributeStorer;

Description

Protocol for storing, restoring and synchronising FEP attributes.

An abstract base class for CCoeFep, so FEPs must implement the pure virtual functions declared in this class.

Rather than using a single device-wide instance of a FEP, each application has its own instance of the FEP. MFepAttributeStorer provides a framework for synchronising FEP attributes across each running instance of the same FEP. For this to happen, the FEP must implement MFepAttributeStorer::WriteAttributeDataToStreamL(TUid,RWriteStream &)const and MFepAttributeStorer::ReadAttributeDataFromStreamL(TUid,RReadStream &).

Attributes are FEP-specific, and are identified by a UID which can be accessed using MFepAttributeStorer::AttributeAtIndex(TInt)const. An example of a FEP attribute might be whether inline editing is enabled or disabled.

Members

Defined in MFepAttributeStorer:


Member functions


ReadAllAttributesL(CCoeEnv &)

IMPORT_C void ReadAllAttributesL(CCoeEnv &aConeEnvironment);

Description

Reads all of the FEP's attributes from the system settings.

Calls the implementation of MFepAttributeStorer::ReadAttributeDataFromStreamL(TUid,RReadStream &) for each attribute.

This function has identical behaviour to CCoeFep::ReadAllAttributesL().

Parameters

CCoeEnv &aConeEnvironment

Not used.


WriteAttributeDataAndBroadcastL(CCoeEnv &,TUid)

Capability: WriteDeviceData

IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv &aConeEnvironment, TUid aAttributeUid);

Description

Call this function after changing the value of an attribute that needs to be synchronised.

Writes the new value to the system-wide settings and causes all other running instances of the FEP to be notified of the change.

A panic occurs if aAttributeUid is not one of the FEP's attributes.

Parameters

CCoeEnv &aConeEnvironment

The FEP's control environment.

TUid aAttributeUid

The UID of the attribute whose value has changed.


WriteAttributeDataAndBroadcastL(CCoeEnv &,const TArray< TUid > &)

Capability: WriteDeviceData To prevent corruption of FEP settings.

IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv &aConeEnvironment, const TArray< TUid > &aAttributeUids);

Description

Call this function after changing the value of multiple attributes that need to be synchronised.

Writes the new values to the system settings, and causes all other running instances of the FEP to be notified of the change.

A panic occurs if any of the attributes contained in aAttributeUids are not among the FEP's attributes.

Parameters

CCoeEnv &aConeEnvironment

Not used.

const TArray< TUid > &aAttributeUids

Array of UIDs of the attribute whose values have changed.


NumberOfAttributes()const

virtual TInt NumberOfAttributes() const=0;

Description

Returns the total number of FEP attributes.

Return value

TInt

The number of FEP attributes.


AttributeAtIndex(TInt)const

virtual TUid AttributeAtIndex(TInt aIndex) const=0;

Description

Returns the UID of the FEP attribute at the index specified.

Parameters

TInt aIndex

An array index.

Return value

TUid

The UID of the FEP attribute at aIndex.


WriteAttributeDataToStreamL(TUid,RWriteStream &)const

virtual void WriteAttributeDataToStreamL(TUid aAttributeUid, RWriteStream &aStream) const=0;

Description

Writes the value of the attribute specified to the specified write stream.

Called by MFepAttributeStorer::WriteAttributeDataAndBroadcastL(CCoeEnv &,TUid) for each attribute passed to it.

Parameters

TUid aAttributeUid

UID of the attribute to write to the stream.

RWriteStream &aStream

The stream to which to write the attribute.


ReadAttributeDataFromStreamL(TUid,RReadStream &)

virtual void ReadAttributeDataFromStreamL(TUid aAttributeUid, RReadStream &aStream)=0;

Description

Reads the value of the attribute identified by the UID specified in aAttributeUid from the specified read stream.

You should take appropriate action if the attribute has changed, e.g. if inline editing has been disabled, you might cancel the current transaction.

This function is called by MFepAttributeStorer::ReadAllAttributesL(CCoeEnv &) for all attributes. It is also called when the FEP receives a message that an attribute has been changed by another running instance of the FEP (using MFepAttributeStorer::WriteAttributeDataAndBroadcastL(CCoeEnv &,TUid)).

Parameters

TUid aAttributeUid

Identifies the attribute whose value should be read.

RReadStream &aStream

Read stream from which to read the attribute's value.


MFepAttributeStorer_Reserved_1()

private: IMPORT_C virtual void MFepAttributeStorer_Reserved_1();

Description


MFepAttributeStorer_Reserved_2()

private: IMPORT_C virtual void MFepAttributeStorer_Reserved_2();

Description