CCalAttachment Class Reference

class CCalAttachment : public CBase

Class representing a calendar attachment. This allows access to the attachment content itself and associated metadata.

This can be either a URI (RFC 3986) or a file attachment, which must be specified on creation. A URI attachment requires a descriptor containing the URI. A file attachment can be specified as either a descriptor containing the binary data or as a file handle.

Attachment data (i.e. URI, binary data) cannot be changed once an attachment has been created. This does not include metadata properties that are modifiable through the CCalAttachment APIs.

File attachments may also have only a content ID on creation. This applies in cases where a vCalendar or iCalendar (RFC 2445) is imported as part of a message. The content ID refers to the attachment file located elsewhere in the message. The attachment data must be set using CCalAttachment::SetResourceL before the attachment can be stored. The content ID can be changed once it has been set. There is more information about content IDs in the MIME specification (RFC2045).

Inherits from

Constructor & Destructor Documentation

CCalAttachment()

CCalAttachment ( ) [private]

CCalAttachment(CAgnAttachment &)

CCalAttachment ( CAgnAttachment & aAttachment ) [private]

Parameters

CAgnAttachment & aAttachment

~CCalAttachment()

IMPORT_C ~CCalAttachment ( )

Member Functions Documentation

ClearAttribute(TUint16)

IMPORT_C void ClearAttribute ( TUint16 aAttribute )

Parameters

TUint16 aAttribute

ConstructL(TType, TDesC8 *)

void ConstructL ( TType aType,
TDesC8 * aData
) [private]

Parameters

TType aType
TDesC8 * aData

CreateFileAttachmentImplIfRequiredL(CCalSessionImpl *)

void CreateFileAttachmentImplIfRequiredL ( CCalSessionImpl * aSessionImpl ) [private]

Parameters

CCalSessionImpl * aSessionImpl

FileAttachment()

IMPORT_C CCalAttachmentFile * FileAttachment ( ) const

Impl()

CAgnAttachment & Impl ( ) const

IsAttributeSet(TUint16)

IMPORT_C TBool IsAttributeSet ( TUint16 aAttribute ) const

Parameters

TUint16 aAttribute

Label()

IMPORT_C const TDesC & Label ( ) const

MimeType()

IMPORT_C const TDesC8 & MimeType ( ) const

NewFileByContentIdL(const TDesC8 &)

IMPORT_C CCalAttachment * NewFileByContentIdL ( const TDesC8 & aContentId ) [static]

Parameters

const TDesC8 & aContentId

NewFileL(TDesC8 *)

IMPORT_C CCalAttachment * NewFileL ( TDesC8 * aBinaryData ) [static]

Parameters

TDesC8 * aBinaryData

NewFileL(RFile &)

IMPORT_C CCalAttachment * NewFileL ( RFile & aFileHandle ) [static]

Parameters

RFile & aFileHandle

NewL(CAgnAttachment &, CCalSessionImpl &)

CCalAttachment * NewL ( CAgnAttachment & aAttachment,
CCalSessionImpl & aSessionImpl
) [static]

Parameters

CAgnAttachment & aAttachment
CCalSessionImpl & aSessionImpl

NewUriL(const TDesC8 &)

IMPORT_C CCalAttachment * NewUriL ( const TDesC8 & aUri ) [static]

Parameters

const TDesC8 & aUri

SetAttribute(TUint16)

IMPORT_C void SetAttribute ( TUint16 aAttribute )

Parameters

TUint16 aAttribute

SetLabelL(const TDesC &)

IMPORT_C void SetLabelL ( const TDesC & aLabel )

Parameters

const TDesC & aLabel

SetMimeTypeL(const TDesC8 &)

IMPORT_C void SetMimeTypeL ( const TDesC8 & aContentMimeType )

Parameters

const TDesC8 & aContentMimeType

Type()

IMPORT_C TType Type ( ) const

Value()

IMPORT_C const TDesC8 & Value ( ) const

Member Enumerations Documentation

Enum TAttributes

Calendar attachment attributes. Note that the first 8 bits of this enumeration (up to 0x0080) are reserved for future use.

Enumerators

EExportInline = 0x0001

If the EExportInline flag is set on a file attachment then it will be exported inline as binary data.

Note that, by default:

  • Any file attachments created using binary data will have the EExportInline flag set.

  • Any file attachments created using a file handle will NOT have the EExportInline flag set, i.e the content of the file will not be exported inline as binaries unless the client call SetAttribute(EExportInline) after an attachment object has been instantiated.

  • If this flag is set but the attachment has a content ID, then the content ID will be exported instead.

  • This flag has no effect for URI attachments.

EFile EUri

Enum TType

Calendar attachment type.

Enumerators

EUri

A URI or link to an attachment, e.g. a file or HTTP server address.

EFile

A file attachment to be stored in the calendar, either binary data or a file handle.

Member Data Documentation

CAgnAttachment * iAttachmentImpl

CAgnAttachment * iAttachmentImpl [private]

CCalAttachmentFile * iFileAttachment

CCalAttachmentFile * iFileAttachment [private]