Abstract interface for objects that handle mail attachments. More...
Inherits BMailComponent.
Inherited by BAttributedMailAttachment, and BSimpleMailAttachment.
Public Member Functions | |
| virtual status_t | InitCheck ()=0 |
| Pure virtual to check if the object was successfully initialized. | |
| virtual status_t | SetTo (BFile *file, bool deleteFileWhenDone=false)=0 |
| Pure virtual to initialize the object's attached file. | |
| virtual status_t | SetTo (entry_ref *ref)=0 |
| Pure virtual to initialize the object's attached file. | |
Attachment's filename | |
| virtual void | SetFileName (const char *name)=0 |
| Pure virtual to change the filename of the attachment. | |
| virtual status_t | FileName (char *name)=0 |
| Pure virtual to return the filename of the attachment. | |
Public Member Functions inherited from BMailComponent | |
| BMailComponent (uint32 defaultCharSet=B_MAIL_NULL_CONVERSION) | |
| Initializes a new BMailComponent with the specified character set. | |
| virtual | ~BMailComponent () |
| Destructor. | |
| uint32 | ComponentType () |
Returns the component_type of this object. | |
| virtual status_t | GetDecodedData (BPositionIO *data) |
| Retrieves the data contained in this component in canonical format and places it into data. | |
| const char * | HeaderAt (int32 index) const |
Returns the key of the header at index. | |
| status_t | HeaderField (const char *key, BMessage *structured_header, int32 index=0) const |
| Returns the header key. | |
| const char * | HeaderField (const char *key, int32 index=0) const |
| Returns the header key. | |
| bool | IsAttachment () |
| Employs simple heuristics such as the MIME type and the Content-Disposition: header to determine whether this component is an attachment. | |
| virtual status_t | MIMEType (BMimeType *mime) |
| Places the MIME type of the data into mime. | |
| status_t | RemoveHeader (const char *key) |
| Removes all headers with the key key. | |
| virtual status_t | RenderToRFC822 (BPositionIO *render_to) |
| Renders the component into RFC-822 format. | |
| virtual status_t | SetDecodedData (BPositionIO *data) |
| Sets the content of this component to the canonical format data contained in data. | |
| void | SetHeaderField (const char *key, BMessage *structured_header, bool replace_existing=true) |
| Adds a structured header of type key to the component. | |
| void | SetHeaderField (const char *key, const char *value, uint32 charset=B_MAIL_NULL_CONVERSION, mail_encoding encoding=null_encoding, bool replace_existing=true) |
| Adds the specified header of type key and with the value to the component. | |
| virtual status_t | SetToRFC822 (BPositionIO *data, size_t length, bool parse_now=false) |
| Sets this object from a component in RFC-822 format. | |
| BMailComponent * | WhatIsThis () |
| Employs simple heuristics such as the MIME type to present you with an instance of a useful subclass. | |
Abstract interface for objects that handle mail attachments.
|
pure virtual |
Pure virtual to return the filename of the attachment.
| [out] | name | A pre-allocated variable of B_FILE_NAME_LENGTH length where to write the filename. |
Implemented in BSimpleMailAttachment, and BAttributedMailAttachment.
|
pure virtual |
Pure virtual to check if the object was successfully initialized.
Implemented in BSimpleMailAttachment, and BAttributedMailAttachment.
|
pure virtual |
Pure virtual to change the filename of the attachment.
| [in] | name | The new filename string. |
Implemented in BSimpleMailAttachment, and BAttributedMailAttachment.
Pure virtual to initialize the object's attached file.
| [in] | file | A file for the attachment's data. |
| [in] | deleteFileWhenDone | Tells if the file has to be deleted when this object is destroyed. |
Implemented in BSimpleMailAttachment, and BAttributedMailAttachment.
Pure virtual to initialize the object's attached file.
| [in] | ref | An entry_ref for the attachment's data. |
Implemented in BSimpleMailAttachment, and BAttributedMailAttachment.