TMMFMessage Class Reference

#include <mmf/common/mmfcontrollerframework.h>

Link against: mmfcontrollerframework.lib

class TMMFMessage
Public Member Functions
TMMFMessage(const TMMFMessage &)
TMMFMessage(const RMmfIpcMessage &)
IMPORT_C voidAdoptFileHandleFromClientL(TInt, TInt, RFile &)
IMPORT_C voidComplete(TInt)
IMPORT_C const TMMFMessageDestination &Destination()
IMPORT_C voidFetchDestinationL()
IMPORT_C TIntFunction()
IMPORT_C TBoolIsCompleted()
IMPORT_C TIntReadData1FromClient(TDes8 &)
IMPORT_C voidReadData1FromClientL(TDes8 &)
IMPORT_C TIntReadData2FromClient(TDes8 &)
IMPORT_C voidReadData2FromClientL(TDes8 &)
IMPORT_C TIntSizeOfData1FromClient()
IMPORT_C TIntSizeOfData2FromClient()
IMPORT_C TIntWriteDataToClient(const TDesC8 &)
IMPORT_C voidWriteDataToClientL(const TDesC8 &)

Detailed 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.

See also: RMMFControllerProxy::SendSync RMMFControllerProxy::SendAsync

Since
7.0s

Constructor & Destructor Documentation

TMMFMessage ( const TMMFMessage & )

IMPORT_CTMMFMessage(const TMMFMessage &aMessage)

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.

Since
7.0s
Parameters
aMessageThe message object to copy.

TMMFMessage ( const RMmfIpcMessage & )

IMPORT_CTMMFMessage(const RMmfIpcMessage &aMessage)

Constructs a TMMFMessage from an RMmfIpcMessage.

Since
7.0s
Parameters
aMessageThe handle to the remote message.

Member Function Documentation

AdoptFileHandleFromClientL ( TInt, TInt, RFile & )

IMPORT_C voidAdoptFileHandleFromClientL(TIntaFsHandleIndex,
TIntaFileHandleIndex,
RFile &aFile
)

Complete ( TInt )

IMPORT_C voidComplete(TIntaReason)

Signals to the client that its request has been completed.

Equivalent to RMessage::Complete.

Since
7.0s
Parameters
aReasonThe result code to be given back to the client.

Destination ( )

IMPORT_C const TMMFMessageDestination &Destination()

Returns the destination of the message.

Since
7.0s
Return Value
The destination of the message, consisting of a UID defining the interface and the handle of the destination object.

FetchDestinationL ( )

IMPORT_C voidFetchDestinationL()

Gets the destination info from the client.

Since
7.0s

Function ( )

IMPORT_C TIntFunction()

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

See also: RMessage::Function()

Since
7.0s
Return Value
The function being called over IPC.

IsCompleted ( )

IMPORT_C TBoolIsCompleted()

Checks whether this message has already been completed.

Since
7.0s
Return Value
A boolean indicating if the message has been completed. ETrue if the message has been completed, EFalse if not.

ReadData1FromClient ( TDes8 & )

IMPORT_C TIntReadData1FromClient(TDes8 &aDes)

Copy the first descriptor from the client.

Since
7.0s
Parameters
aDesA 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
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 voidReadData1FromClientL(TDes8 &aDes)

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.

Since
7.0s
Parameters
aDesA descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.

ReadData2FromClient ( TDes8 & )

IMPORT_C TIntReadData2FromClient(TDes8 &aDes)

Copies the second descriptor from the client.

Since
7.0s
Parameters
aDesA 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
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 voidReadData2FromClientL(TDes8 &aDes)

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.

Since
7.0s
Parameters
aDesA descriptor defining the area of memory into which the data from the client will be copied. Note, the descriptor must be of sufficient size.

SizeOfData1FromClient ( )

IMPORT_C TIntSizeOfData1FromClient()

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.

Since
7.0s
Return Value
The size of data 1.

SizeOfData2FromClient ( )

IMPORT_C TIntSizeOfData2FromClient()

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.

Since
7.0s
Return Value
The size of data 2.

WriteDataToClient ( const TDesC8 & )

IMPORT_C TIntWriteDataToClient(const TDesC8 &aDes)

Copies data back to the client.

Since
7.0s
Parameters
aDesThe 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
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 voidWriteDataToClientL(const TDesC8 &aDes)

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.

Since
7.0s
Parameters
aDesThe 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.