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

The unique identifier and change key of an item in the Exchange store. More...

#include <ews.hpp>

Public Member Functions

 item_id (std::string id)
 Constructs an <ItemId> from given id string.
 
 item_id (std::string id, std::string change_key)
 Constructs an <ItemId> from given identifier and change key.
 
const std::string & change_key () const EWS_NOEXCEPT
 Returns the change key.
 
const std::string & id () const EWS_NOEXCEPT
 Returns the identifier.
 
std::string to_xml () const
 Serializes this item_id to an XML string.
 
bool valid () const EWS_NOEXCEPT
 Whether this item_id is expected to be valid.
 

Static Public Member Functions

static item_id from_xml_element (const rapidxml::xml_node<> &elem)
 Makes an item_id instance from an <ItemId> XML element.
 

Detailed Description

The unique identifier and change key of an item in the Exchange store.

The ID uniquely identifies a concrete item throughout the Exchange store and is not expected to change as long as the item exists. The change key on the other hand identifies a specific version of an item. It is expected to be changed whenever a property of the item is changed. The change key is used for synchronization purposes on the server. You only need to take care that the change key you include in a service call is the most current one.

Instances of this class are somewhat immutable. You can default construct an item_id in which case valid() will always return false. (Default construction is needed because we need item and it's sub-classes to be default constructible.) Only item_ids that come from an Exchange store are considered to be valid.


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