MCatalogsBaseMessage Class Reference

class MCatalogsBaseMessage

An interface through which a message can be handled. This class should be implemented by CBase derived class.

This interface is used to pass the message information to a receiving object. The interface gives access to message handling functions. These functions include reading input data, returning output data to the client and signal the client about message completion and success. Also a function to obtain a message reciver registration interface is included to allow registartion of new objects.

?library
Since
S60 ?S60_version *** for example, S60 v3.0

Constructor & Destructor Documentation

~MCatalogsBaseMessage()

~MCatalogsBaseMessage()[protected, inline, virtual]

Destructor. Usage through this interface is not intended.

Since
S60 ?S60_version

Member Functions Documentation

CheckSecurityPolicy(const TSecurityPolicy &)

TBool CheckSecurityPolicy(const TSecurityPolicy &aSecurityPolicy)[pure virtual]

Checks if this message qualify the given security policies.

Since
S60 ?S60_version

Parameters

const TSecurityPolicy & aSecurityPolicy

CompleteAndRelease(TInt)

voidCompleteAndRelease(TIntaStatus)const [pure virtual]

Completes the message with the given status. After this, releases implementor of this interface. NOTICE: Do not use this message after this.

Since
S60 ?S60_version

Parameters

TInt aStatusmessage completion status

CompleteAndReleaseL(const TDesC8 &, TInt)

voidCompleteAndReleaseL(const TDesC8 &aOutputData,
TIntaStatus
)[pure virtual]

Writes the output data to a client side output buffer and completes the message with the status given. After this, releases implementor of this interface. NOTICE: Do not use this message after this. NOTICE: If leave occurs, this message is NOT released and NOT completed.

Since
S60 ?S60_version

Parameters

const TDesC8 & aOutputDataa buffer that contains the output data
TInt aStatusmessage completion status

CompleteAndReleaseL(const TDesC16 &, TInt)

voidCompleteAndReleaseL(const TDesC16 &aOutputData,
TIntaStatus
)[pure virtual]

Writes the output data to a client side output buffer and completes the message with the status given. After this, releases implementor of this interface. NOTICE: Do not use this message after this. NOTICE: If leave occurs, this message is NOT released and NOT completed.

Since
S60 ?S60_version

Parameters

const TDesC16 & aOutputDataa buffer that contains the output data
TInt aStatusmessage completion status

CompleteAndReleaseL(TInt, TInt)

voidCompleteAndReleaseL(TIntaOutputData,
TIntaStatus
)[pure virtual]

Writes the output data to a client side output buffer and completes the message with the status given. After this, releases implementor of this interface. NOTICE: Do not use this message after this. NOTICE: If leave occurs, this message is NOT released and NOT completed.

Since
S60 ?S60_version

Parameters

TInt aOutputDataa buffer that contains the output data
TInt aStatusmessage completion status

CompleteAndReleaseL(RFs &, RFile &)

voidCompleteAndReleaseL(RFs &aFs,
RFile &aFile
)[pure virtual]

Returns the file handle to the client side and completes the message with the status given. After this, releases implementor of this interface. NOTICE: Do not use this message after this. NOTICE: If leave occurs, this message is NOT released and NOT completed.

Since
S60 ?S60_version
Note:

The file server session must be shared with RFs::ShareProtected() before the file is opened with it.

Parameters

RFs & aFsFile server session used to open the file.
RFile & aFileFile handle that is shared with the client

CounterPartLost(const MCatalogsSession &)

TBool CounterPartLost(const MCatalogsSession &aSession)[pure virtual]

Function to inform that if this message is from given session, then the client-side object (sender of this message) has been lost. This means that this message will not write anything to client-side or complete any messages anymore even if CompleteAndRelease or CompleteAndReleaseL are called. (this message is only deleted at that point)

If this message is not from the given session, nothing is changed and normal functionality is received when complete-functions are called.

Since
S60 ?S60_version

Parameters

const MCatalogsSession & aSessionReference to the session in which the message sender has died. This function checks whether this message originates from the same session or not and acts according to it.

Handle()

TInt Handle()const [pure virtual]

Reads the handle of the object to whome this message is intended to. This is used primarily when unregistering object from the session.

Since
S60 ?S60_version

InputLength()

TInt InputLength()const [pure virtual]

Returns the length of the sent input data. NOTICE: The returned length is the length of the sent descriptor and so the difference between 8 and 16 bit variants are taken into account.

Since
S60 ?S60_version

ReadInput(TDes8 &)

TInt ReadInput(TDes8 &aInputData)const [pure virtual]

Reads the sent input data

Since
S60 ?S60_version

Parameters

TDes8 & aInputDataa descriptor where the input data is to be written. The descriptor length can be obtained enquired by calling first the method InputLength.

ReadInput(TDes16 &)

TInt ReadInput(TDes16 &aInputData)const [pure virtual]

Reads the sent input data

Since
S60 ?S60_version

Parameters

TDes16 & aInputDataa descriptor where the input data is to be written. The descriptor length can be obtained enquired by calling first the method InputLength.

Release()

voidRelease()[pure virtual]

Releases this message. This function is only intended for special case usage when session has died and no communication is allowed anymore. At that point, this function can be used to release this message. NOTICE: Do not use this message after this.

Since
S60 ?S60_version

Session()

MCatalogsSession &Session()const [pure virtual]

Returns the interface that gives access to registering receiving objects and removing registered receivers

Since
S60 ?S60_version