CImHeader Class Reference

#include <mw/miuthdr.h>

Link against: imcm.lib

class CImHeader : public CBase

Inherits from

Public Member Enumerations
enumTReplyTo { EOriginator, ESender, EAll, ERecipients }
Public Member Functions
~CImHeader()
IMPORT_C voidAddEncodingInfoL(TImHeaderEncodingInfo &)
const CDesCArray &BccRecipients()
CDesCArray &BccRecipients()
IMPORT_C TMsgOutboxBodyEncodingBodyEncoding()
const CDesCArray &CcRecipients()
CDesCArray &CcRecipients()
IMPORT_C TUintCharset()
IMPORT_C TIntCreateForwardL(CImHeader &, TDesC &)
IMPORT_C voidCreateReceiptL(CImHeader &, TDesC &)
IMPORT_C TIntCreateReplyL(CImHeader &, TReplyTo, TDesC &)
IMPORT_C TIntDataSize()
CArrayFix< TImHeaderEncodingInfo > &EncodingInfo()
const CArrayFix< TImHeaderEncodingInfo > &EncodingInfo()
IMPORT_C voidExternalizeL(RMsvWriteStream &)
IMPORT_C const TPtrCFrom()
IMPORT_C const TPtrC8ImMsgId()
IMPORT_C const TPtrC8InReplyTo()
IMPORT_C voidInternalizeL(RMsvReadStream &)
IMPORT_C CImHeader *NewLC()
IMPORT_C TUintOverrideCharset()
IMPORT_C voidReDecodeL(RFs &)
IMPORT_C const TPtrCReceiptAddress()
const TUintRemoteSize()
IMPORT_C const TPtrCReplyTo()
const CDesCArray &ResentBccRecipients()
CDesCArray &ResentBccRecipients()
const CDesCArray &ResentCcRecipients()
CDesCArray &ResentCcRecipients()
IMPORT_C const TPtrCResentFrom()
IMPORT_C const TPtrC8ResentMsgId()
const CDesCArray &ResentToRecipients()
CDesCArray &ResentToRecipients()
IMPORT_C voidReset()
IMPORT_C voidRestoreL(CMsvStore &)
IMPORT_C voidSaveEncodedHeadersL()
IMPORT_C voidSetBodyEncoding(TMsgOutboxBodyEncoding)
IMPORT_C voidSetCharset(const TUint)
IMPORT_C voidSetFromL(const TDesC8 &)
IMPORT_C voidSetFromL(const TDesC16 &)
IMPORT_C voidSetImMsgIdL(const TDesC8 &)
IMPORT_C voidSetInReplyToL(const TDesC8 &)
IMPORT_C voidSetOverrideCharset(TUint)
IMPORT_C voidSetReceiptAddressL(const TDesC8 &)
IMPORT_C voidSetReceiptAddressL(const TDesC16 &)
voidSetRemoteSize(TUint)
IMPORT_C voidSetReplyToL(const TDesC8 &)
IMPORT_C voidSetReplyToL(const TDesC16 &)
IMPORT_C voidSetResentFromL(const TDesC &)
IMPORT_C voidSetResentMsgIdL(const TDesC8 &)
IMPORT_C voidSetSubjectL(const TDesC8 &)
IMPORT_C voidSetSubjectL(const TDesC16 &)
voidSetVersion(TUint16)
IMPORT_C voidStoreL(CMsvStore &)
IMPORT_C voidStoreWithoutCommitL(CMsvStore &)
IMPORT_C const TPtrCSubject()
const CDesCArray &ToRecipients()
CDesCArray &ToRecipients()
const TUint16Version()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()

Detailed 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.

Member Enumeration Documentation

Enum TReplyTo

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

EnumeratorValueDescription
EOriginator

Get address from originator.

ESender

Get address from sender.

EAll

Get address from all sources.

ERecipients

Get address from recipients.

Constructor & Destructor Documentation

~CImHeader ( )

IMPORT_C~CImHeader()

Destructor.

Member Function Documentation

AddEncodingInfoL ( TImHeaderEncodingInfo & )

IMPORT_C voidAddEncodingInfoL(TImHeaderEncodingInfo &aInfo)

Adds header field encoding information.

Parameters
aInfoHeader field encoding information

BccRecipients ( )

const CDesCArray &BccRecipients()const [inline]

BccRecipients ( )

CDesCArray &BccRecipients()[inline]

BodyEncoding ( )

IMPORT_C TMsgOutboxBodyEncodingBodyEncoding()const

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.

See also: TMsgOutboxBodyEncoding

Return Value
Method of encoding.

CcRecipients ( )

const CDesCArray &CcRecipients()const [inline]

CcRecipients ( )

CDesCArray &CcRecipients()[inline]

Charset ( )

IMPORT_C TUintCharset()const

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().

See also: SetCharset() EncodingInfo()

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

CreateForwardL ( CImHeader &, TDesC & )

IMPORT_C TIntCreateForwardL(CImHeader &,
TDesC &
)

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
Header to populate
Subject line
Return Value
System wide error code

CreateReceiptL ( CImHeader &, TDesC & )

IMPORT_C voidCreateReceiptL(CImHeader &,
TDesC &
)

Populates a Receipt email header.

Parameters
Header to populate
Subject line

CreateReplyL ( CImHeader &, TReplyTo, TDesC & )

IMPORT_C TIntCreateReplyL(CImHeader &,
TReplyTo,
TDesC &
)

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
Header to populate
Reply-to address flag
Subject line
Return Value
System wide error code

DataSize ( )

IMPORT_C TIntDataSize()

Gets the combined length of all the field values stored.

Return Value
Combined length

EncodingInfo ( )

CArrayFix< TImHeaderEncodingInfo > &EncodingInfo()[inline]

EncodingInfo ( )

const CArrayFix< TImHeaderEncodingInfo > &EncodingInfo()const [inline]

ExternalizeL ( RMsvWriteStream & )

IMPORT_C voidExternalizeL(RMsvWriteStream &aWriteStream)const

Externalises the settings to a specified stream.

Parameters
aWriteStreamStream to write to

From ( )

IMPORT_C const TPtrCFrom()const

Gets the "From" header field.

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

Return Value
Field value

ImMsgId ( )

IMPORT_C const TPtrC8ImMsgId()const

Gets the "MessageId" header field.

Return Value
Field value

InReplyTo ( )

IMPORT_C const TPtrC8InReplyTo()const

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
"In Reply To" header field

InternalizeL ( RMsvReadStream & )

IMPORT_C voidInternalizeL(RMsvReadStream &aReadStream)

Internalises the settings from a specified stream.

Parameters
aReadStreamStream to read from

NewLC ( )

IMPORT_C CImHeader *NewLC()[static]

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

Return Value
New CImHeader object

OverrideCharset ( )

IMPORT_C TUintOverrideCharset()const

Returns the character set to be used when calling ReDecodeL.

ReDecodeL ( RFs & )

IMPORT_C voidReDecodeL(RFs &aFS)

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
aFSA file server session handle.
Leave Codes
KErrNotSupportedEncoded header information has not been saved.

ReceiptAddress ( )

IMPORT_C const TPtrCReceiptAddress()const

Gets the "Receipt" header field.

Return Value
Field value

RemoteSize ( )

const TUintRemoteSize()const [inline]

ReplyTo ( )

IMPORT_C const TPtrCReplyTo()const

Gets the "ReplyTo" header field.

Return Value
Field value

ResentBccRecipients ( )

const CDesCArray &ResentBccRecipients()const [inline]

ResentBccRecipients ( )

CDesCArray &ResentBccRecipients()[inline]

ResentCcRecipients ( )

const CDesCArray &ResentCcRecipients()const [inline]

ResentCcRecipients ( )

CDesCArray &ResentCcRecipients()[inline]

ResentFrom ( )

IMPORT_C const TPtrCResentFrom()const

Deprecated

ResentMsgId ( )

IMPORT_C const TPtrC8ResentMsgId()const

Deprecated

ResentToRecipients ( )

const CDesCArray &ResentToRecipients()const [inline]

ResentToRecipients ( )

CDesCArray &ResentToRecipients()[inline]

Reset ( )

IMPORT_C voidReset()

Resets all header field values.

RestoreL ( CMsvStore & )

IMPORT_C voidRestoreL(CMsvStore &aMessageStore)

Restores settings from a specified message store.

Parameters
aMessageStoreMessage store to read from

SaveEncodedHeadersL ( )

IMPORT_C voidSaveEncodedHeadersL()

Saves the 8 bit data in supported fields into a CImEncodedHeader. This allows later redecoding with different character sets.

SetBodyEncoding ( TMsgOutboxBodyEncoding )

IMPORT_C voidSetBodyEncoding(TMsgOutboxBodyEncodingaMessageBodyEncoding)

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.

See also: TMsgOutboxBodyEncoding

Parameters
aMessageBodyEncodingMethod of encoding

SetCharset ( const TUint )

IMPORT_C voidSetCharset(const TUintaCharset)

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().

See also: Charset() AddEncodingInfoL()

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

SetFromL ( const TDesC8 & )

IMPORT_C voidSetFromL(const TDesC8 &aFrom)

Sets the "From" header field.

Parameters
aFromField value

SetFromL ( const TDesC16 & )

IMPORT_C voidSetFromL(const TDesC16 &aFrom)

Sets the "From" header field.

Parameters
aFromField value

SetImMsgIdL ( const TDesC8 & )

IMPORT_C voidSetImMsgIdL(const TDesC8 &aImMsgIdL)

Sets the "MessageId" header field.

Sets the "MessageId" header field.

Parameters
aImMsgIdLField value

SetInReplyToL ( const TDesC8 & )

IMPORT_C voidSetInReplyToL(const TDesC8 &)

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
"In Reply To" header field

SetOverrideCharset ( TUint )

IMPORT_C voidSetOverrideCharset(TUintaCharset)

Sets the character set to be used when calling ReDecodeL.

Parameters
aCharsetThe new character set.

SetReceiptAddressL ( const TDesC8 & )

IMPORT_C voidSetReceiptAddressL(const TDesC8 &aReceiptAddress)

Sets the "Receipt" header field.

Sets the "Receipt" header field.

Parameters
aReceiptAddressField value

SetReceiptAddressL ( const TDesC16 & )

IMPORT_C voidSetReceiptAddressL(const TDesC16 &aReceiptAddress)

Sets the "Receipt" header field.

Sets the "Receipt" header field.

Parameters
aReceiptAddressField value

SetRemoteSize ( TUint )

voidSetRemoteSize(TUintaSize)[inline]

SetReplyToL ( const TDesC8 & )

IMPORT_C voidSetReplyToL(const TDesC8 &aReplyTo)

Sets the "ReplyTo" header field.

Parameters
aReplyToField value

SetReplyToL ( const TDesC16 & )

IMPORT_C voidSetReplyToL(const TDesC16 &aReplyTo)

Sets the "ReplyTo" header field.

Parameters
aReplyToField value

SetResentFromL ( const TDesC & )

IMPORT_C voidSetResentFromL(const TDesC &)

Deprecated

SetResentMsgIdL ( const TDesC8 & )

IMPORT_C voidSetResentMsgIdL(const TDesC8 &)

Deprecated

SetSubjectL ( const TDesC8 & )

IMPORT_C voidSetSubjectL(const TDesC8 &aSubject)

Sets the "Subject" header field.

Parameters
aSubjectField value

SetSubjectL ( const TDesC16 & )

IMPORT_C voidSetSubjectL(const TDesC16 &aSubject)

Sets the "Subject" header field.

Parameters
aSubjectField value

SetVersion ( TUint16 )

voidSetVersion(TUint16aVersion)[inline]

StoreL ( CMsvStore & )

IMPORT_C voidStoreL(CMsvStore &aMessageStore)const

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

Parameters
aMessageStoreMessage store to write to

StoreWithoutCommitL ( CMsvStore & )

IMPORT_C voidStoreWithoutCommitL(CMsvStore &aMessageStore)const

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

Parameters
aMessageStoreMessage store to write to

Subject ( )

IMPORT_C const TPtrCSubject()const

Gets the "Subject" header field.

Return Value
Field value

ToRecipients ( )

const CDesCArray &ToRecipients()const [inline]

ToRecipients ( )

CDesCArray &ToRecipients()[inline]

Version ( )

const TUint16Version()const [inline]