ews-cpp  0.9
Public Member Functions | Static Public Member Functions | List of all members
ews::mailbox Class Referencefinal

Represents a SMTP mailbox. More...

#include <ews.hpp>

Public Member Functions

 mailbox (item_id id)
 
 mailbox (std::string value, std::string name=std::string(), std::string routing_type=std::string(), std::string mailbox_type=std::string())
 
const item_idid () const EWS_NOEXCEPT
 
const std::string & mailbox_type () const EWS_NOEXCEPT
 Returns the mailbox type. More...
 
const std::string & name () const EWS_NOEXCEPT
 Returns the name of the mailbox user. More...
 
bool none () const EWS_NOEXCEPT
 True if this mailbox is undefined.
 
const std::string & routing_type () const EWS_NOEXCEPT
 Returns the routing type. More...
 
std::string to_xml (const char *xmlns="t") const
 Returns the XML serialized string of this mailbox. More...
 
rapidxml::xml_node & to_xml_element (rapidxml::xml_node<> &parent) const
 Creates a new <Mailbox> XML element and appends it to given parent node. More...
 
const std::string & value () const EWS_NOEXCEPT
 Returns the email address.
 

Static Public Member Functions

static mailbox from_xml_element (const rapidxml::xml_node<> &elem)
 Makes a mailbox instance from a <Mailbox> XML element.
 

Detailed Description

Represents a SMTP mailbox.

Identifies a fully resolved email address. Usually represents a contact's email address, a message recipient, or the organizer of a meeting.

Member Function Documentation

const std::string& ews::mailbox::mailbox_type ( ) const
inline

Returns the mailbox type.

This attribute is optional.

const std::string& ews::mailbox::name ( ) const
inline

Returns the name of the mailbox user.

This attribute is optional.

const std::string& ews::mailbox::routing_type ( ) const
inline

Returns the routing type.

This attribute is optional. Default is SMTP

std::string ews::mailbox::to_xml ( const char *  xmlns = "t") const
inline

Returns the XML serialized string of this mailbox.

Note: <Mailbox> is a part of http://schemas.microsoft.com/exchange/services/2006/types namespace. At least that is what the documentation says. However, in the <GetDelegate> request the <Mailbox> element is expected to be part of http://schemas.microsoft.com/exchange/services/2006/messages. This is the reason for the extra argument.

rapidxml::xml_node& ews::mailbox::to_xml_element ( rapidxml::xml_node<> &  parent) const
inline

Creates a new <Mailbox> XML element and appends it to given parent node.

Returns a reference to the newly created element.


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