Fairport  v1.0.38
fairport::message Class Reference

Represents a message in a PST file. More...

#include <message.h>

+ Inheritance diagram for fairport::message:
+ Collaboration diagram for fairport::message:

List of all members.

Public Types

typedef
boost::transform_iterator
< attachment_transform,
const_table_row_iter
attachment_iterator
 Attachment iterator type; a transform iterator over a table row iterator.
typedef
boost::transform_iterator
< recipient_transform,
const_table_row_iter
recipient_iterator
 Recipient iterator type; a transform iterator over a table row iterator.

Public Member Functions

 message (const node &n)
 Construct a message object.
 message (const message &other)
attachment_iterator attachment_begin () const
 Get an iterator to the first message on this message.
attachment_iterator attachment_end () const
 Get the end attachment iterator.
recipient_iterator recipient_begin () const
 Get an iterator to the first recipient of this message.
recipient_iterator recipient_end () const
 Get the end recipient iterator.
std::wstring get_subject () const
 Get the subject of this message.
bool has_subject () const
 Check to see if a subject is set on this message.
std::wstring get_body () const
 Get the body of this message.
hnid_stream_device open_body_stream ()
 Get the body of this message.
size_t body_size () const
 Size of the body, in bytes.
bool has_body () const
 Checks to see if this message has a body.
std::wstring get_html_body () const
 Get the HTML body of this message.
hnid_stream_device open_html_body_stream ()
 Get the HTML body of this message.
size_t html_body_size () const
 Size of the HTML body, in bytes.
bool has_html_body () const
 Checks to see if this message has a HTML body.
size_t size () const
size_t get_attachment_count () const
 Get the number of attachments on this message.
boost::posix_time::ptime get_delivery_time () const
 Get the delivery time of this message.
boost::posix_time::ptime get_last_modification_time () const
 Get the last modification time of this message.
size_t get_recipient_count () const
 Get the number of recipients on this message.
tableget_attachment_table ()
 Get the attachment table of this message.
tableget_recipient_table ()
 Get the recipient table of this message.
const tableget_attachment_table () const
const tableget_recipient_table () const

Detailed Description

Represents a message in a PST file.

A message is the basic abstraction exposed by MAPI - everything is a message; a mail item, a calendar item, a contact, etc.

This class exposes some common properties on messages as well as iteration mechanisms to get to the attachments and recipients on the message. You will most likely find it necessary to get the underylying property bag and look up specific properties not exposed here.

Definition at line 229 of file message.h.


Member Typedef Documentation

Attachment iterator type; a transform iterator over a table row iterator.

Definition at line 233 of file message.h.

Recipient iterator type; a transform iterator over a table row iterator.

Definition at line 235 of file message.h.


Constructor & Destructor Documentation

fairport::message::message ( const node n) [inline, explicit]

Construct a message object.

Parameters:
[in]nA message node

Definition at line 239 of file message.h.

fairport::message::message ( const message other) [inline]

Definition at line 391 of file message.h.


Member Function Documentation

attachment_iterator fairport::message::attachment_begin ( ) const [inline]

Get an iterator to the first message on this message.

Returns:
an iterator positioned on the first attachment on this message

Definition at line 246 of file message.h.

attachment_iterator fairport::message::attachment_end ( ) const [inline]

Get the end attachment iterator.

Returns:
An iterator at the end position

Definition at line 250 of file message.h.

size_t fairport::message::body_size ( ) const [inline]

Size of the body, in bytes.

Returns:
The size of the body

Definition at line 289 of file message.h.

size_t fairport::message::get_attachment_count ( ) const [inline]

Get the number of attachments on this message.

Returns:
The number of attachments

Definition at line 327 of file message.h.

table& fairport::message::get_attachment_table ( ) [inline]

Get the attachment table of this message.

Returns:
The attachment table

Definition at line 348 of file message.h.

const fairport::table & fairport::message::get_attachment_table ( ) const [inline]

Get the attachment table of this message.

Returns:
The attachment table

Definition at line 400 of file message.h.

std::wstring fairport::message::get_body ( ) const [inline]

Get the body of this message.

See also:
[MS-OXCMSG] 2.2.1.48.1
Returns:
The message body as a string

Definition at line 273 of file message.h.

boost::posix_time::ptime fairport::message::get_delivery_time ( ) const [inline]

Get the delivery time of this message.

See also:
[MS-OXOMSG] 2.2.3.9
Returns:
The delivery time of this message

Definition at line 332 of file message.h.

std::wstring fairport::message::get_html_body ( ) const [inline]

Get the HTML body of this message.

See also:
[MS-OXCMSG] 2.2.1.48.3
Returns:
The HTML message body as a string

Definition at line 298 of file message.h.

boost::posix_time::ptime fairport::message::get_last_modification_time ( ) const [inline]

Get the last modification time of this message.

See also:
[MS-OXCMSG] 2.2.1.1
Returns:
The last modification time of this message

Definition at line 337 of file message.h.

size_t fairport::message::get_recipient_count ( ) const [inline]

Get the number of recipients on this message.

Returns:
The number of recipients

Definition at line 342 of file message.h.

table& fairport::message::get_recipient_table ( ) [inline]

Get the recipient table of this message.

Returns:
The recipient table

Definition at line 352 of file message.h.

const fairport::table & fairport::message::get_recipient_table ( ) const [inline]

Get the recipient table of this message.

Returns:
The recipient table

Definition at line 417 of file message.h.

std::wstring fairport::message::get_subject ( ) const [inline]

Get the subject of this message.

See also:
[MS-OXCMSG] 2.2.1.46
Returns:
The message subject

Definition at line 434 of file message.h.

bool fairport::message::has_body ( ) const [inline]

Checks to see if this message has a body.

Returns:
true if the body prop exists

Definition at line 293 of file message.h.

bool fairport::message::has_html_body ( ) const [inline]

Checks to see if this message has a HTML body.

Returns:
true if the HTML body property exists

Definition at line 318 of file message.h.

bool fairport::message::has_subject ( ) const [inline]

Check to see if a subject is set on this message.

Returns:
true if a subject is set on this message

Definition at line 268 of file message.h.

size_t fairport::message::html_body_size ( ) const [inline]

Size of the HTML body, in bytes.

Returns:
The size of the HTML body

Definition at line 314 of file message.h.

hnid_stream_device fairport::message::open_body_stream ( ) [inline]

Get the body of this message.

The returned stream device can be used to construct a proper stream:

 message m = ...;
 prop_stream body(a.open_body_stream());

Which can then be used as any iostream would be.

See also:
[MS-OXCMSG] 2.2.1.48.1
Returns:
The message body as a stream

Definition at line 285 of file message.h.

hnid_stream_device fairport::message::open_html_body_stream ( ) [inline]

Get the HTML body of this message.

The returned stream device can be used to construct a proper stream:

 message m = ...;
 prop_stream htmlbody(a.open_html_body_stream());

Which can then be used as any iostream would be.

See also:
[MS-OXCMSG] 2.2.1.48.3
Returns:
The message body as a stream

Definition at line 310 of file message.h.

recipient_iterator fairport::message::recipient_begin ( ) const [inline]

Get an iterator to the first recipient of this message.

Returns:
An iterator positioned on the first recipient of this message

Definition at line 254 of file message.h.

recipient_iterator fairport::message::recipient_end ( ) const [inline]

Get the end recipient iterator.

Returns:
An iterator at the end position

Definition at line 258 of file message.h.

size_t fairport::message::size ( ) const [inline]
See also:
[MS-OXCMSG] 2.2.1.7
Returns:
The message size

Definition at line 323 of file message.h.


The documentation for this class was generated from the following file: