#include <app/miutmsg.h>
class MImURITranslator |
Public Member Functions | |
---|---|
pure virtual void | FindUniversalResourceIdentifierFileHandleL(TMsvId, const TDesC &, const TDesC &, TRequestStatus &) |
pure virtual void | FindUniversalResourceIdentifierL(TMsvId, const TDesC &, const TDesC &, TRequestStatus &) |
pure virtual TInt | GetUniversalResourceIdentifierFileHandle(TMsvId &, RFile &) |
pure virtual HBufC * | GetUniversalResourceIdentifierL(TMsvId &, TBool &) |
Translates a URI in an MHTML message into a message body part file name.
MHTML messages may contain multiple HTML body parts. Each of these body parts is able to reference another body part within the same multipart structure, or a body part within a parent multipart structure [RFC2110]. These references are called URI's.
When an MHTML message is parsed by the message engine, the HTML body of each part is stored as a binary file. This interface provides a means of finding the file name of the body part that corresponds to a given a URI.
The URI resolving process has the potential to become time consuming, therefore it is broken into two steps:
Resolve asynchronously the relative URI into an absolute URI. The message body parts are recursively searched in order to find an absolute base for the relative URI [RFC2110, RFC1808].
Once a relative URI has been resolved in to an absolute URI, then the message is searched for a body part that corresponds to it [RFC2110].
If no matching body part can be found, then the absolute URI is returned to the caller in place of the filename. This absolute URI should be used to search for the required data externally, for example by using HTTP.
See also: CImEmailMessage
void | FindUniversalResourceIdentifierFileHandleL | ( | TMsvId | aMessageId, |
const TDesC & | aBase, | |||
const TDesC & | aURI, | |||
TRequestStatus & | aStatus | |||
) | [pure virtual] |
Starts an asynchronous operation to resolve a specified URI.
Parameter | Description |
---|---|
aMessageId | The ID of the body part containing the URI which is to be resolved. CImEmailMessage::FindFirstHTMLPageFileHandleL() can be used to find the aMessageId parameter for the first HTML page in a message. |
aBase | The base parameter from the HTML part that contains the URI to be resolved. If there is no base parameter in the HTML, then an empty descriptor should be passed in. |
aURI | The URI to be resolved. |
aStatus | Asynchronous status word |
void | FindUniversalResourceIdentifierL | ( | TMsvId | aMessageId, |
const TDesC & | rBase, | |||
const TDesC & | rURI, | |||
TRequestStatus & | aStatus | |||
) | [pure virtual] |
Starts an asynchronous operation to resolve a specified URI.
Parameter | Description |
---|---|
aMessageId | The ID of the body part containing the URI which is to be resolved. CImEmailMessage::FindFirstHTMLPageL() can be used to find the aMessageId parameter for the first HTML page in a message. |
rBase | The base parameter from the HTML part that contains the URI to be resolved. If there is no base parameter in the HTML, then an empty descriptor should be passed in. |
rURI | The URI to be resolved. |
aStatus | Asynchronous status word |
TInt | GetUniversalResourceIdentifierFileHandle | ( | TMsvId & | aLinkedEntryId, |
RFile & | aFile | |||
) | const [pure virtual] |
Gets the results after a search.
Parameter | Description |
---|---|
aLinkedEntryId | On return, the message ID of the linked body part, providing one is found. Note that you should keep a record of the returned message ID as it is required for resolving any URI's that may be found in the linked body part. |
aFile | On return, the file handle corresponding to the URI if successful. If not successful, then this is not valid. |
Returns: KErrNone if successful and therefore aFile contains the filehandle that corresponds to the URI. An error code if unsuccessful and therefore aFile is not valid.
HBufC * | GetUniversalResourceIdentifierL | ( | TMsvId & | aLinkedEntryId, |
TBool & | aFileFound | |||
) | const [pure virtual] |
Gets the results after a search.
Parameter | Description |
---|---|
aLinkedEntryId | On return, the message ID of the linked body part, providing one is found. Note that you should keep a record of the returned message ID as it is required for resolving any URI's that may be found in the linked body part. |
aFileFound | On return, true if a linked body part has been found. It is set to false otherwise. |
Returns: If successful, the filename that corresponds to the URI, or the absolute URI if no matching file can be found. If failed, NULL.