class MFepAttributeStorer |
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() and MFepAttributeStorer::ReadAttributeDataFromStreamL().
Attributes are FEP-specific, and are identified by a UID which can be accessed using AttributeAtIndex(). An example of a FEP attribute might be whether inline editing is enabled or disabled.
Public Member Functions | |
---|---|
TUid | AttributeAtIndex(TInt) |
TInt | NumberOfAttributes() |
IMPORT_C void | ReadAllAttributesL(CCoeEnv &) |
void | ReadAttributeDataFromStreamL(TUid, RReadStream &) |
IMPORT_C void | WriteAttributeDataAndBroadcastL(CCoeEnv &, TUid) |
IMPORT_C void | WriteAttributeDataAndBroadcastL(CCoeEnv &, const TArray< TUid > &) |
void | WriteAttributeDataToStreamL(TUid, RWriteStream &) |
Private Member Functions | |
---|---|
IMPORT_C void | MFepAttributeStorer_Reserved_1() |
IMPORT_C void | MFepAttributeStorer_Reserved_2() |
TInt | NumberOfOccurrencesOfAttributeUid(TUid) |
TUid | AttributeAtIndex | ( | TInt | aIndex | ) | const [pure virtual] |
Returns the UID of the FEP attribute at the index specified.
The UID of the FEP attribute at aIndex.
TInt aIndex | An array index. |
TInt | NumberOfAttributes | ( | ) | const [pure virtual] |
Returns the total number of FEP attributes.
The number of FEP attributes.
TInt | NumberOfOccurrencesOfAttributeUid | ( | TUid | aAttributeUid | ) | const [private] |
TUid aAttributeUid |
IMPORT_C void | ReadAllAttributesL | ( | CCoeEnv & | aConeEnvironment | ) |
CCoeEnv & aConeEnvironment |
void | ReadAttributeDataFromStreamL | ( | TUid | aAttributeUid, |
RReadStream & | aStream | |||
) | [pure virtual] |
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() 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 WriteAttributeDataAndBroadcastL()).
TUid aAttributeUid | Identifies the attribute whose value should be read. |
RReadStream & aStream | Read stream from which to read the attribute's value. |
IMPORT_C void | WriteAttributeDataAndBroadcastL | ( | CCoeEnv & | aConeEnvironment, |
TUid | aAttributeUid | |||
) |
IMPORT_C void | WriteAttributeDataAndBroadcastL | ( | CCoeEnv & | aConeEnvironment, |
const TArray< TUid > & | aAttributeUids | |||
) |
void | WriteAttributeDataToStreamL | ( | TUid | aAttributeUid, |
RWriteStream & | aStream | |||
) | const [pure virtual] |
Writes the value of the attribute specified to the specified write stream.
Called by MFepAttributeStorer::WriteAttributeDataAndBroadcastL() for each attribute passed to it.
TUid aAttributeUid | UID of the attribute to write to the stream. |
RWriteStream & aStream | The stream to which to write the attribute. |