{
class object;
-/// \brief This class represents a message attachment
+/**
+ * \brief 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().
+ */
class attachment : public object {
public:
/** \brief Constructor
- * \param mapi_message message this attachment belongs to.
+ *
+ * \param mapi_message the message that this attachment belongs to.
* \param attach_num Attachment Number.
*/
attachment(message& mapi_message, const uint32_t attach_num) throw(mapi_exception)
}
- /// \brief Get Attachment number.
+ /**
+ * \brief The %attachment number
+ */
uint32_t get_num() const { return m_attach_num; }
+ /**
+ * \brief the contents of the %attachment
+ *
+ * \note the length of the array is given by get_data_size()
+ */
const uint8_t* get_data() const { return m_bin_data; }
+
+ /**
+ * \brief the size of the %attachment
+ *
+ * \return the size of the %attachment in bytes
+ */
uint32_t get_data_size() const { return m_data_size; }
+
+ /**
+ * \brief the filename of the %attachment
+ *
+ * \note not all attachments have file names
+ *
+ * \return string containing the file name of the %attachment, if any
+ */
std::string get_filename() const { return m_filename; }
- /// Destructor
+ /**
+ * Destructor
+ */
virtual ~attachment() throw()
{
if (m_bin_data) delete m_bin_data;
namespace libmapipp
{
-/// This class represents a folder or container within Exchange
+/**
+ * This class represents a %folder or container within Exchange
+ */
class folder : public object {
public:
/**
- Pointer to a message
+ * Pointer to a message
*/
typedef boost::shared_ptr<message> message_shared_ptr;
+
typedef std::vector<message_shared_ptr > message_container_type;
/**
- Pointer to a folder
+ * Pointer to a %folder
*/
typedef boost::shared_ptr<folder> folder_shared_ptr;
- /**
- Hierarchy folders
- This is a vector (list) of child folders for a given folder
+ /**
+ * Hierarchy folders
+ *
+ * This is a vector (list) of child folders for a given %folder
*/
typedef std::vector<folder_shared_ptr> hierarchy_container_type;
- /** \brief Constructor
- * \param parent_folder The parent of this folder.
+ /**
+ * \brief Constructor
+ *
+ * \param parent_folder The parent of this %folder.
* \param folder_id This folder's id.
*/
folder(object& parent_folder, const mapi_id_t folder_id) throw(mapi_exception)
throw mapi_exception(GetLastError(), "folder::folder : OpenFolder");
}
- /** \brief Get Folder id.
+ /**
+ * \brief Obtain %folder id
+ *
* \return This folder's id.
*/
mapi_id_t get_id() const { return m_id; }
- /** \brief Deletes a message that belongs to this folder
- * \param message_id The id of the message to delete.
+ /**
+ * \brief Delete a message that belongs to this %folder
+ *
+ * \param message_id The id of the message to delete.
*/
void delete_message(mapi_id_t message_id) throw (mapi_exception)
{
}
/**
- * \brief Fetches all messages in this folder.
+ * \brief Fetch all messages in this %folder
+ *
* \return A container of message shared pointers.
*/
message_container_type fetch_messages() throw(mapi_exception)
}
/**
- * \brief Fetches all subfolders within this folder
- * \return A container of folder shared pointers.
+ * \brief Fetch all subfolders within this %folder
+ *
+ * \return A container of %folder shared pointers.
*/
-
hierarchy_container_type fetch_hierarchy() throw(mapi_exception)
{
mapi_object_t hierarchy_table;
return hierarchy_container;
}
- /// Destructor
+ /**
+ * Destructor
+ */
virtual ~folder() throw()
{
}
{
class object;
class attachment;
+
/**
- * \brief This class represents a message in Exchange.\n
- * It is important to note that a message is not necessarily an email message.\n
- * It could be a contact, journal or anything else that is not a folder.\n
+ * \brief This class represents a %message in Exchange.
+ *
+ * It is important to note that a %message is not necessarily an email %message.
+ * It could be a contact, journal or anything else that is not a folder.
*/
class message : public object {
public:
/**
* \brief Constructor
- * \param mapi_session The session to use to retrieve this message.
- * \param folder_id The id of the folder this message belongs to.
- * \param message_id The message id.
+ *
+ * \param mapi_session The session to use to retrieve this %message.
+ * \param folder_id The id of the folder this %message belongs to.
+ * \param message_id The %message id.
*/
message(session& mapi_session, const mapi_id_t folder_id, const mapi_id_t message_id) throw(mapi_exception)
: object(mapi_session, "message"), m_folder_id(folder_id), m_id(message_id)
}
/**
- * \brief Fetches all attachments in this message.
+ * \brief Fetches all attachments in this %message.
+ *
* \return A container of attachment shared pointers.
*/
attachment_container_type fetch_attachments();
- /// \brief Get this message's ID.
+ /**
+ * \brief Get this %message's ID.
+ */
mapi_id_t get_id() const { return m_id; }
- /// \brief Get this message's parent folder ID.
+ /**
+ * \brief Get this message's parent folder ID.
+ */
mapi_id_t get_folder_id() const { return m_folder_id; }
- /// Destructor
+ /**
+ * Destructor
+ */
virtual ~message() throw()
{
}