|
||
class CMsvAttachment : public CBase;
Represents a single attachment and information about the attachment.
This object is used to represent all types of attachments (file, linked file or message entry). Note that some APIs may not be valid for particular attachment types. This is described under each method. It is the responsibility of the client to ensure that the data about the attachment is set such as its mime-type or size.
CBase
-
Base class for all classes to be instantiated on the heap.
CMsvAttachment
- Represents a single attachment and information about the attachment.
Defined in CMsvAttachment
:
AttachmentName()const
Returns the attachment name.Complete()const
Indicates whether attachment is complete or not.EMsvFile
File attachment. This is a file attachment that is copied into the message store...EMsvLinkedFile
Linked file attachment. This is an attachment that is linked to using its file p...EMsvMessageEntry
Message entry attachment. This is a message entry that is registered as an attac...EntryAttachmentId()const
Returns the message entry Id for message entry attachment. This is only valid if...FilePath()const
Returns the full path specification for file attachments.GetDesC8Attribute(TUid,TPtrC8 &)const
Gets an 8-bit descriptor attribute.GetIntAttribute(TUid,TInt &)const
Gets an integer attribute.Id()const
Returns the attachment Id.MimeType()const
The mime-type of the attachment.NewL(TMsvAttachmentType)
Standard 2-phase construction, creates the attachment object.NewL(TMsvAttachmentType,TInt,HBufC8 *,HBufC *)
Standard 2-phase construction, creates the attachment object.NewL(const CMsvAttachment &)
RemoveDesC8Attribute(TUid)
Removes an 8-bit descriptor attribute.RemoveIntAttribute(TUid)
Removes an integer attribute.SetAttachmentNameL(const TDesC &)
SetComplete(TBool)
Sets whether the attachment is complete or not.SetDesC8AttributeL(TUid,const TDesC8 &)
Sets an 8-bit descriptor attribute for the attachment.SetId(TMsvAttachmentId)
Sets the attachment Id.SetIntAttributeL(TUid,TInt)
Sets an integer attribute for the attachment.SetMimeTypeL(const TDesC8 &)
Sets the mime-type of the attachment.SetSize(TInt)
Sets the attachment size.Size()const
Size of the attachment.TMsvAttachmentType
Enum to define the different types of attachments supported by messaging.Type()const
Returns the attachment type.~CMsvAttachment()
Standard destructor. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType);
Standard 2-phase construction, creates the attachment object.
The object should then be initialised with information about the attachment.
|
|
IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType, TInt aSize, HBufC8 *aMimeType, HBufC *aAttachmentName);
Standard 2-phase construction, creates the attachment object.
The object should then be initialised with information about the attachment. This allows the caller to pass in commonly used attributes to initialise them on construction to save the caller from having to call the relavant Set... methods. The attributes that can be initialised are Mime-Type, attachment name and size. Callers should pass in NULL for any attributes that are not required to be set.
|
|
IMPORT_C static CMsvAttachment* NewL(const CMsvAttachment &aAttachment);
|
|
IMPORT_C TMsvAttachmentId Id() const;
Returns the attachment Id.
The attachment Id is unique on a per message entry basis.
|
IMPORT_C void SetId(TMsvAttachmentId aId);
Sets the attachment Id.
The attachment Id is automatically set when passed to the Attachment Manager. This method allows the Id to be over-ridden or set by different implementations of attachment managers.
|
IMPORT_C TMsvAttachmentType Type() const;
Returns the attachment type.
The attachment types can be a file, a linked file or a message entry attachment.
|
CMsvAttachment::TMsvAttachmentType
Enum to define the different types of attachments supported by messaging.IMPORT_C TMsvId EntryAttachmentId() const;
Returns the message entry Id for message entry attachment. This is only valid if the attachment type is EMessageEntry.
|
IMPORT_C const TDesC& AttachmentName() const;
Returns the attachment name.
The attachment name is a readable text attribute to identify the attachment.
|
IMPORT_C void SetAttachmentNameL(const TDesC &aAttachmentName);
|
IMPORT_C const TDesC& FilePath() const;
Returns the full path specification for file attachments.
This is only valid for file attachments where the attachment type is EMsvFile or EMsvLinkedFile.
|
IMPORT_C TInt Size() const;
Size of the attachment.
Return the size of the attachment in bytes.
|
IMPORT_C void SetSize(TInt aSize);
Sets the attachment size.
When initialising or updating the attachment, this method should be used to set the size in bytes.
|
IMPORT_C const TDesC8& MimeType() const;
The mime-type of the attachment.
|
IMPORT_C void SetMimeTypeL(const TDesC8 &aMimeType);
Sets the mime-type of the attachment.
|
IMPORT_C TBool Complete() const;
Indicates whether attachment is complete or not.
This allows support for incomplete or pending attachments.
|
IMPORT_C void SetComplete(TBool aComplete);
Sets whether the attachment is complete or not.
This allows support for incomplete or pending attachments.
|
IMPORT_C void SetDesC8AttributeL(TUid aAttributeId, const TDesC8 &aAttribute);
Sets an 8-bit descriptor attribute for the attachment.
A UID identifier uniquely identifies the attribute. If an attibute already exists with the same identifier, the old attribute is over-written.
This can be used to store an attribute as an 8-bit descriptor or binary data.
|
IMPORT_C TInt GetDesC8Attribute(TUid aAttributeId, TPtrC8 &aAttribute) const;
Gets an 8-bit descriptor attribute.
Gets the attribute uniquely identified by the UID identifer set using the SetDesC8AttributeL method.
|
|
IMPORT_C void RemoveDesC8Attribute(TUid aAttributeId);
Removes an 8-bit descriptor attribute.
Removes the attribute identified by its UID identifer. This methods has no effect if the attribute does not exist.
|
IMPORT_C void SetIntAttributeL(TUid aAttributeId, TInt aAttribute);
Sets an integer attribute for the attachment.
A UID identifier uniquely identifies the attribute. If an attibute already exists with the same identifier, the old attribute is over-written.
|
IMPORT_C TInt GetIntAttribute(TUid aAttributeId, TInt &aAttribute) const;
Gets an integer attribute.
Gets the attribute uniquely identified by the UID identifer set using the SetIntAttributeL method.
|
|
IMPORT_C void RemoveIntAttribute(TUid aAttributeId);
Removes an integer attribute.
Removes the attribute identified by its UID identifer. This methods has no effect if the attribute does not exist.
|
TMsvAttachmentType
Enum to define the different types of attachments supported by messaging.
|