#include <app/mmsclient.h>
class CMmsClientMtm : public CBaseMtm |
Protected Attributes | |
---|---|
TInt | iAccessPointCount |
CDesCArrayFlat * | iAttributes |
TBool | iFetchAll |
TBool | iFetchOverride |
TInt32 | iHomeMode |
TInt | iMessageDrive |
CMmsHeaders * | iMmsHeaders |
CMmsSettings * | iMmsSettings |
CMsvSession & | iOwnSession |
TInt32 | iRoamingMode |
TMsvId | iServiceId |
Protected Member Functions | |
---|---|
CMmsClientMtm(CRegisteredMtmDll &, CMsvSession &) | |
void | ConstructL() |
virtual void | ContextEntrySwitched() |
void | HandleEntryEventL(TMsvEntryEvent, TAny *, TAny *, TAny *) |
CMsvEntrySelection * | ListNotificationsInInboxL() |
Inherited Attributes | |
---|---|
CBaseMtm::iAddresseeList | |
CBaseMtm::iCharFormatLayer | |
CBaseMtm::iMsvEntry | |
CBaseMtm::iParaFormatLayer |
Client Mtm for multimedia messaging subsystem.
This class will be the interface to the UI component and other messaging component that might want to handle multimedia messages (For example SendAs interface).
This class provides access to MMS specific headers in the message.
Note: new functions are added as the last virtual functions in order not to to break the vtable
// Example of getting access to this class: // Called by an application that implements // MMsvSessionObserver interface iSession = CMsvSession::OpenSyncL(*this); CleanupStack::PushL(iSession); iClientMtmRegistry = CClientMtmRegistry::NewL(*iSession); CleanupStack::PushL(iClientMtmRegistry); iMmsClient = (CMmsClientMtm *) iClientMtmRegistry-> NewMtmL(KUidMsgTypeMultimedia); CleanupStack::PushL(iMmsClient); // - do other initialization CleanupStack::Pop(3); //iSession, iClientMtmRegistry, iMmsClient // - call any public functions in CMmsClientMtm // When the application finishes, // it must delete the objects in reverse order: delete iMmsClient; delete iClientMtmRegistry; delete iSession;
CMmsClientMtm | ( | CRegisteredMtmDll & | aRegisteredMtmDll, |
CMsvSession & | aSession | ||
) | [protected] |
By default Symbian OS constructor is private.
Parameter | Description |
---|---|
aRegisteredMtmDll | Reference to Mtm Dll registry class |
aSession | Reference to a Message Server session. |
void | AddAddresseeL | ( | const TDesC & | aRealAddress | ) | [virtual] |
Reimplemented from CBaseMtm::AddAddresseeL(const TDesC &)
New recipient list function is not virtual, and the base MTM implementation must always be used. The function is shown here for reference only:
const CMsvRecipientList& AddresseeList() const; From CBaseMtm: Adds an addressee, cannot distiguish To, Cc, and Bcc.
New addresses are handled as To type of addresses.
Parameter | Description |
---|---|
aRealAddress | Recipient address without alias. |
Reimplemented from CBaseMtm::AddAddresseeL(const TDesC &,const TDesC &)
From CBaseMtm: Adds an addressee, cannot distiguish To, Cc, and Bcc.
New addresses are handled as To type of addresses.
Parameter | Description |
---|---|
aRealAddress | Recipient address. |
aAlias | Descriptive name for the recipient. |
void | AddAddresseeL | ( | TMsvRecipientType | aType, |
const TDesC & | aRealAddress | |||
) | [virtual] |
Reimplemented from CBaseMtm::AddAddresseeL(TMsvRecipientType,const TDesC &)
From CBaseMtm: Adds a typed addressee (To, Cc or Bcc).
Parameter | Description |
---|---|
aType | recipient type. Possible values:EMsvRecipientTo: Normal recipient.EMsvRecipientCc: Recipient of a carbon copy.EMsvRecipientBcc: Recipient of a blind carbon copy. |
aRealAddress | Address string without alias. |
void | AddAddresseeL | ( | TMsvRecipientType | aType, |
const TDesC & | aRealAddress, | |||
const TDesC & | aAlias | |||
) | [virtual] |
Reimplemented from CBaseMtm::AddAddresseeL(TMsvRecipientType,const TDesC &,const TDesC &)
From CBaseMtm: Adds a typed addressee (To, Cc or Bcc).
Parameter | Description |
---|---|
aType | recipient type. Possible values:EMsvRecipientTo: Normal recipient.EMsvRecipientCc: Recipient of a carbon copy.EMsvRecipientBcc: Recipient of a blind carbon copy. |
aRealAddress | Address string without alias. |
aAlias | Descriptive name for the recipient. |
void | AddAttachmentL | ( | const TDesC & | aFilePath, |
const TDesC8 & | aMimeType, | |||
TUint | aCharset, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
From CBaseMtm: Add a file attachment to the current message entry.
The attachment is referenced by its file path and is copied into the message store. This function needs an edit store for the current entry. The caller should not keep the store open. The store is committed and closed after each attachment operation. Only one asynchronous operation can be running at any one time.
If the file is a plain text file with ucs-2 character set MMS Engine will convert the character set to utf-8 and create a text attachment using this character set. The original file is not affected. This must be done because MMS text attachments should be sent using utf-8 character set.
TFileName attachmentFile( _L("c:\\pictures\\picture123.jpg") ); TBufC8<20> mimeType = _L8( "image/jpeg" ); TUint charset = 0; // no character set needed for images CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC(); iMmsClient->AddAttachmentL( attachmentFile, mimeType, charset, wait->iStatus); wait->Start(); if ( wait->iStatus.Int() != KErrNone ) { // error handling, e.g. leave } CleanupStack::PopAndDestroy(); // wait // The attachment has been added, store has been committed, and attachment data // has been copied to the message store. // If the original file is now modified, it does not affect the attachment file // in the message store any more.
Parameter | Description |
---|---|
aFilePath | Full path specification of the attachment file. |
aMimeType | Mime type of the attachment file. |
aCharset | IANA MIBEnum of the character set of the attachment. If character set is not relevant for current attachment type, aCharset should be 0. |
aStatus | The request status to complete. |
void | AddAttachmentL | ( | RFile & | aFile, |
const TDesC8 & | aMimeType, | |||
TUint | aCharset, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::AddAttachmentL(RFile &,const TDesC8 &,TUint,TRequestStatus &)
From CBaseMtm: Add a file attachment to the current message entry.
The attachment is referenced by an open file handle and is copied into the message store. This function needs an edit store for the current entry. The caller should not keep the store open. The store is committed and closed after each attachment operation.
If the file is a plain text file with ucs-2 character set MMS Engine will convert the character set to utf-8 and create a text attachment using this character set. The original file is not affected. This must be done because MMS text attachments should be sent using utf-8 character set.
TFileName attachmentFile( _L("c:\\private\\privatedir\\picture123.jpg") ); RFile fileHandle; TBufC8<20> mimeType = _L8( "image/jpeg" ); TUint charset = 0; // no character set needed for images fileHandle.Open( iFs, attachmentFile, EFileShareReadersOnly | EFileRead ); CleanupClosePush(fileHandle); CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC(); iMmsClient->AddAttachmentL( fileHandle, mimeType, charset, wait->iStatus); wait->Start(); if ( wait->iStatus.Int() != KErrNone ) { // error handling, e.g. leave } CleanupStack::PopAndDestroy(); // wait CleanupStack::Pop(); // file handle was closed if function did not leave
Parameter | Description |
---|---|
aFile | An open file handle for the file attachment. The handle is closed when the function completes. |
aMimeType | Mime type of the attachment file. |
aCharset | IANA MIBEnum of the character set of the attachment. If character set is not relevant for current attachment type, aCharset should be 0. |
aStatus | The request status to complete. |
Add attribute to an attribute array (for the use of MMS UI only).
Parameter | Description |
---|---|
aName | Name of the attribute (case sensitive). |
aValue | Value of the attribute. |
void | AddEntryAsAttachmentL | ( | TMsvId | aAttachmentId, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::AddEntryAsAttachmentL(TMsvId,TRequestStatus &)
From CBaseMtm: Add a message entry as an attachment to the current message entry.
void | AddLinkedAttachmentL | ( | const TDesC & | aFilePath, |
const TDesC8 & | aMimeType, | |||
TUint | aCharset, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::AddLinkedAttachmentL(const TDesC &,const TDesC8 &,TUint,TRequestStatus &)
From CBaseMtm: Add a file attachment to the current message entry as a linked file.
The attachment is referenced by its file path and is not copied into the message store. The attachment file is always used from its original location on disk indicated by the aFilePath parameter.
This function needs an edit store for the current entry. The caller should not keep the store open. The store is committed and closed after each attachment operation. Only one asynchronous operation can be running at any one time.
The file must be in some public directory so that MMS Engine can access the file when it is actually sent. If the file is a plain text attachment the character set cannot be converted to utf-8 as the original file cannot be changed. Text files should not be sent as linked attachmets unless the character set of the file is utf-8.
Parameter | Description |
---|---|
aFilePath | Full path specification of the attachment file. |
aMimeType | Mime type of the attachment file. |
aCharset | IANA MIBEnum of the character set of the attachment. If character set is not relevant for current attachment type, aCharset should be 0. |
aStatus | The request status to complete. |
void | BioTypeChangedL | ( | TUid | aBioTypeUid | ) | [virtual] |
Reimplemented from CBaseMtm::BioTypeChangedL(TUid)
From CBaseMtm: Inform Client MTM about bio type change.
This function does nothing.
CRichText & | Body | ( | ) | [inline] |
Reimplemented from CBaseMtm::Body()
From CBaseMtm: Get rich text body of the message.
MMS does not support separate message body. Body is ignored. All MMS message parts are attachments.
Returns: Rich text body from CBaseMtm.
const CRichText & | Body | ( | ) | const [inline] |
Reimplemented from CBaseMtm::Body()const
From CBaseMtm: Get rich text body.
MMS does not support separate message body. Body is ignored. All MMS message parts are attachments.
Returns: Rich text body from CBaseMtm.
void | CancelAttachmentOperation | ( | ) | [virtual] |
Reimplemented from CBaseMtm::CancelAttachmentOperation()
From CBaseMtm: Cancel the current attachment operation.
void | ChangeDefaultServiceL | ( | const TMsvId & | aService | ) | [virtual] |
Reimplemented from CBaseMtm::ChangeDefaultServiceL(const TMsvId &)
From CBaseMtm: Change default service.
Does nothing. Changing of default service not supported.
void | ContextEntrySwitched | ( | ) | [protected, virtual] |
Reimplemented from CBaseMtm::ContextEntrySwitched()
From CBaseMtm: Called after the context of this instance has been changed to another entry.
void | CreateAttachment2L | ( | CMsvStore & | aStore, |
RFile & | aFile, | |||
TDesC8 & | aMimeType, | |||
CMsvMimeHeaders & | aMimeHeaders, | |||
CMsvAttachment * | aAttachmentInfo, | |||
TMsvAttachmentId & | aAttaId | |||
) | [virtual] |
Create attachment entry and copy specified file to message store.
The user should call SaveMessageL after having added all attachments to update TMsvEntry of the message entry.
Content type, for example image
Content subtype, for example jpeg
Character set IANA MIBEnum value, for example 106 (utf-8). Should be defined only if the content type is text.
Content-id if the presentation part refers to the attachments by content-ids.
Suggested filename (name only, no path), the name that should be used to store the attachment and used as suggested filename when sending the message. If the suggested filename is not set, the name of the attachment file will be used.
Content-location if the presentation part refers to the attachments by using content-location. The content-location string must contain only us-ascii characters.
X-type parameters (if needed). These are always handled as pairs of a parameter name and parameter value. A descriptor at an even idex in the array (0, 2, 4, ...) represents the parameter name and a descriptor at an odd index (1, 3, 5, ...) represents the parameter value. If a parameter has no value, it must be indicated by an empty descriptor. The X-type parameter array must always contain an even number of elements.
// The following code shows a short example of how the attachement // creation proceeds. // Assume that the client entry is set to the message entry. // Attachments are added to the message entry one by one CMsvStore* store = iMmsClient->Entry().EditStoreL(); CleanupStack::PushL(store); CMsvAttachment* attaInfo = NULL; TMsvAttachmentId attaId = 0; RFile attaFile; // Set filename of attachment TFileName name( _L("C:\\pictures\\picture123.jpg") ); CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL(); CleanupStack::PushL( mimeHeaders ); // Set values to mime headers mimeHeaders->SetContentTypeL( _L8( "image") ); mimeHeaders->SetContentSubTypeL( _L8( "jpeg" ) ); _LIT8(KMimeType, "image/jpeg"); // CreateAttachment2L will set the content type to attachment Info // Open the attachment file for reading attaFile.Open( iFs, name, EFileShareReadersOnly | EFileRead ); CleanupClosePushL(attaFile); attaInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // attaInfo ownerhip will be transferred to Attachment Manager. // It must not be pushed onto the cleanupStack before calling // CreateAttachment2L. TMsvAttachmentId attaId = 0; iMmsClient->CreateAttachment2L( *store, // edit store attaFile, // open file handle KMimeType, // combination type like image/jpeg *mimeHeaders, attaInfo, attaId); // Now Attachment Manager owns the attaInfo attaInfo = NULL; CleanupStack::PopAndDestroy(); // attaFile.Close() CleanupStack::PopAndDestroy(); // mimeHeaders // Several attachments can be added before committing the store // Store must be committed before it is destroyed store->CommitL(); CleanupStack::PopAndDestroy(); // store
Parameter | Description |
---|---|
aStore | An open edit store for the message entry. Caller must commit and close the store when ready. (Several attachments can be added before committing the store.) |
aFile | Open file handle, source of the attachment. Caller must close the file afterwards. |
aMimeType | Mime type (content type) of the attachmet in format type/subtype, for example image/jpeg. |
aMimeHeaders | Mime headers for the attachment. If the content type is not defined in aMimeHeaders, the function adds the mime type and subtype from aMimeType. Suggested filename in aMimeHeaders is used as attachment name. |
aAttachmentInfo | Attachment into structure, must be initialized to CMsvAttachment::EMsvFile. If mime type is added into the attachment info, it must be of format type/subtype, for example image/jpeg. On return AttachmentInfo contains data about the attachment. Ownership of attachmentinfo is transferred to attachment manager, it must not be deleted by caller. It must not be put on cleanup stack either. MMS engine keeps it safe until the ownership has been transferred. |
aAttaId | Attachment id of the newly created attachment. |
void | CreateAttachmentL | ( | const TDesC & | aFileName, |
RFile & | aAttachmentFile, | |||
const TDesC8 & | aMimeType, | |||
TUint | aCharset, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::CreateAttachmentL(const TDesC &,RFile &,const TDesC8 &,TUint,TRequestStatus &)
From CBaseMtm: Create an attachment and return an open file handle for it.
This function needs an edit store for the current entry. The caller should not keep the store open. The store is committed and closed after each attachment operation. Only one asynchronous operation can be running at any one time.
TFileName attachmentFile( _L("picture123.jpg") ); RFile fileHandle; TBufC8<20> mimeType = _L8( "image/jpeg" ); TUint charset = 0; // no character set needed for images CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC(); iMmsClient->CreateAttachmentL( attachmentFile, fileHandle, mimeType, charset, wait->iStatus); wait->Start(); // When the function returns, the store has been committed // The attachment file handle is now open for writing the attachment data CleanupClosePush(fileHandle); if ( wait->iStatus.Int() != KErrNone ) { // error handling, e.g. leave } // write file content to open handle // ... CleanupStack::PopAndDestroy(); // close file handle CleanupStack::PopAndDestroy(); // wait
Parameter | Description |
---|---|
aFileName | Suggested filename. |
aAttachmentFile | An open file handle for read/write attachment file. The caller must close the handle. |
aMimeType | Mime type of the attachment file. |
aCharset | IANA MIBEnum of the character set of the attachment. If character set is not relevant for current attachment type, aCharset should be 0. |
aStatus | The request status to complete. |
void | CreateMessageL | ( | TMsvId | aServiceId | ) | [virtual] |
Reimplemented from CBaseMtm::CreateMessageL(TMsvId)
From CBaseMtm: Create an empty entry as the child of the current context.
Sets the new entry as current context. The entry will be invisible and under construction.
// Context must be set to parent folder for CreateMessageL // This example creates the message to drafts folder TMsvId serviceId = iMmsClient->DefaultServiceL(); iMmsClient->SwitchCurrentEntryL( KMsvDraftEntryId ); iMmsClient->CreateMessageL( serviceId ); // The message entry is invisible and in "In Preparation" state. // The context of CMmsClientMtm has now been switched to the new message entry. // The message entry is still completely empty. // Continue by adding data to the message // ...
Parameter | Description |
---|---|
aServiceId | Service id for the new entry. |
CMsvOperation * | CreateNewEntryL | ( | TMsvId | aDestination, |
TRequestStatus & | aCompletionStatus | |||
) | [virtual] |
Create a new message entry.
This function is suitable when the caller is an active object or the caller does not want to immediately change current context to the new message entry.
If the caller is not an active object and the caller wants the context of CMmsClientMtm to be immediately set to the new entry, it is simpler to call CreateMessageL.
See also: CMmsClientMtm::CreateMessageL
// This example shows usage with a caller that is not an active object, // so a separate waiter is needed. If the caller is an active object, // the caller gives its own status to the function and continues // execution in RunL function. CMsvOperation* myOperation = NULL; CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC(); // destinationId specifies the destination folder. myOperation = iMmsClient->CreateNewEntryL( destinationId, wait->iStatus ); CleanupStack::PushL( myOperation ); wait->Start(); if ( wait->iStatus.Int() != KErrNone ) { // error handling, e.g. leave } // Get the message id TPckgBuf<TMsvId> pkg; pkg.Copy( myOperation->ProgressL() ); TMsvId progress = pkg(); CleanupStack::PopAndDestroy(2); // myOperation, wait; // Load the new message iMmsClient->SwitchCurrentEntryL( progress ); // load the default values that were already intialized // when the message was created iMmsClient->LoadMessageL(); // continue adding data to the message // ...
Parameter | Description |
---|---|
aDestination | Target folder. |
aCompletionStatus | Reference to the status of an active object. This status will contain the relevant error code when the operation completes. |
Returns: Pointer to a message server operation (active object). When the message has been created the progress information of the operation provides the id of the created message in an 8-bit package buffer. While the operation is in progress the package will contain a null id (KMsvNullIndexEntryId). If there is an error while creating the message the message will be deleted and the package will contain a null id.
void | CreateServiceL | ( | ) | [virtual] |
Create new service entry.
Context is set to the new service entry. Currently a maximum of one service is created, and further requests do not create a new service entry. DeprecatedOnly one MMS service is supported and it is automatically created. Use DefaultServiceL() to get the id for the default service.
void | CreateTextAttachmentL | ( | CMsvStore & | aStore, |
TMsvAttachmentId & | aAttachmentId, | |||
const TDesC & | aText, | |||
const TDesC & | aFile, | |||
TBool | aConvertParagraphSeparator = ETrue | |||
) | [virtual] |
Create a text/plain attachment.
Creates a text attachment from text in a descriptor. Has option to convert all unicode paragraph separator marks to line feeds. Converts text from unicode (ucs-2) to utf-8 before storing it.
TFileName attachmentFile( _L("story.txt") ); CMsvStore* store = iMmsClient->Entry().EditStoreL(); CleanupStack::PushL(store); TMsvAttachmentId attaId = 0; TBufC<12> story = _L( "Hello world!" ); iMmsClient->CreateTextAttachmentL( *store, attaId, story, attachmentFile, ETrue ) // When the call returns the id of the attachment will be strored in attaId // caller must commit the store as several attachments could be added berore // committing the store. store->CommitL(); CleanupStack::PopAndDestroy(); // store
Parameter | Description |
---|---|
aStore | An open edit store. Caller must commit and close the store (several attachments can be added before committing store). |
aAttachmentId | Attachment id of the new attachment entry. |
aText | Unicode text to be added as a text/plain attachment. |
aFile | Suggested filename for the attachment. |
aConvertParagraphSeparator | Flag that tells the function to search for all 0x2029 characters (Unicode paragraph separator) and to replace them with 0x000d 0x000a (carriage return, line feed). Possible values:ETrue: Convert paragraph separators (default).EFalse: Do not convert paragraph separators. |
TMsvId | DefaultServiceL | ( | ) | const [virtual] |
Reimplemented from CBaseMtm::DefaultServiceL()const
From CBaseMtm: Return id of default service for this MTM type.
Only one MMS service is supported.
Returns: default service id.
void | DeleteAttribute | ( | const TDesC & | aName | ) | [virtual] |
Delete named attribute from list (for the use of MMS UI only).
Parameter | Description |
---|---|
aName | Name of the attribute (case sensitive). |
TTime | DeliveryDate | ( | ) | const [virtual] |
Get the delivery date of the message.
Returns: The date and time when the message will be (or was) delivered to the recipient by the MMSC (in UTC time). If the delivery date has not been defined, TTime(0) is returned.
TInt | DeliveryReport | ( | ) | const [virtual] |
Get the delivery report request setting of the message.
If the value is not defined, default value from MMS settings is used.
Returns: delivery report request setting. Possible values:EMmsYes: The user wants a delivery report.EMmsNo: The user does not want a delivery report.0: Setting has not been defined.
TTimeIntervalSeconds | DeliveryTimeInterval | ( | ) | const [virtual] |
Get the delivery time interval of the message.
Returns: The length of time in seconds after which the message will be delivered to the recipient by MMS Service Centre. If the delivery time interval is 0, it has not been defined.
CMsvEntry & | Entry | ( | ) | const [inline] |
Reimplemented from CBaseMtm::Entry()const
From CBaseMtm: Get reference to current entry.
Returns: Reference to entry instance.
TTime | ExpiryDate | ( | ) | const [virtual] |
Get the expiration date of the message.
Returns: The date and time when the message will expire. (in UTC time). If the expiration date has not been defined, TTime(0) will be returned.
TTimeIntervalSeconds | ExpiryInterval | ( | ) | const [virtual] |
Get the validity period of the message.
Returns: Storage time of the message in MMS Service Centre (in seconds). If the message cannot be delivered to the recipient within the validity period, it will be discarded. If the validity period is 0, it has not been defined.
CMsvOperation * | FetchAllL | ( | TRequestStatus & | aCompletionStatus, |
TBool | aForced = ETrue | |||
) | [virtual] |
Fetch pending MMS messages from MMS Service Centre to inbox.
If there are notifications in postponed state they are all fetched. If there are notification in inbox, they are not touched.
Parameter | Description |
---|---|
aCompletionStatus | iStatus member of an active object. It will be set as completed when the operating system has relayed the request to the server side of Symbian Messaging System. |
aForced | indicates if the messages should be fetched regardless of current mode settings.ETrue: User initiated fetch, use override.EFalse: Event triggered fetch, fetch only if settings allow. |
Returns: Pointer to an operation active object. The operation will complete when the retrieving has been successfully scheduled. The actual retrieving will happen in the background. If scheduling the fetch fails, the status of CMsvOperation will contain the relevant error code. The operation object must not be deleted before it completes.
TMsvPartList | Find | ( | const TDesC & | aTextToFind, |
TMsvPartList | aPartList | |||
) | [virtual] |
Reimplemented from CBaseMtm::Find(const TDesC &,TMsvPartList)
From CBaseMtm: Searches for specified text in selected parts of current message.
Parameter | Description |
---|---|
aTextToFind | Text to search for. |
aPartList | Flags specifying which parts to search. (defined in MTMDEF.H). Possible values:KMsvMessagePartPartBody: Ignored.KMsvMessagePartRecipient: Supported.KMsvMessagePartOriginator: Supported.KMsvMessagePartDescription: Supported.KMsvMessagePartDate: Ignored.KMsvMessagePartAttachments: Ignored. |
Returns: TMsvPartList bitmask specifies in which of the specified parts the text was found.
CMsvOperation * | ForwardL | ( | TMsvId | aDestination, |
TMsvPartList | aPartList, | |||
TRequestStatus & | aCompletionStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::ForwardL(TMsvId,TMsvPartList,TRequestStatus &)
From CBaseMtm: Forward current message to new recipient.
Parameter | Description |
---|---|
aDestination | Id of the folder where the new message is generated. |
aPartList | Flags specifying which standard message parts are to be included in the response. Possible values:KMsvMessagePartPartBody: Ignored.KMsvMessagePartRecipient: Ignored.KMsvMessagePartOriginator: Ignored.KMsvMessagePartDescription: Subject field is copied.KMsvMessagePartDate: Ignored.KMsvMessagePartAttachments: Ignored. Attachments are always automatically included when forwarding a message. |
aCompletionStatus | Status of an active object. This status will be set as completed when the operation completes. |
Returns: Pointer to an operation active object. The progress information provides the id of the created message when the operation is complete. If there was an error while creating the message, then the message will be deleted and the result will contain a null id. The operation object must not be deleted before it completes.
Reimplemented from CBaseMtm::HandleEntryEventL(TMsvEntryEvent,TAny *,TAny *,TAny *)
From CBaseMtm: React to changes
Parameter | Description |
---|---|
aEvent | Code that tells which event has occurred. Event codes defined in MSVAPI.H |
arg1 | Depends on Event |
arg2 | Depends on Event |
arg3 | Depends on Event |
TBool | HasContext | ( | ) | const [inline] |
Reimplemented from CBaseMtm::HasContext()const
From CBaseMtm: Query if entry context has been set.
Returns: Status, possible values:ETrue: Context has been set.EFalse: Context has not been set.
CMsvOperation * | InvokeAsyncFunctionL | ( | TInt | aFunctionId, |
const CMsvEntrySelection & | aSelection, | |||
TDes8 & | aParameter, | |||
TRequestStatus & | aCompletionStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::InvokeAsyncFunctionL(TInt,const CMsvEntrySelection &,TDes8 &,TRequestStatus &)
From CBaseMtm: Pass an asychronous request to Server MTM.
Pass a function code to Server MTM. The operation will run in the background. This function can be used to invoke asynchronous protocol-specific operations. The supported functions are private and this function should be called by MMS UI only.
Parameter | Description |
---|---|
aFunctionId | Enumeration constant defining the operation. |
aSelection | Array of message entry ids to be uperated on. |
aParameter | A descriptor that contains any parameters required by function specified by aFunctionId. |
aCompletionStatus | Status of an active object. This status will be set as completed when the operation completes |
Returns: Pointer to a message server operation (active object).
void | InvokeSyncFunctionL | ( | TInt | aFunctionId, |
const CMsvEntrySelection & | aSelection, | |||
TDes8 & | aParameter | |||
) | [virtual] |
Reimplemented from CBaseMtm::InvokeSyncFunctionL(TInt,const CMsvEntrySelection &,TDes8 &)
From CBaseMtm: Pass a request to MMS Server MTM.
Pass a function code to Server MTM, wait until the function returns. This function can be used to invoke synchronous protocol-specific operations. The supported functions are private and this function should be called by MMS UI only.
Parameter | Description |
---|---|
aFunctionId | Enumeration constant defining the operation. |
aSelection | Array of message entry ids to be operated on. |
aParameter | A descriptor that contains any parameters required by function specified by aFunctionId. |
CMsvEntrySelection * | ListNotificationsInInboxL | ( | ) | [protected] |
Returns: selection of Notifications in inbox.
void | LoadMessageL | ( | ) | [virtual] |
Reimplemented from CBaseMtm::LoadMessageL()
From CBaseMtm: Restore current entry data.
TInt | MessageClass | ( | ) | const [virtual] |
Get the message class.
Returns: Message class. Possible values:EMmsClassPersonal: Message is a normal person-to-person message (default).EMmsClassAdvertisement: Message contains an advertisement.EMmsClassInformational: Message contains data from an information service.EMmsClassAuto: Message has been automatically generated by the phone. This class is only valid for a message that is a read report to another message.0: Message class has not been defined. Handle as EMmsClassPersonal.
TPtrC8 | MessageContentLocation | ( | ) | const [virtual] |
Get the Uri from which the message can be fetched.
This is valid only for a nofification.
Returns: Content location of the actual message, the Uri from which the message is fetched from MMS Service Centre.
TInt | MessagePriority | ( | ) | const [virtual] |
Get the priority of the message.
Returns: Message priority, possible values:EMmsPriorityLow: Low priority.EMmsPriorityNormal: Normal priority.EMmsPriorityHigh: High priority.0: Priority has not been defined, treat as EMmsPriorityNormal
TTime | MessageReceiveTime | ( | ) | const [virtual] |
Get the time when the message was received in the terminal.
Returns: Time of the arrival of the message (in UTC time). If the time has not been defined, TTime(0) is returned.
TMsvAttachmentId | MessageRootAttachment | ( | ) | const [virtual] |
Get the id of the root part of the message.
Returns: Id of the attachment that starts the message display, KMsvNullIndexEntryId if the root part has not been defined.
TInt32 | MessageSize | ( | ) | [virtual] |
Get the message size.
SaveMessageL and LoadMessageL updates the value. This function returns the total amount of disk space the message takes. The actual message size in transmission is smaller due to binary encoding of the headers.
Returns: size of all message parts in bytes including both attachments and internal header structures.
TInt | MessageTransferSize | ( | ) | const [virtual] |
Get the incoming message size.
This is valid only for a notification.
Returns: Message size in octets as specified in MMS Notification.
const CMmsSettings & | MmsSettings | ( | ) | [virtual] |
Get a reference to CMmsSettings class.
This method should be used by MMS UI only. Other applications should not touch the MMS settings. The methods are needed in MMS Client API to allow MMS UI to inform MMS Client MTM about changed settings.
The contents of the class are those used by MMS Client MTM when constructing a message. If the settings must be changed, a copy must be made, and SetSettingsL function used to deliver the settings to MMS Client MTM.
// Usage: CMmsSettings* settings = CMmsSettings::NewL(); CleanupStack::PushL( settings ); iMmsClient->RestoreSettingsL(); settings->CopyL( iMmsClient->MmsSettings() ); // change settings here... // The settings are changed using CMmsSettings API iMmsClient->SetSettingsL( *settings ); iMmsClient->StoreSettingsL(); CleanupStack::PopAndDestroy(); // settings
Returns: constant reference to iMmsSettings member of CMmsClientMtm.
IMPORT_C CMmsClientMtm * | NewL | ( | CRegisteredMtmDll & | aRegisteredMtmDll, |
CMsvSession & | aSession | |||
) | [static] |
Factory function.
The only function exported by this polymorphic interface dll. This function is not directly called by the application that needs access, it is called by an instance of CClientMtmRegistry class.
Parameter | Description |
---|---|
aRegisteredMtmDll | Mtm Dll registry class |
aSession | Message Server session. |
Returns: Pointer to CMmsClientMtm class.
TInt | NumberOfPreviousSenders | ( | ) | const [virtual] |
Get number of times the message has been forwarded.
Returns the number of previous senders in case of a message that has been forwarded from one terminal to another based on the MMS notification only without retrieving the actual message to the terminal first.
Returns: Number of times the message has been forwarded.
Get the address of a previous sender.
The addresses of the previous senders are defined for messages that have been forwarded without fetching them to the terminal first.
Parameter | Description |
---|---|
aSequenceNumber | Indicates the number of the sender in the sequence. 1 is the first sender, a higher number indicates a later sender. |
Returns: Address of the specified previous sender. If the sequence number exceeds the number of senders or is less than 1, an empty string is returned.
Get the time when the message was previously sent (in UTC time).
The function is valid only for messages that have been forwarded without fetching them to the terminal first.
Parameter | Description |
---|---|
aSequenceNumber | Indicates the number of the sender in the sequence. 1 is the first sender, a higher number indicates a later sender. |
Returns: Time of the previous sending (in UTC time). If the sequence number exceeds the number of senders or is less than 1, TTime(0) is returned.
Reimplemented from CBaseMtm::QueryCapability(TUid,TInt &)
From CBaseMtm: Query capabilities of MTM.
Parameter | Description |
---|---|
aCapability | UID specifying which capablity is queried. For the possible Capability UIDs and types of return values see mtmuids.h |
aResponse | The value describing the capability at return. |
Returns: error code, Possible values:KErrNone: Specified capability is supported and aResponse contains the value of the capability if available.KErrNotSupported: Capability is not supported.
TInt | ReadReply | ( | ) | const [virtual] |
Get the read report request setting of the message.
Specifies if the sender wants a read report for current message. If this value is yes and the message has been received by the phone (has "KMmsMessageMobileTerminated" flag) a read report should be sent to the sender of this message when the message is opened for the first time.
Returns: read report request setting. Possible values:EMmsYes: The user wants a read report.EMmsNo: The user does not want a read report.0: Setting has not been defined. Do not send a read report.
void | RemoveAddressee | ( | TInt | aIndex | ) | [virtual] |
Reimplemented from CBaseMtm::RemoveAddressee(TInt)
From CBaseMtm: Removes an entry from addressee list.
Cannot distinguish To, Cc and Bcc.
Parameter | Description |
---|---|
aIndex | Index to the array of addresses from AddresseeList() function. |
void | RemoveDefaultServiceL | ( | ) | [virtual] |
Reimplemented from CBaseMtm::RemoveDefaultServiceL()
From CBaseMtm: Remove default service.
Does nothing. Deletion of service not supported.
CMsvOperation * | ReplyL | ( | TMsvId | aDestination, |
TMsvPartList | aPartlist, | |||
TRequestStatus & | aCompletionStatus | |||
) | [virtual] |
Reimplemented from CBaseMtm::ReplyL(TMsvId,TMsvPartList,TRequestStatus &)
From CBaseMtm: Send a reply to current message.
Parameter | Description |
---|---|
aDestination | Id of the folder where the reply is generated. |
aPartlist | Flags specifying which standard message parts are to be included in the response (defined in MTMDEF.H). Following values are possible:KMsvMessagePartPartBody: Ignored.KMsvMessagePartRecipient: Causes reply-to-all. Otherwise reply-to-sender only.KMsvMessagePartOriginator: Ignored.KMsvMessagePartDescription: Subject field is copied.KMsvMessagePartDate: Ignored.KMsvMessagePartAttachments: Ignored. Attachments are never copied to a reply. |
aCompletionStatus | Status of an active object. This status will be set as completed when the operation completes. |
Returns: Pointer to an operation active object. The progress information provides the id of the created message when the operation is complete. If there was an error while creating the message, then the message will be deleted and the result will contain a null id. The operation object must not be deleted before it completes.
void | ResetAttributes | ( | ) | [virtual] |
Reset all attributes (for the use of MMS UI only).
Removes all attributes (names and values) from the message.
TInt | ResponseStatus | ( | ) | const [virtual] |
Get the response status value from the message.
This function returns the status MMS Service Centre has sent with a retrieved message or as a response to a failure to send a message. The status code may be used in case of permanent failures to retrieve or failures to send to indicate the reason of the failure.
Returns: Status code sent by MMS Service Centre. Possible values are defined in OMA MMS Encapsulations specifications, and depend on the version of the MMS Service Centre sending the response.Error codes 128 - 136 denote legacy errors from MMS encapsulation version 1.0Error codes 192 - 223 denote transient failures.Error codes 224 - 255 denote permanent failures.0 means the response status has not been set. Either the operation was successful or the cause of the failure was not set by MMS Service Centre.
TPtrC | ResponseText | ( | ) | const [virtual] |
Get the response text from the message.
Valid only in cases a response text has been obtained from MMS Service Centre. Possible cases are received messages and messages whose senging has failed. The text may explain the cause of the failure.
Returns: Response text string. If text is not defined, returns an empty string.
void | RestoreFactorySettingsL | ( | TMmsFactorySettingsLevel | aLevel = EMmsFactorySettingsLevelNormal | ) | [virtual] |
Restore factory settings.
Restore settings from ROM to the default service entry and select it as the current service entry. DeprecatedMMS UI should restore the factory settings directly.
Parameter | Description |
---|---|
aLevel | Defines the operations to be done. |
void | RestoreSettingsL | ( | ) | [virtual] |
Load settings from disk.
This method should be used by MMS UI only. Other applications should not touch the MMS settings.
void | SaveMessageL | ( | ) | [virtual] |
Reimplemented from CBaseMtm::SaveMessageL()
From CBaseMtm: Store current entry data.
CMsvOperation * | SendL | ( | TRequestStatus & | aCompletionStatus, |
const TTime | aSendingTime = TTime(0) | |||
) | [virtual] |
Send current message in the background.
The message is automatically moved to Outbox folder before the sending starts.
Parameter | Description |
---|---|
aCompletionStatus | iStatus member of an active object. It will be set as completed when the operating system has relayed the request to the server side of Symbian Messaging System. |
aSendingTime | Time at which the message is to be sent given as UTC time. If aSending time is zero or in the past, the message is scheduled to be sent as soon as possible. |
Returns: Pointer to an operation active object. The operation will complete when the sending has been successfully scheduled. The actual sending will happen in the background. If scheduling the send fails, the status of CMsvOperation will contain the relevant error code. The operation object must not be deleted before it completes.
CMsvOperation * | SendL | ( | CMsvEntrySelection & | aSelection, |
TRequestStatus & | aCompletionStatus, | |||
TTime | aSendingTime = TTime(0) | |||
) | [virtual] |
Send a selection of messages in the background.
The messages are moved to Outbox folder before the sending starts. All messages must be in the same place originally (all in drafts, or all in outbox, for example).
Parameter | Description |
---|---|
aSelection | List of messages to be sent. |
aCompletionStatus | iStatus member of an active object. It will be set as completed when the operating system has relayed the request to the server side of Symbian Messaging System. |
aSendingTime | Time at which the message selection is to be sent given as UTC time. If aSending time is zero or in the past, the message is scheduled to be sent as soon as possible. |
Returns: Pointer to an operation active object. The operation will complete when the sending has been successfully scheduled. The actual sending will happen in the background. If scheduling the send fails, the status of CMsvOperation will contain the relevant error code. The operation object must not be deleted before it completes.
CMsvOperation * | SendReadReportL | ( | TMsvId | aReadMessageId, |
TRequestStatus & | aCompletionStatus, | |||
TMmsReadStatus | aReadStatus = EMmsReadStatusRead | |||
) | [virtual] |
Send a read report to the sender of a message.
This function should be called when a new message is opened and the sender of the message has specified that he wants a read report for the message in question. This function should not be called if the settings indicate that sending read reports is not allowed.
Parameter | Description |
---|---|
aReadMessageId | Id of the message for which a read report should be sent. The message must not be locked and the caller should not have CMsvStore open for the message as MMS Client Mtm must be able to read header fields from the original message. |
aCompletionStatus | iStatus member of an active object. It will be set as completed when the operating system has relayed the request to the server side of Symbian Messaging System. |
aReadStatus | indicates if the message was read Possible values:EMmsReadStatusRead: The message was read.EMmsReadStatusDeletedWithoutBeingRead: The message was deleted without being read. |
Returns: Pointer to an operation active object. The operation will complete when the sending of the read report has been successfully scheduled. The actual sending will happen in the background. If scheduling the send fails, the status of CMsvOperation will contain the relevant error code. If the sender of the message has not requested a read report or read report sending is not allowed, the operation completes with error code KErrGeneral. The operation object must not be deleted before it completes.
const TPtrC | Sender | ( | ) | const [virtual] |
Get the sender of the message.
Returns: Address of the sender of the message (for example phone number). If the sender has not been defined, returns an empty string.
TInt | SenderVisibility | ( | ) | const [virtual] |
Get the sender visibility setting of the message.
Indicates whether the MMS Service Centre should hide the sender's phone number from the recipient. The default is show the sender's number unless the server has a secret number.
Returns: visibility setting. Possible values:EMmsSenderVisibilityDefault: Default visibility.EMmsSenderVisibilityHide: Hide the sender's number.EMmsSenderVisibilityShow: Show the sender's number even if it is a secret number.0: Sender visibilty has not been defined, use default.
TTime | SendingDate | ( | ) | const [virtual] |
Get the sending date and time of the message. Valid only for messages received by the phone.
Returns: the time when MMS Service Centre has received the message from sender (in UTC time). If the time has not been defined, returns TTime(0).
CMsvSession & | Session | ( | ) | [inline] |
Reimplemented from CBaseMtm::Session()
From CBaseMtm: Return session that was set at initialization.
Returns: Reference to Message Server session object.
void | SetCurrentEntryL | ( | CMsvEntry * | aEntry | ) | [inline] |
Reimplemented from CBaseMtm::SetCurrentEntryL(CMsvEntry *)
From CBaseMtm: Set current context.
Parameter | Description |
---|---|
aEntry | Pointer to entry instance. |
void | SetDeliveryDate | ( | TTime | aDate | ) | [virtual] |
Set the delivery date for the message.
Parameter | Description |
---|---|
aDate | The date and time when the message will be delivered to the recipient by the MMSC (in UTC time). The date must be later than 1970-01-01, 00:00:00 GMT. If neither delivery time interval or delivery date have been defined, MMS Service Centre will deliver the message immediately. |
void | SetDeliveryReport | ( | TMmsYesNo | aRequest | ) | [virtual] |
Set the delivery report request setting value for the message.
If the value is not set, default value from MMS settings will be used.
Parameter | Description |
---|---|
aRequest | tells if the user wants a delivery report for this message. Possible values:EMmsYes: The user wants a delivery report.EMmsNo: The user does not want a delivery report. |
void | SetDeliveryTimeInterval | ( | TTimeIntervalSeconds | aInterval | ) | [virtual] |
Set the delivery time interval for the message.
Parameter | Description |
---|---|
aInterval | The length of time in seconds after which the message will be delivered to the recipient by the MMS Service Centre. If neither delivery time interval or delivery date have been defined, MMS Service Centre will deliver the message immediately. |
void | SetExpiryDate | ( | TTime | aDate | ) | [virtual] |
Set the expiration date of the message.
Parameter | Description |
---|---|
aDate | The date and time when the message will expire (In UTC time). The date must be later than 1970-01-01, 00:00:00 GMT If the MMS Service Centre cannot deliver the message to the recipient before the expiration date, the message will be discarded. If expiration date or validity period have not been defined, default is used. |
void | SetExpiryInterval | ( | TTimeIntervalSeconds | aInterval | ) | [virtual] |
Set the validity period of the message.
If the validity period is not defined for the message, default validity period from MMS settings or MMS Service Centre will be used.
Parameter | Description |
---|---|
aInterval | The length of time in seconds after which the message will be discarded by MMS Service Centre. MMSC may limit the maximum length of the validity period. |
void | SetMessageClass | ( | TMmsMessageClass | aMessageClass | ) | [virtual] |
Set the message class.
If message class is not explicitly set, the message will have class "Personal" by default.
Parameter | Description |
---|---|
aMessageClass | Message class code. Possible values:EMmsClassPersonal: Message is a normal person-to-person message (default).EMmsClassAdvertisement: Message contains an advertisement.EMmsClassInformational: Message contains data from an information service.EMmsClassAuto: Message has been automatically generated by the phone. This class is only valid for a message that is a read report to another message. |
void | SetMessageDescriptionL | ( | const TDesC & | aText | ) | [virtual] |
Set the message description string.
This provides a method to override the default message description. The next SaveMessageL saves the description text in the TMsvEntry::iDescription field. This field is shown in Message Centre message lists to describe the contents of the message. Normally it is the message subject, but if there is no subject in the message, the caller may set some text from a text part of the message as the description.
Note that this method does not check the text length, so avoid long descriptions to minimize memory usage.
Parameter | Description |
---|---|
aText | Message description |
void | SetMessagePriority | ( | TMmsMessagePriority | aPriority | ) | [virtual] |
Set the priority of the message.
If the priority of the message is not set, the default priority will be "normal".
Parameter | Description |
---|---|
aPriority | Message priority, possible values:EMmsPriorityLow: Low priority.EMmsPriorityNormal: Normal priority.EMmsPriorityHigh: High priority. |
void | SetMessageRootL | ( | const TMsvAttachmentId | aId | ) | [virtual] |
Set id of the root part of the message.
Parameter | Description |
---|---|
aId | Attachment Id of the message part which controls the display of the message. Should point to the SMIL part if present. |
void | SetReadReply | ( | TMmsYesNo | aRequest | ) | [virtual] |
Set the read report request setting value for the message.
Specifies if the user wants a read report for the current message. If this value is Yes, the recipient phone should send a read report when the user opens the message for the first time.
Parameter | Description |
---|---|
aRequest | read report request setting. Possible values:EMmsYes: The user wants a read report.EMmsNo: The user does not want a read report. |
void | SetSenderL | ( | const TDesC & | aAlias | ) | [virtual] |
Set the sender of the message.
If the sender of the message is not explicitly defined, the Proxy-Relay or MMS Service Centre will add the sender's phone number.
Parameter | Description |
---|---|
aAlias | The phone number of the sender of the message. Maximum length 256 characters. This string will be included as the sender of the message when the message is sent, but the MMS Service Centre will check the validity of the value and replace it with the actual phone number of the sender if it is not correct. |
void | SetSenderVisibility | ( | TMmsMessageSenderVisibility | aVisibility | ) | [virtual] |
Set the sender visibility setting for the message.
Indicates whether the MMS Service Centre should hide the sender's phone number from the recipient. If the value is not defined, default is used. The default is to show the sender's number unless the sender has a secret number.
Parameter | Description |
---|---|
aVisibility | Visibility of the sender's phone number to the recipient. Possible values:EMmsSenderVisibilityDefault: Use default visibility.EMmsSenderVisibilityHide: Hide the sender's number.EMmsSenderVisibilityShow: Show the sender's number even if it is a secret number. |
void | SetSettingsL | ( | const CMmsSettings & | aSettings | ) | [virtual] |
Copy the values from aSettings to CMmsClientMtm.
This method should be used by MMS UI only. Other applications should not touch the MMS settings.
Used to provide new settings to MMS Client MTM when settings have been changed. Will affect only messages created after the settings have been changed.
Use function StoreSettingsL to save the settings on disk.
Parameter | Description |
---|---|
aSettings | New values for CMmsSettings |
void | SetSubjectL | ( | const TDesC & | aSubject | ) | [virtual] |
Reimplemented from CBaseMtm::SetSubjectL(const TDesC &)
From CBaseMtm: Set message subject.
Parameter | Description |
---|---|
aSubject | Message subject. |
void | StoreSettingsL | ( | ) | [virtual] |
Save settings to disk.
This method should be used by MMS UI only. Other applications should not touch the MMS settings.
const TPtrC | SubjectL | ( | ) | const [virtual] |
Reimplemented from CBaseMtm::SubjectL()const
From CBaseMtm: Get message subject.
Returns: Message subject.
void | SwitchCurrentEntryL | ( | TMsvId | aId | ) | [inline] |
Reimplemented from CBaseMtm::SwitchCurrentEntryL(TMsvId)
From CBaseMtm: Switch context to entry defined by aId.
Parameter | Description |
---|---|
aId | Entry id in message store. |
TUid | Type | ( | ) | const [inline] |
Reimplemented from CBaseMtm::Type()const
From CBaseMtm: Return type of this Mtm.
Returns: Registered Mtm type.
TMsvPartList | ValidateMessage | ( | TMsvPartList | aPartList | ) | [virtual] |
Reimplemented from CBaseMtm::ValidateMessage(TMsvPartList)
From CBaseMtm: Checks that selected parts of current message are legal.
Parameter | Description |
---|---|
aPartList | Flags specifying which parts to validate. (defined in MTMDEF.H). Possible values:KMsvMessagePartPartBody: Ignored. MMS engine does not support separate message body.KMsvMessagePartRecipient: Supported.KMsvMessagePartOriginator Supported.KMsvMessagePartDescription: Ignored. Description is always validKMsvMessagePartDate: Ignored. Date is always validKMsvMessagePartAttachments: Supported. |
Returns: TMsvPartList bitmask identifies each invalid part. If all parts are valid, returned value is 0.
Validate service.
Checks that access point refers to a valid entry in comms database.
Parameter | Description |
---|---|
aServiceId | Id of the MMS service |
Returns: Error code.KErrNone: The service is OK.KErrNotFound: The service id is incorrect.KMmsErrorInvalidSettings: The settings contain invalid values. This error is possible only if the settings file has been corrupted.KMmsErrorNoWAPAccessPoint: No access point has been defined.KMmsErrorAP1Invalid: MMS access point refers to an invalid entry in comms database.KMmsErrorNoURI1: Home page has not been defined for MMS access point