libmapipp::attachment Class Reference

This class represents a message attachment. More...

#include <attachment.h>

Inheritance diagram for libmapipp::attachment:
libmapipp::object

Public Member Functions

 attachment (message &mapi_message, const uint32_t attach_num) throw (mapi_exception)
 Constructor. More...
 
const uint8_t * get_data () const
 the contents of the attachment More...
 
uint32_t get_data_size () const
 the size of the attachment More...
 
std::string get_filename () const
 the filename of the attachment More...
 
uint32_t get_num () const
 The attachment number. More...
 
virtual ~attachment () throw ()
 Destructor. More...
 
- Public Member Functions inherited from libmapipp::object
virtual mapi_object_t & data () throw ()
 Obtain a reference to the mapi_object_t associated with this object. More...
 
virtual property_container get_property_container ()
 Obtain a property_container to be used with this object. More...
 
virtual sessionget_session ()
 Obtain the session associated with this object. More...
 
 object (session &mapi_session, const std::string &object_type="") throw ()
 Object Constructor. More...
 
virtual ~object () throw ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from libmapipp::object
mapi_object_t m_object
 
sessionm_session
 

Detailed Description

This class represents a message attachment.

A message can contain both text content, and also have attached (embedded) files and messages. This class represents the attachments for one messaage.

You may not need to create the attachments yourself, since you can create a container with all the attachments using message::fetch_attachments().

Constructor & Destructor Documentation

libmapipp::attachment::attachment ( message mapi_message,
const uint32_t  attach_num 
)
throw (mapi_exception
)

Constructor.

Parameters
mapi_messagethe message that this attachment belongs to.
attach_numAttachment Number.
virtual libmapipp::attachment::~attachment ( )
throw (
)
inlinevirtual

Destructor.

Member Function Documentation

const uint8_t* libmapipp::attachment::get_data ( ) const
inline

the contents of the attachment

Note
the length of the array is given by get_data_size()
uint32_t libmapipp::attachment::get_data_size ( ) const
inline

the size of the attachment

Returns
the size of the attachment in bytes
std::string libmapipp::attachment::get_filename ( ) const
inline

the filename of the attachment

Note
not all attachments have file names
Returns
string containing the file name of the attachment, if any
uint32_t libmapipp::attachment::get_num ( ) const
inline

The attachment number.


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

Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/