EPOC   SDK Home Glossary Indexes Previous Next Up

MSendAsObserver class


Contents


MSendAsObserver class — Send-As client observer

Section Contents


Overview

Compatibility

The class is new in ER5. Applications built using this class will not run on a device with an earlier version of EPOC.

Derivation

Not applicable

Defined in

sendas.h

Link against

send.lib

Description

Any client of the Send As functionality needs to implement this class. It allows CSendAs to call back a client with further information or requests.


Function members


CapabilityOK() — Capability check

virtual TBool CapabilityOK(TInt aCapabilty, TInt aResponse)=0;

Description

Derived classes implement this function in order to check a MTM capability that returns a response (e.g. maximum message size). After calling CSendAs::AddRequiredCapability(), the observer is called with the response from the MTM. If the mixin function returns ETrue, then the MTM has satisfied the required capability and will remain in the available MTM array.

Arguments

TUid aCapabilty

UID of capability to check

TInt aResponse

Capability information

Return value

ETrue

Capability supported

EFalse

Capability unsupported


RenderImage() — Image render request

virtual TInt RenderImage(TUid aPrinterUid, const TDesC& aFileName);

virtual TInt RenderImage(TUid aPrinterUid, const TDesC& aFileName, TRequestStatus& aRequestStatus);

Description

Used when the MTM requires the message to be rendered using a certain printer driver (e.g. fax), using print-to-file. It passes the UID of the printer driver to use and the filename to which to print.

The default implementation returns KErrNotSupported. The asynchronous version is used with the asynchronous SaveMessageL() function.

Arguments

TUid aPrinterUid

UID of the printer driver with which to render message

const TDesC& aFileName TRequestStatus& aStatus

Filename to which to print

TRequestStatus& aRequestStatus

Asynchronous completion object

Return value

TInt

Return KErrNone if successful, otherwise a meaningful error code


CancelRendering() — Cancel render request

virtual void CancelRendering();

Description

If CancelRendering() is called, the observer should stop rendering the image. This should occur synchronously. This function will only be called after an asynchronous RenderImage() and before that function has completed. The default implementation is empty.

EPOC       SDK Home Glossary Indexes Previous Next Up