Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: MIUTHDR.H
Link against: imcm.lib

Class CImHeader

class CImHeader : public CBase;

Description

Encapsulates an Internet Mail (RFC822) header.

Note that the class contains some obsolete functions that take a narrow descriptor: always use the equivalent wide descriptor function instead.

Derivation

Members

Defined in CImHeader:
AddEncodingInfoL(), BccRecipients(), BccRecipients(), BodyEncoding(), CcRecipients(), CcRecipients(), Charset(), CreateForwardL(), CreateReceiptL(), CreateReplyL(), DataSize(), EAll, EOriginator, ERecipients, ESender, EncodingInfo(), EncodingInfo(), ExternalizeL(), From(), ImMsgId(), InReplyTo(), InternalizeL(), NewLC(), OverrideCharset(), ReDecodeL(), ReceiptAddress(), RemoteSize(), ReplyTo(), ResentBccRecipients(), ResentBccRecipients(), ResentCcRecipients(), ResentCcRecipients(), ResentFrom(), ResentMsgId(), ResentToRecipients(), ResentToRecipients(), Reset(), RestoreL(), SetBodyEncoding(), SetCharset(), SetFromL(), SetFromL(), SetImMsgIdL(), SetInReplyToL(), SetOverrideCharset(), SetReceiptAddressL(), SetReceiptAddressL(), SetRemoteSize(), SetReplyToL(), SetReplyToL(), SetResentFromL(), SetResentMsgIdL(), SetSubjectL(), SetSubjectL(), SetVersion(), StoreL(), StoreWithoutCommitL(), Subject(), TReplyTo, ToRecipients(), ToRecipients(), Version(), ~CImHeader()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewLC()

static IMPORT_C CImHeader *NewLC();

Description

Allocates and creates a new CImHeader object, leaving the object on the cleanup stack.

Return value

CImHeader *

New CImHeader object


~CImHeader()

IMPORT_C ~CImHeader();

Description

Destructor.

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

Resets all header field values.


InternalizeL()

IMPORT_C void InternalizeL(RMsvReadStream &aReadStream);

Description

Internalises the settings from a specified stream.

Parameters

RMsvReadStream &aReadStream

Stream to read from


ExternalizeL()

IMPORT_C void ExternalizeL(RMsvWriteStream &aWriteStream) const;

Description

Externalises the settings to a specified stream.

Parameters

RMsvWriteStream &aWriteStream

Stream to write to


RestoreL()

IMPORT_C void RestoreL(CMsvStore &aMessageStore);

Description

Restores settings from a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to read from


StoreL()

IMPORT_C void StoreL(CMsvStore &aMessageStore) const;

Description

Stores, but does not commit, settings to a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to write to


StoreWithoutCommitL()

IMPORT_C void StoreWithoutCommitL(CMsvStore &aMessageStore) const;

Description

Stores, but does not commit, settings to a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to write to


Subject()

IMPORT_C const TPtrC Subject() const;

Description

Gets the "Subject" header field.

Return value

const TPtrC

Field value


SetSubjectL()

IMPORT_C void SetSubjectL(const TDesC8 &aSubject);

Description

Sets the "Subject" header field.

Parameters

const TDesC8 &aSubject

Field value


ImMsgId()

IMPORT_C const TPtrC8 ImMsgId() const;

Description

Gets the "MessageId" header field.

Return value

const TPtrC8

Field value


SetImMsgIdL()

IMPORT_C void SetImMsgIdL(const TDesC8 &aImMsgIdL);

Description

Sets the "MessageId" header field.

Parameters

const TDesC8 &aImMsgIdL

Field value


From()

IMPORT_C const TPtrC From() const;

Description

Gets the "From" header field.

This consists of an address and (possibly) an alias.

Return value

const TPtrC

Field value


SetFromL()

IMPORT_C void SetFromL(const TDesC8 &aFrom);

Description

Sets the "From" header field.

Parameters

const TDesC8 &aFrom

Field value


ReplyTo()

IMPORT_C const TPtrC ReplyTo() const;

Description

Gets the "ReplyTo" header field.

Return value

const TPtrC

Field value


SetReplyToL()

IMPORT_C void SetReplyToL(const TDesC8 &aReplyTo);

Description

Sets the "ReplyTo" header field.

Parameters

const TDesC8 &aReplyTo

Field value


ReceiptAddress()

IMPORT_C const TPtrC ReceiptAddress() const;

Description

Gets the "Receipt" header field.

Return value

const TPtrC

Field value


SetReceiptAddressL()

IMPORT_C void SetReceiptAddressL(const TDesC8 &aReceiptAddress);

Description

Sets the "Receipt" header field.

Parameters

const TDesC8 &aReceiptAddress

Field value


Charset()

IMPORT_C TUint Charset() const;

Description

Gets the character set to use when sending the message header.

If set, this overrides the default system character set for sending the header.

Character set and encoding options can also be set on a per header field basis using TImHeaderEncodingInfo objects. See EncodingInfo().

Return value

TUint

Identifier for the character set. Character sets idenitifiers are defined by the character conversion API in charconv.h.

See also:


SetCharset()

IMPORT_C void SetCharset(const TUint aCharset);

Description

Sets the character set to use when sending the message header.

This setting overrides the default system character set for sending the header.

Character set and encoding options can also be set on a per header field basis using TImHeaderEncodingInfo objects. See AddEncodingInfoL().

Parameters

const TUint aCharset

Identifier for the character set. Character sets idenitifiers are defined by the character conversion API in charconv.h.

See also:


SetFromL()

IMPORT_C void SetFromL(const TDesC16 &aFrom);

Description

Sets the "From" header field.

Parameters

const TDesC16 &aFrom

Field value


SetReplyToL()

IMPORT_C void SetReplyToL(const TDesC16 &aReplyTo);

Description

Sets the "ReplyTo" header field.

Parameters

const TDesC16 &aReplyTo

Field value


SetReceiptAddressL()

IMPORT_C void SetReceiptAddressL(const TDesC16 &aReceiptAddress);

Description

Sets the "Receipt" header field.

Parameters

const TDesC16 &aReceiptAddress

Field value


SetSubjectL()

IMPORT_C void SetSubjectL(const TDesC16 &aSubject);

Description

Sets the "Subject" header field.

Parameters

const TDesC16 &aSubject

Field value


DataSize()

IMPORT_C TInt DataSize();

Description

Gets the combined length of all the field values stored.

Return value

TInt

Combined length


RemoteSize()

inline const TUint RemoteSize() const;

Description

Return value

const TUint


SetRemoteSize()

inline void SetRemoteSize(TUint aSize);

Description

Parameters

TUint aSize


Version()

inline const TUint16 Version() const;

Description

Return value

const TUint16


SetVersion()

inline void SetVersion(TUint16 aVersion);

Description

Parameters

TUint16 aVersion


ToRecipients()

inline const CDesCArray &ToRecipients() const;

Description

Gets a const list of "To" recipients.

Return value

const CDesCArray &

Recipient list


CcRecipients()

inline const CDesCArray &CcRecipients() const;

Description

Gets a const list of "Cc" recipients.

Return value

const CDesCArray &

Recipient list


BccRecipients()

inline const CDesCArray &BccRecipients() const;

Description

Gets a const list of "Bcc" recipients.

Return value

const CDesCArray &

Recipient list


ToRecipients()

inline CDesCArray &ToRecipients();

Description

Gets a list of "To" recipients.

Return value

CDesCArray &

Recipient list


CcRecipients()

inline CDesCArray &CcRecipients();

Description

Gets a list of "Cc" recipients.

Return value

CDesCArray &

Recipient list


BccRecipients()

inline CDesCArray &BccRecipients();

Description

Gets a list of "Bcc" recipients.

Return value

CDesCArray &

Recipient list


EncodingInfo()

inline CArrayFix< TImHeaderEncodingInfo > &EncodingInfo();

Description

Gets information relating to the encoding of header fields in received email.

This includes the charset. This information can be used when forwarding the email, to re-encode the header fields.

Return value

CArrayFix< TImHeaderEncodingInfo > &

Encoding information


EncodingInfo()

inline const CArrayFix< TImHeaderEncodingInfo > &EncodingInfo() const;

Description

Gets const information relating to the encoding of header fields in received email.

This includes the charset. This information can be used when forwarding the email, to re-encode the header fields.

Return value

const CArrayFix< TImHeaderEncodingInfo > &

Encoding information


AddEncodingInfoL()

IMPORT_C void AddEncodingInfoL(TImHeaderEncodingInfo &aInfo);

Description

Adds header field encoding information.

Parameters

TImHeaderEncodingInfo &aInfo

Header field encoding information


ResentMsgId()

IMPORT_C const TPtrC8 ResentMsgId() const;

Description

Return value

const TPtrC8


SetResentMsgIdL()

IMPORT_C void SetResentMsgIdL(const TDesC8 &);

Description

Parameters

const TDesC8 &


ResentFrom()

IMPORT_C const TPtrC ResentFrom() const;

Description

Return value

const TPtrC


SetResentFromL()

IMPORT_C void SetResentFromL(const TDesC &);

Description

Parameters

const TDesC &


ResentToRecipients()

inline const CDesCArray &ResentToRecipients() const;

Description

Return value

const CDesCArray &


ResentCcRecipients()

inline const CDesCArray &ResentCcRecipients() const;

Description

Return value

const CDesCArray &


ResentBccRecipients()

inline const CDesCArray &ResentBccRecipients() const;

Description

Return value

const CDesCArray &


ResentToRecipients()

inline CDesCArray &ResentToRecipients();

Description

Return value

CDesCArray &


ResentCcRecipients()

inline CDesCArray &ResentCcRecipients();

Description

Return value

CDesCArray &


ResentBccRecipients()

inline CDesCArray &ResentBccRecipients();

Description

Return value

CDesCArray &


InReplyTo()

IMPORT_C const TPtrC8 InReplyTo() const;

Description

Gets the "In Reply To" header field.

For reply messages, this field stores the ID of the message to which this is a reply. It is set by CImHeader::CreateReplyL().

Return value

const TPtrC8

"In Reply To" header field


SetInReplyToL()

IMPORT_C void SetInReplyToL(const TDesC8 &);

Description

Sets the "In Reply To" header field.

For reply messages, this field stores the ID of the message to which this is a reply.

Parameters

const TDesC8 &

"In Reply To" header field


CreateForwardL()

IMPORT_C TInt CreateForwardL(CImHeader &, TDesC &);

Description

Populates a new forward header.

The subject line passed in is used to construct the forward subject field value. This is then stored in the new header.

Parameters

CImHeader &

Header to populate

TDesC &

Subject line

Return value

TInt

System wide error code


CreateReplyL()

IMPORT_C TInt CreateReplyL(CImHeader &, TReplyTo, TDesC &);

Description

Populates a new Reply header.

The subject line passed in is used to construct the Reply subject field value. This is then stored in the new header.

Parameters

CImHeader &

Header to populate

TReplyTo

Reply-to address flag

TDesC &

Subject line

Return value

TInt

System wide error code


CreateReceiptL()

IMPORT_C void CreateReceiptL(CImHeader &, TDesC &);

Description

Populates a Receipt email header.

Parameters

CImHeader &

Header to populate

TDesC &

Subject line


BodyEncoding()

IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const;

Description

Gets the method of encoding the body of the email message.

The default value (EMsgOutboxMIME) is set so that text parts of the message are sent as MIME multipart/alternative text/html parts, and are encoded using UTF-8.

Return value

TMsgOutboxBodyEncoding

Method of encoding.

See also:


SetBodyEncoding()

IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aMessageBodyEncoding);

Description

Sets the method of encoding the body of the email message.

The default value (EMsgOutboxMIME) is set so that text parts of the message are sent as MIME multipart/alternative text/html parts, and are encoded using UTF-8.

Parameters

TMsgOutboxBodyEncoding aMessageBodyEncoding

Method of encoding

See also:


ReDecodeL()

IMPORT_C void ReDecodeL(RFs &aFS);

Description

Decodes the original message data into the CImHeader fields using the override character set.

8 bit data MUST be decoded using the normal method initially before this method is called.

Parameters

RFs &aFS

A file server session handle.

Leave codes

KErrNotSupported

Encoded header information has not been saved.


OverrideCharset()

IMPORT_C TUint OverrideCharset() const;

Description

Returns the character set to be used when calling ReDecodeL.

Return value

TUint


SetOverrideCharset()

IMPORT_C void SetOverrideCharset(TUint aCharset);

Description

Sets the character set to be used when calling ReDecodeL.

Parameters

TUint aCharset

The new character set.

[Top]


Member enumerations


Enum TReplyTo

TReplyTo

Description

Flags used to determine where to obtain the ReplyTo address for the header field of that name.

EOriginator

Get address from originator.

ESender

Get address from sender.

EAll

Get address from all sources.

ERecipients

Get address from recipients.