Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <mmfcontrollerframework.h>
Link against: mmfcontrollerframework.lib

Class TMMFMessage

class TMMFMessage;

Description

Encapsulation of an RMessage or an RMessage2 to provide protection to controller plugins from the changes occurring with secure APIs.

Adds required destination information to the message so the controller framework can determine which object the message is for.

Adds capability to check whether the message has been completed.

Allows two descriptors to be read from the client, and one descriptor to be copied to the client.

Members

Defined in TMMFMessage:


Construction and destruction


TMMFMessage(const TMMFMessage &)

IMPORT_C TMMFMessage(const TMMFMessage &aMessage);

Description

Copy constructor.

A controller plugin should use this to take a copy of the message when it must wait for some other event before completing it.

Parameters

const TMMFMessage &aMessage

The message object to copy.


TMMFMessage(const RMmfIpcMessage &)

IMPORT_C TMMFMessage(const RMmfIpcMessage &aMessage);

Description

Constructs a TMMFMessage from an RMmfIpcMessage.

Parameters

const RMessage2 &aMessage

The handle to the remote message.

[Top]


Member functions


Destination()

IMPORT_C const TMMFMessageDestination& Destination();

Description

Returns the destination of the message.

Return value

const TMMFMessageDestination &

The destination of the message, consisting of a UID defining the interface and the handle of the destination object.


Function()

IMPORT_C TInt Function();

Description

Returns an integer describing the function being called. Equivalent to RMessage::Function().

Return value

TInt

The function being called over IPC.


SizeOfData1FromClient()

IMPORT_C TInt SizeOfData1FromClient();

Description

Returns the size of the first descriptor that can be copied over from the client.

Use this to create a descriptor of appropriate size before reading the data from the client.

Return value

TInt

The size of data 1.


ReadData1FromClient(TDes8 &)

IMPORT_C TInt ReadData1FromClient(TDes8 &aDes);

Description

Copy the first descriptor from the client.

Parameters

TDes8 &aDes

A descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.

Return value

TInt

One of the system-wide error codes. In particular, KErrBadDescriptor will be returned if the client did not provide a valid descriptor.


ReadData1FromClientL(TDes8 &)

IMPORT_C void ReadData1FromClientL(TDes8 &aDes);

Description

Copy the first descriptor from the client.

This functino can leave with one of the system-wide error codes. In particular, the leave code KErrBadDescriptor will be used if the client did not provide a valid descriptor.

Parameters

TDes8 &aDes

A descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.


SizeOfData2FromClient()

IMPORT_C TInt SizeOfData2FromClient();

Description

Returns the size of the second descriptor that can be copied over from the client.

Use this to create a descriptor of appropriate size before reading the data from the client.

Return value

TInt

The size of data 2.


ReadData2FromClient(TDes8 &)

IMPORT_C TInt ReadData2FromClient(TDes8 &aDes);

Description

Copies the second descriptor from the client.

Parameters

TDes8 &aDes

A descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.

Return value

TInt

One of the system-wide error codes. In particular, KErrBadDescriptor will be returned if the client did not provide a valid descriptor.


ReadData2FromClientL(TDes8 &)

IMPORT_C void ReadData2FromClientL(TDes8 &aDes);

Description

Copies the second descriptor from the client.

This function can leave with one of the system-wide error codes. In particular, the leave code KErrBadDescriptor will be used if the client did not provide a valid descriptor.

Parameters

TDes8 &aDes

A descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.


WriteDataToClient(const TDesC8 &)

IMPORT_C TInt WriteDataToClient(const TDesC8 &aDes);

Description

Copies data back to the client.

Parameters

const TDesC8 &aDes

The data to be copied back to the client. Note that the client must have already created a descriptor of sufficient size for the data to be copied into.

Return value

TInt

One of the system-wide error codes. In particular, the error code KErrBadDescriptor will be returned if the client did not provide a valid descriptor.


WriteDataToClientL(const TDesC8 &)

IMPORT_C void WriteDataToClientL(const TDesC8 &aDes);

Description

Copies the data back to the client.

This function can leave with one of the system-wide error codes. In particular, the leave code KErrBadDescriptor will be used if the client did not provide a valid descriptor.

Parameters

const TDesC8 &aDes

The data to be copied back to the client. Note that the client must have already created a descriptor of sufficient size for the data to be copied into.


Complete(TInt)

IMPORT_C void Complete(TInt aReason);

Description

Signals to the client that its request has been completed.

Equivalent to RMessage::Complete.

Parameters

TInt aReason

The result code to be given back to the client.


AdoptFileHandleFromClientL(TInt,TInt,RFile &)

IMPORT_C void AdoptFileHandleFromClientL(TInt aFsHandleIndex, TInt aFileHandleIndex, RFile &aFile);

Description

Parameters

TInt aFsHandleIndex

TInt aFileHandleIndex

RFile &aFile


IsCompleted()

IMPORT_C TBool IsCompleted();

Description

Checks whether this message has already been completed.

Return value

TBool

A boolean indicating if the message has been completed. ETrue if the message has been completed, EFalse if not.


FetchDestinationL()

IMPORT_C void FetchDestinationL();

Description

Gets the destination info from the client.