CObexClientMtm Class Reference

class CObexClientMtm : public CBaseMtm

CObexClientMtm

Abstract base class for Client Mtms that send obex objects

The functionality missing is an implementation of InvokeAsyncFunctionL() which should return a messaging operation for a specific transport, InitialiseHeaderL() which is used to create a CObexMtmHeader derived object of the appropriate type, and TestInvariant() which is used to perform invariant testing of the derived types (in debug only). These pure-virtual functions are the transport specific aspects of the MTM.

Inherits from

Nested Classes and Structures

Public Member Functions
~CObexClientMtm()
IMPORT_C voidAddAddresseeL(const TDesC &)
IMPORT_C voidAddAddresseeL(const TDesC &, const TDesC &)
IMPORT_C voidCommitChangesL()
IMPORT_C voidCreateMessageAttachmentL(TMsvId)
IMPORT_C voidCreateMessageL(TMsvId)
IMPORT_C TMsvPartListFind(const TDesC &, TMsvPartList)
IMPORT_C CMsvOperation *ForwardL(TMsvId, TMsvPartList, TRequestStatus &)
IMPORT_C TInt32GetAttachmentSizeL()
IMPORT_C voidInvokeSyncFunctionL(TInt, const CMsvEntrySelection &, TDes8 &)
IMPORT_C voidLoadMessageL()
IMPORT_C TIntQueryCapability(TUid, TInt &)
IMPORT_C voidRemoveAddressee(TInt)
IMPORT_C CMsvOperation *ReplyL(TMsvId, TMsvPartList, TRequestStatus &)
IMPORT_C voidSaveMessageL()
IMPORT_C voidSetSubjectL(const TDesC &)
IMPORT_C const TPtrCSubjectL()
IMPORT_C TUintValidateMessage(TMsvPartList)
Protected Member Functions
CObexClientMtm(CRegisteredMtmDll &, CMsvSession &, TUid)
IMPORT_C voidConstructL()
IMPORT_C voidContextEntrySwitched()
voidInitialiseHeaderL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CBaseMtm::AddAddresseeL(TMsvRecipientType,const TDesC &)
CBaseMtm::AddAddresseeL(TMsvRecipientType,const TDesC &,const TDesC &)
CBaseMtm::AddAttachmentL(RFile &,const TDesC8 &,TUint,TRequestStatus &)
CBaseMtm::AddAttachmentL(const TDesC &,const TDesC8 &,TUint,TRequestStatus &)
CBaseMtm::AddEntryAsAttachmentL(TMsvId,TRequestStatus &)
CBaseMtm::AddLinkedAttachmentL(const TDesC &,const TDesC8 &,TUint,TRequestStatus &)
CBaseMtm::AddresseeList()const
CBaseMtm::BioTypeChangedL(TUid)
CBaseMtm::Body()
CBaseMtm::Body()const
CBaseMtm::CBaseMtm(CRegisteredMtmDll &,CMsvSession &)
CBaseMtm::CancelAttachmentOperation()
CBaseMtm::ChangeDefaultServiceL(const TMsvId &)
CBaseMtm::CreateAttachmentL(const TDesC &,RFile &,const TDesC8 &,TUint,TRequestStatus &)
CBaseMtm::DefaultServiceL()const
CBaseMtm::Entry()const
CBaseMtm::Extension_(TUint,TAny *&,TAny *)
CBaseMtm::Filler1()
CBaseMtm::Filler2()
CBaseMtm::GetExtensionData()
CBaseMtm::GetInterface(TUid)
CBaseMtm::HandleEntryEventL(TMsvEntryEvent,TAny *,TAny *,TAny *)
CBaseMtm::HasContext()const
CBaseMtm::InvokeAsyncFunctionL(TInt,const CMsvEntrySelection &,TDes8 &,TRequestStatus &)
CBaseMtm::RemoveDefaultServiceL()
CBaseMtm::RestoreBodyL(CMsvStore &)
CBaseMtm::Session()
CBaseMtm::SetCurrentEntryL(CMsvEntry *)
CBaseMtm::SetExtensionData(TAny *)
CBaseMtm::SetMessageCharacterSet(TUint)
CBaseMtm::StoreBodyL(CMsvStore &)
CBaseMtm::SwitchCurrentEntryL(TMsvId)
CBaseMtm::Type()const
CBaseMtm::~CBaseMtm()
Protected Attributes
CObexMtmHeader *iHeader
Private Attributes
const TUidiMsgTypeUid
Inherited Attributes
CBaseMtm::iAddresseeList
CBaseMtm::iCharFormatLayer
CBaseMtm::iMsvEntry
CBaseMtm::iParaFormatLayer

Constructor & Destructor Documentation

CObexClientMtm(CRegisteredMtmDll &, CMsvSession &, TUid)

IMPORT_CCObexClientMtm(CRegisteredMtmDll &aRegisteredMtmDll,
CMsvSession &aMsvSession,
TUidaMsgTypeUid
)[protected]

Constructor. Initialises iMsgTypeUid with Uid provided by the derived class.

Parameters

CRegisteredMtmDll & aRegisteredMtmDllRegistration data for MTM DLL.
CMsvSession & aMsvSessionCMsvSession of the client requesting the object.
TUid aMsgTypeUidUid of the message

~CObexClientMtm()

IMPORT_C~CObexClientMtm()

Destructor deletes FileNameExternaliser and Header

Member Functions Documentation

AddAddresseeL(const TDesC &)

IMPORT_C voidAddAddresseeL(const TDesC &aRealAddress)[virtual]

Adds addressee to the addressee "list". Note that this MUST be a TDesC containing binary data representing the TSockAddress of the addressee, usually as a TDesC16. This function will then package the data directly into 8 bit data. NB: Only ONE addressee is supported

leave
KErrXXX if address cannot be appended
leave
KErrAlreadyExists if the Addressee "list" already contains an entry

Parameters

const TDesC & aRealAddressReference to the address of the recipient

AddAddresseeL(const TDesC &, const TDesC &)

IMPORT_C voidAddAddresseeL(const TDesC &aRealAddress,
const TDesC &aAlias
)[virtual]

Adds addressee to the addressee "list". Note that this MUST be a TDesC containing binary data representing the TSockAddress of the addressee, usually as a TDesC16. This function will then package the data directly into 8 bit data. NB: Only ONE addressee is supported

leave
KErrXXX if address cannot be appended
leave
KErrAlreadyExists if the Addressee "list" already contains an entry

Parameters

const TDesC & aRealAddressReference to the address of the recipient
const TDesC & aAliasReference to the alias of the recipient--ignored in this implementation

CommitChangesL()

IMPORT_C voidCommitChangesL()

Commits cached changes to the message store.

leave
KErrXxx System-wide error codes if changes cannot be committed.

ConstructL()

IMPORT_C voidConstructL()[protected]

Empty implementation provided for future-proofing.

ContextEntrySwitched()

IMPORT_C voidContextEntrySwitched()[protected, virtual]

Resets the MTM when the context is switched. Must be called by the derived class's ContextEntrySwitched prior to constructing a new header.

CreateMessageAttachmentL(TMsvId)

IMPORT_C voidCreateMessageAttachmentL(TMsvIdaAttachmentId)
Obex based MTMs do not support message entry attachments. This method will leave with KErrNotSupported.
leave
KErrNotSupported This method is not supported.

Parameters

TMsvId aAttachmentIdThis is not supported.

CreateMessageL(TMsvId)

IMPORT_C voidCreateMessageL(TMsvId)[virtual]

Create a new message for this MTM. This creates a new messaging entry, then re-initialises the MTM's CObexMtmHeader object.

leave
KErrXxx Standard EPOC error codes if construction of new objects fails

Parameters

TMsvId

Find(const TDesC &, TMsvPartList)

IMPORT_C TMsvPartListFind(const TDesC &aTextToFind,
TMsvPartListaPartList
)[virtual]

Finds the given text within the specified parts of the current message context. NOT IMPLEMENTED!

Parameters

const TDesC & aTextToFindReference to the text to search for in the specified message parts
TMsvPartList aPartListBitmask indicating parts of message to be searched for the text

ForwardL(TMsvId, TMsvPartList, TRequestStatus &)

IMPORT_C CMsvOperation *ForwardL(TMsvIdaForwardEntryId,
TMsvPartListaPartList,
TRequestStatus &aCompletionStatus
)[virtual]

Unsupported

leave
Leaves always with KErrNotSupported

Parameters

TMsvId aForwardEntryId
TMsvPartList aPartList
TRequestStatus & aCompletionStatus

GetAttachmentSizeL()

IMPORT_C TInt32GetAttachmentSizeL()

This function calculates the size of all attachments to the message by either:

  • summing the sizes of each of the children or;

  • reading in all of the filenames from the store, and summing their sizes.*

leave
KErrXXX system-wide error codes

InitialiseHeaderL()

voidInitialiseHeaderL()[protected, pure virtual]

InvokeSyncFunctionL(TInt, const CMsvEntrySelection &, TDes8 &)

IMPORT_C voidInvokeSyncFunctionL(TIntaFunctionId,
const CMsvEntrySelection &aSelection,
TDes8 &aParameter
)[virtual]
No functionality is provided by this method. Leaves with KErrNotSupported.
leave
KErrNotSupported

Parameters

TInt aFunctionIdUnused.
const CMsvEntrySelection & aSelectionUnused.
TDes8 & aParameterUnused.

LoadMessageL()

IMPORT_C voidLoadMessageL()[virtual]

This function loads the header from the message store

leave
KErrXXX system-wide error codes

QueryCapability(TUid, TInt &)

IMPORT_C TIntQueryCapability(TUidaCapability,
TInt &aResponse
)[virtual]

Gives the capability of the MTM.

Parameters

TUid aCapabilitycapability to be queried
TInt & aResponsecapability dependent return value.

RemoveAddressee(TInt)

IMPORT_C voidRemoveAddressee(TIntaIndex)[virtual]

Removes addressee at index aIndex from the addressee "list".

Parameters

TInt aIndexzero-based index of the addressee (ignored since "there can be only one").

ReplyL(TMsvId, TMsvPartList, TRequestStatus &)

IMPORT_C CMsvOperation *ReplyL(TMsvIdaReplyEntryId,
TMsvPartListaPartlist,
TRequestStatus &aCompletionStatus
)[virtual]

Unsupported

leave
Leaves always with KErrNotSupported

Parameters

TMsvId aReplyEntryId
TMsvPartList aPartlist
TRequestStatus & aCompletionStatus

SaveMessageL()

IMPORT_C voidSaveMessageL()[virtual]

Commits cached changes to the message store, by calling CommitChangesL.

leave
KErrXxx System-wide error codes if message cannot be saved.

SetSubjectL(const TDesC &)

IMPORT_C voidSetSubjectL(const TDesC &aSubject)[virtual]

Sets the subject of the current message context

leave
Leaves if creation of new HBufC fails

Parameters

const TDesC & aSubjectReference to the new message subject text

SubjectL()

IMPORT_C const TPtrCSubjectL()const [virtual]

Returns the subject of the current message context. Will not leave.

leave
Never

ValidateMessage(TMsvPartList)

IMPORT_C TUintValidateMessage(TMsvPartListaPartList)[virtual]

Ensure that the current message context part indicated is valid. Currently only works on KMsvMessagePartRecipient--all other parts are assumed to be valid

Parameters

TMsvPartList aPartListBitmask indicating parts of message to be validated

Member Data Documentation

CObexMtmHeader * iHeader

CObexMtmHeader *iHeader[protected]

const TUid iMsgTypeUid

const TUidiMsgTypeUid[private]