attachment.h File Reference
#include <iostream>
#include <string>
#include <libmapi++/clibmapi.h>
#include <libmapi++/message.h>

Classes

class  libmapipp::attachment
 This class represents a message attachment. More...
 

Namespaces

 libmapipp
 The libmapi++ classes and other definitions are all enclosed in the libmapipp namespace.
 
size_t size() const
Get number of properties in container.
Definition: property_container.h:264
virtual property_container get_property_container()
Obtain a property_container to be used with this object.
const void * operator[](uint32_t property_tag)
Finds the property value associated with a property tag.
Definition: property_container.h:225
std::vector< attachment_shared_ptr > attachment_container_type
Definition: message.h:48
virtual mapi_object_t & data()
Obtain a reference to the mapi_object_t associated with this object.
Definition: object.h:65
mapi_id_t get_folder_id() const
Get this message's parent folder ID.
Definition: message.h:79
message(session &mapi_session, const mapi_id_t folder_id, const mapi_id_t message_id)
Constructor.
Definition: message.h:57
static std::string get_default_profile_path()
The path to the default profile database.
std::string get_filename() const
the filename of the attachment
Definition: attachment.h:80
Definition: mapi_exception.h:37
std::vector< message_shared_ptr > message_container_type
Definition: folder.h:46
bool operator!=(const property_container_iterator &rhs) const
operator!=
Definition: property_container.h:134
~property_container()
Destructor.
Definition: property_container.h:275
virtual ~attachment()
Destructor.
Definition: attachment.h:85
This class represents a message attachment.
Definition: attachment.h:45
const void * operator*()
operator*
Definition: property_container.h:144
mapi_object_t m_object
Definition: object.h:96
message_container_type fetch_messages()
Fetch all messages in this folder.
virtual const char * what() const
Definition: mapi_exception.h:48
virtual session & get_session()
Obtain the session associated with this object.
Definition: object.h:79
std::string get_default_profile_name()
Get the default profile name.
virtual ~object()
Destructor.
Definition: object.h:86
iterator begin() const
Definition: property_container.h:243
hierarchy_container_type fetch_hierarchy()
Fetch all subfolders within this folder.
mapi_id_t get_id() const
Obtain folder id.
Definition: folder.h:78
property_container_iterator(SPropValue *property_values)
Definition: property_container.h:44
property_container_iterator & operator++()
operator++
Definition: property_container.h:105
int get_tag()
Get Property Tag of the Property Value this operator points to.
Definition: property_container.h:93
Iterator to use with Property Container.
Definition: property_container.h:38
This class represents a MAPI session with the Exchange Server.
Definition: session.h:62
std::shared_ptr< attachment > attachment_shared_ptr
Definition: message.h:47
property_container_iterator iterator
Definition: property_container.h:162
~profile()
Definition: profile.h:115
void delete_message(mapi_id_t message_id)
Delete a message that belongs to this folder.
Definition: folder.h:85
mapi_id_t get_id() const
Get this message's ID.
Definition: message.h:74
enum MAPITAGS get_tag_at(uint32_t pos)
Definition: property_container.h:235
Definition: profile.h:112
session(const std::string &profiledb="", const bool debug=false)
Constructor.
mapi_exception(enum MAPISTATUS status, const std::string &origin="")
Definition: mapi_exception.h:40
std::vector< folder_shared_ptr > hierarchy_container_type
Hierarchy folders.
Definition: folder.h:58
This class represents a message in Exchange.
Definition: message.h:45
mapi_id_t get_default_folder(const uint32_t id) const
Retrieves the folder id for the specified default folder in the Message Store.
Definition: message_store.h:72
virtual ~mapi_exception()
Definition: mapi_exception.h:52
folder(object &parent_folder, const mapi_id_t folder_id)
Constructor.
Definition: folder.h:66
session & m_session
Definition: object.h:97
std::shared_ptr< folder > folder_shared_ptr
Pointer to a folder.
Definition: folder.h:51
message_store & get_message_store()
Obtain a reference to the message_store associated with this session.
Definition: session.h:100
std::shared_ptr< message > message_shared_ptr
Pointer to a message.
Definition: folder.h:44
This class represents a user profile database.
Definition: profile.h:41
std::string get_profile_name() const
The name of the profile that is in use.
Definition: session.h:93
const void * get_mapi_SPropValue_data(struct mapi_SPropValue *lpProp)
The libmapi++ classes and other definitions are all enclosed in the libmapipp namespace.
Definition: attachment.h:31
void fetch_all()
Fetches ALL properties of the object associated with this container.
Definition: property_container.h:191
property_container_iterator(mapi_SPropValue *mapi_property_values)
Definition: property_container.h:48
mapi_session * get_mapi_session()
The underlying mapi_session.
Definition: session.h:123
virtual ~message()
Destructor.
Definition: message.h:84
const uint8_t * get_data() const
the contents of the attachment
Definition: attachment.h:64
uint32_t get_num() const
The attachment number.
Definition: attachment.h:57
int get_type()
Get Property Tag Type.
Definition: property_container.h:77
property_container_iterator operator++(int postfix)
operator++ postfix
Definition: property_container.h:116
bool set_default(const std::string &profname)
Make the specified profile the default profile.
Definition: profile.h:85
~session()
Uninitialize and clean up the MAPI session.
Definition: session.h:113
#define STATUS_TABLE_INSERT(status)
Definition: mapi_exception.h:33
This class represents the Message Store in Exchange.
Definition: message_store.h:46
enum MAPISTATUS get_status() const
Definition: mapi_exception.h:50
TALLOC_CTX * get_memory_ctx()
Obtain a talloc memory context for this session.
Definition: session.h:108
void login(const std::string &profile_name="", const std::string &password="")
Log-in to the Exchange Server.
profile_database(const std::string &profiledb_path="")
Constructor.
property_container & operator<<(uint32_t property_tag)
Adds a Property Tag to be fetched by fetch().
Definition: property_container.h:206
object(session &mapi_session, const std::string &object_type="")
Object Constructor.
Definition: object.h:55
bool set_default(const char *profname)
Make the specified profile the default profile.
Definition: profile.h:75
attachment_container_type fetch_attachments()
Fetches all attachments in this message.
property_container(TALLOC_CTX *memory_ctx, mapi_object_t &mapi_object)
Constructor.
Definition: property_container.h:166
uint32_t fetch()
Fetches properties with the tags supplied using operator<<.
Definition: property_container.h:178
This class represents a folder or container within Exchange.
Definition: folder.h:39
static bool create_profile_store(const char *profiledb, const char *ldif_path=NULL)
iterator end() const
Definition: property_container.h:253
Base Object class.
Definition: object.h:47
bool operator==(const property_container_iterator &rhs) const
operator==
Definition: property_container.h:128
uint32_t get_data_size() const
the size of the attachment
Definition: attachment.h:71
A container of properties to be used with classes derived from object.
Definition: property_container.h:159
property_container_iterator()
Default Constructor. Creates an invalid iterator.
Definition: property_container.h:41
attachment(message &mapi_message, const uint32_t attach_num)
Constructor.
const typedef void * value_type
Definition: property_container.h:163

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/