|
PST File Format SDK v0.4
|
Encapsulates an attachment to a message. More...
#include <message.h>
Collaboration diagram for pstsdk::attachment:Public Member Functions | |
| std::wstring | get_filename () const |
| Get the filename of this attachment. | |
| std::vector< byte > | get_bytes () const |
| Get the attachment data, as a blob. | |
| hnid_stream_device | open_byte_stream () |
| Open a stream of the attachment data. | |
| size_t | size () const |
| Read the size of this attachment. | |
| size_t | content_size () const |
| Read the size of the content in this attachment. | |
| bool | is_message () const |
| Returns if this attachment is actually an embedded message. | |
| message | open_as_message () const |
| Interpret this attachment as a message. | |
| property_bag & | get_property_bag () |
| Get the property bag backing this attachment. | |
| const property_bag & | get_property_bag () const |
| Get the property bag backing this attachment. | |
Friends | |
| class | message |
| class | attachment_transform |
Encapsulates an attachment to a message.
Attachment objects allow you to query for some basic information about an attachment, get access to the bytes of the attachment (as a blob or stream), as well as open the attachment as a message if applicable.
|
inline |
|
inline |
Get the attachment data, as a blob.
You might want to consider open_byte_stream if content_size() is too large for your tastes.
|
inline |
|
inline |
|
inline |
|
inline |
Returns if this attachment is actually an embedded message.
If an attachment is a message, one should use open_as_message() to access the data rather than open_byte_stream() or similar.
|
inline |
|
inline |
Open a stream of the attachment data.
The returned stream device can be used to construct a proper stream:
Which can then be used as any iostream would be.
|
inline |
Read the size of this attachment.
The size returned here includes metadata, and as such will be larger than just the byte stream.
|
friend |