ews-cpp  0.9
Public Types | Public Member Functions | List of all members
ews::basic_service< RequestHandler > Class Template Referencefinal

Allows you to perform operations on an Exchange server. More...

#include <ews.hpp>

Public Types

typedef std::function< void(const std::string &)> debug_callback
 Callback for debug messages.
 

Public Member Functions

 basic_service (const std::string &server_uri, const std::string &domain, const std::string &username, const std::string &password)
 Constructs a new service with given credentials to a server specified by server_uri. More...
 
 basic_service (const std::string &server_uri, const internal::credentials &creds)
 Constructs a new service with given credentials to a server specified by server_uri.
 
 basic_service (const std::string &server_uri, const internal::credentials &creds, const std::string &cainfo, const std::string &capath, const std::string &proxy_uri, const bool is_http_proxy_tunneling, const debug_callback &callback, const ssl_options ssl_opts=ssl_options::none)
 Constructs a new service with given credentials to a server specified by server_uri.
 
std::vector< delegate_useradd_delegate (const mailbox &mailbox, const std::vector< delegate_user > &delegates)
 Add new delegates to given mailbox.
 
attachment_id create_attachment (const item_id &parent_item, const attachment &a)
 Lets you attach a file (or another item) to an existing item. More...
 
folder_id create_folder (const folder &new_folder, const folder_id &parent_folder)
 Create a new folder in the Exchange store. More...
 
std::vector< folder_idcreate_folder (const std::vector< folder > &new_folders, const folder_id &parent_folder)
 Create a new folder in the Exchange store. More...
 
item_id create_item (const task &the_task)
 Creates a new task from the given object in the Exchange store. More...
 
item_id create_item (const task &the_task, const folder_id &folder)
 Creates a new task from the given object in the the specified folder. More...
 
std::vector< item_idcreate_item (const std::vector< task > &tasks)
 Creates new tasks from the given vector in the Exchange store. More...
 
std::vector< item_idcreate_item (const std::vector< task > &tasks, const folder_id &folder)
 Creates new tasks from the given vector in the the specified folder. More...
 
item_id create_item (const contact &the_contact)
 Creates a new contact from the given object in the Exchange store. More...
 
item_id create_item (const contact &the_contact, const folder_id &folder)
 Creates a new contact from the given object in the specified folder. More...
 
std::vector< item_idcreate_item (const std::vector< contact > &contacts)
 Creates new contacts from the given vector in the Exchange store. More...
 
std::vector< item_idcreate_item (const std::vector< contact > &contacts, const folder_id &folder)
 Creates new contacts from the given vector in the specified folder. More...
 
item_id create_item (const calendar_item &the_calendar_item, send_meeting_invitations send_invitations=send_meeting_invitations::send_to_none)
 Creates a new calendar item from the given object in the Exchange store. More...
 
item_id create_item (const calendar_item &the_calendar_item, send_meeting_invitations send_invitations, const folder_id &folder)
 Creates a new calendar item from the given object in the specified folder. More...
 
std::vector< item_idcreate_item (const std::vector< calendar_item > &calendar_items, send_meeting_invitations send_invitations=send_meeting_invitations::send_to_none)
 Creates new calendar items from the given vector in the Exchange store. More...
 
std::vector< item_idcreate_item (const std::vector< calendar_item > &calendar_items, send_meeting_invitations send_invitations, const folder_id &folder)
 Creates new calendar items from the given vector in the specified folder. More...
 
item_id create_item (const message &the_message, message_disposition disposition)
 Creates a new message in the Exchange store. More...
 
item_id create_item (const message &the_message, message_disposition disposition, const folder_id &folder)
 Creates a new message in the specified folder. More...
 
std::vector< item_idcreate_item (const std::vector< message > &messages, message_disposition disposition)
 Creates new messages in the Exchange store. More...
 
std::vector< item_idcreate_item (const std::vector< message > &messages, message_disposition disposition, const folder_id &folder)
 Creates new messages in the specified folder. More...
 
item_id delete_attachment (const attachment_id &id)
 Deletes given attachment from the Exchange store. More...
 
void delete_calendar_item (calendar_item &&the_calendar_item, delete_type del_type=delete_type::hard_delete, send_meeting_cancellations cancellations=send_meeting_cancellations::send_to_none)
 Delete a calendar item from the Exchange store.
 
void delete_contact (contact &&the_contact)
 Delete a contact from the Exchange store.
 
void delete_folder (const folder_id &id, delete_type del_type=delete_type::hard_delete)
 Delete a folder from the Exchange store.
 
void delete_item (const item_id &id, delete_type del_type=delete_type::hard_delete, affected_task_occurrences affected=affected_task_occurrences::all_occurrences, send_meeting_cancellations cancellations=send_meeting_cancellations::send_to_none)
 Delete an arbitrary item from the Exchange store.
 
void delete_message (message &&the_message)
 Delete a message item from the Exchange store.
 
void delete_task (task &&the_task, delete_type del_type=delete_type::hard_delete, affected_task_occurrences affected=affected_task_occurrences::all_occurrences)
 Delete a task item from the Exchange store.
 
std::vector< folder_idfind_folder (const folder_id &parent_folder_id)
 Sends a <FindFolder/> operation to the server. More...
 
std::vector< item_idfind_item (const folder_id &parent_folder_id, const paging_view &view)
 
std::vector< item_idfind_item (const folder_id &parent_folder_id)
 
std::vector< calendar_itemfind_item (const calendar_view &view, const folder_id &parent_folder_id, const item_shape &shape=item_shape())
 Returns all calendar items in given calendar view. More...
 
std::vector< item_idfind_item (const folder_id &parent_folder_id, search_expression restriction)
 Sends a <FindItem/> operation to the server. More...
 
attachment get_attachment (const attachment_id &id, bool include_mime_content=false)
 Retrieves an attachment from the Exchange store.
 
calendar_item get_calendar_item (const item_id &id, const item_shape &shape=item_shape())
 Gets a calendar item from the Exchange store.
 
calendar_item get_calendar_item (const occurrence_item_id &id, const item_shape &shape=item_shape())
 Gets a calendar item from the Exchange store.
 
std::vector< calendar_itemget_calendar_items (const std::vector< item_id > &ids, const item_shape &shape=item_shape())
 Gets a bunch of calendar items from the Exchange store at once.
 
std::vector< calendar_itemget_calendar_items (const std::vector< occurrence_item_id > &ids, const item_shape &shape=item_shape())
 Gets a bunch of calendar items from the Exchange store at once.
 
contact get_contact (const item_id &id, const item_shape &shape=item_shape())
 Gets a contact from the Exchange store.
 
std::vector< contactget_contacts (const std::vector< item_id > &ids, const item_shape &shape=item_shape())
 Gets multiple contacts from the Exchange store.
 
std::vector< delegate_userget_delegate (const mailbox &mailbox, bool include_permissions=false)
 Retrieves the delegate users and settings for the specified mailbox.
 
folder get_folder (const folder_id &id)
 Gets a folder from the Exchange store.
 
folder get_folder (const folder_id &id, const std::vector< property_path > &additional_properties)
 Gets a folder from the Exchange store.
 
std::vector< folderget_folders (const std::vector< folder_id > &ids)
 Gets a list of folders from the Exchange store.
 
std::vector< folderget_folders (const std::vector< folder_id > &ids, const std::vector< property_path > &additional_properties)
 Gets a list of folders from Exchange store.
 
message get_message (const item_id &id, const item_shape &shape=item_shape())
 Gets a message item from the Exchange store.
 
std::vector< messageget_messages (const std::vector< item_id > &ids, const item_shape &shape=item_shape())
 Gets multiple message items from the Exchange store.
 
server_version get_request_server_version () const
 Returns the schema version that is used in requests by this service.
 
std::vector< mailboxget_room_lists ()
 Gets all room lists in the Exchange store.
 
std::vector< mailboxget_rooms (const mailbox &room_list)
 Gets all rooms from a room list in the Exchange store.
 
task get_task (const item_id &id, const item_shape &shape=item_shape())
 Gets a task from the Exchange store.
 
std::vector< taskget_tasks (const std::vector< item_id > &ids, const item_shape &shape=item_shape())
 Gets multiple tasks from the Exchange store.
 
time_zone get_time_zone ()
 Returns the time zone ID currently used for the header of the request made by this service.
 
basic_serviceimpersonate ()
 
basic_serviceimpersonate (const connecting_sid &sid)
 
folder_id move_folder (folder_id folder, const folder_id &target)
 Moves one folder to a folder. More...
 
std::vector< folder_idmove_folder (const std::vector< folder_id > &folders, const folder_id &target)
 Moves one or more folders to a target folder. More...
 
item_id move_item (item_id item, const folder_id &folder)
 Moves one item to a folder. More...
 
std::vector< item_idmove_item (const std::vector< item_id > &items, const folder_id &folder)
 Moves one or more items to a folder. More...
 
void remove_delegate (const mailbox &mailbox, const std::vector< user_id > &delegates)
 
resolution_set resolve_names (const std::string &unresolved_entry, search_scope scope)
 The ResolveNames operation resolves ambiguous email addresses and display names. More...
 
resolution_set resolve_names (const std::string &unresolved_entry, search_scope scope, const std::vector< folder_id > &parent_folder_ids)
 The ResolveNames operation resolves ambiguous email addresses and display names. More...
 
void send_item (const item_id &id)
 
void send_item (const std::vector< item_id > &ids)
 
void send_item (const item_id &id, const folder_id &folder)
 Sends a message that is already in the Exchange store. More...
 
void send_item (const std::vector< item_id > &ids, const folder_id &folder)
 Sends messages that are already in the Exchange store. More...
 
void set_cainfo (const std::string &path)
 Sets the path to file holding certificates.
 
void set_capath (const std::string &path)
 Sets the path to the certificates directory.
 
void set_debug_callback (const debug_callback &callback)
 Sets the callback for debug messages.
 
void set_http_proxy_tunnel (const bool value)
 Activate or deactivates HTTP proxy tunneling.
 
void set_proxy (const std::string &url)
 Sets the URL of the proxy which should be used for connecting to the EWS service.
 
void set_request_server_version (server_version vers)
 Sets the schema version that will be used in requests made by this service.
 
void set_ssl_options (const ssl_options value)
 Sets the SSL options.
 
void set_time_zone (const time_zone time_zone)
 Sets the time zone ID used in the header of the request made by this service.
 
void set_timeout (std::chrono::seconds d)
 Sets maximum time the request is allowed to take. More...
 
sync_folder_hierarchy_result sync_folder_hierarchy (const folder_id &folder_id)
 Synchronizes the folder hierarchy in the Exchange store.
 
sync_folder_hierarchy_result sync_folder_hierarchy (const folder_id &folder_id, const std::string &sync_state)
 
sync_folder_items_result sync_folder_items (const folder_id &folder_id, int max_changes_returned=512)
 Synchronizes a folder in the Exchange store.
 
sync_folder_items_result sync_folder_items (const folder_id &folder_id, const std::string &sync_state, int max_changes_returned=512)
 
sync_folder_items_result sync_folder_items (const folder_id &folder_id, const std::string &sync_state, const std::vector< item_id > &ignored_items, int max_changes_returned=512)
 
folder_id update_folder (folder_id folder_id, update change)
 Update an existing folder's property. More...
 
folder_id update_folder (folder_id folder_id, const std::vector< update > &changes)
 Update multiple properties of an existing folder. More...
 
item_id update_item (item_id id, update change, conflict_resolution resolution=conflict_resolution::auto_resolve, send_meeting_invitations_or_cancellations invitations_or_cancellations=send_meeting_invitations_or_cancellations::send_to_none)
 Update an existing item's property. More...
 
item_id update_item (item_id id, update change, conflict_resolution resolution, send_meeting_invitations_or_cancellations invitations_or_cancellations, const folder_id &folder)
 Update an existing item's property in the specified folder. More...
 
item_id update_item (item_id id, const std::vector< update > &changes, conflict_resolution resolution=conflict_resolution::auto_resolve, send_meeting_invitations_or_cancellations invitations_or_cancellations=send_meeting_invitations_or_cancellations::send_to_none)
 Update multiple properties of an existing item. More...
 
item_id update_item (item_id id, const std::vector< update > &changes, conflict_resolution resolution, send_meeting_invitations_or_cancellations invitations_or_cancellations, const folder_id &folder)
 Update multiple properties of an existing item in the specified folder. More...
 

Detailed Description

template<typename RequestHandler = internal::http_request>
class ews::basic_service< RequestHandler >

Allows you to perform operations on an Exchange server.

A service object is used to establish a connection to an Exchange server, authenticate against it, and make one, or more likely, multiple API calls to it, called operations. The basic_service class provides all operations that can be performed on an Exchange server as public member-functions, e.g.,

to name a few.

General Usage

Usually you want to create one service instance and keep it alive as long as you need a connection to the Exchange server. A TCP connection is established as soon as you make the first call to the server. That TCP connection is kept alive as long as the instance is around. Upon destruction, the TCP connection is closed.

While you can create a new service object for each call to, lets say create_item, it is not encouraged to do so because with every new service instance you construct you'd create a new TCP connection and authenticate to the server again which would imply a great deal of overhead for just a single API call. Instead, try to re-use a service object for as many calls to the API as possible.

Thread Safety

Instances of this class are re-entrant but not thread safe. This means that you should not share references to service instances across threads without providing synchronization but it is totally safe to have multiple distinct service instances in different threads.

Constructor & Destructor Documentation

template<typename RequestHandler = internal::http_request>
ews::basic_service< RequestHandler >::basic_service ( const std::string &  server_uri,
const std::string &  domain,
const std::string &  username,
const std::string &  password 
)
inline

Constructs a new service with given credentials to a server specified by server_uri.

This constructor will always use NTLM authentication.

Member Function Documentation

template<typename RequestHandler = internal::http_request>
attachment_id ews::basic_service< RequestHandler >::create_attachment ( const item_id parent_item,
const attachment a 
)
inline

Lets you attach a file (or another item) to an existing item.

Parameters
parent_itemAn existing item in the Exchange store
aThe <FileAttachment> or <ItemAttachment> you want to attach to parent_item
template<typename RequestHandler = internal::http_request>
folder_id ews::basic_service< RequestHandler >::create_folder ( const folder new_folder,
const folder_id parent_folder 
)
inline

Create a new folder in the Exchange store.

Parameters
new_folderThe new folder that specified the display name.
parent_folderThe parent folder of the new folder.
Returns
The new folders folder_id if successful.
template<typename RequestHandler = internal::http_request>
std::vector<folder_id> ews::basic_service< RequestHandler >::create_folder ( const std::vector< folder > &  new_folders,
const folder_id parent_folder 
)
inline

Create a new folder in the Exchange store.

Parameters
new_foldersThe new folder that specified the display name.
parent_folderThe parent folder of the new folder.
Returns
The new folders folder_id if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const task the_task)
inline

Creates a new task from the given object in the Exchange store.

Returns
The new task's item_id if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const task the_task,
const folder_id folder 
)
inline

Creates a new task from the given object in the the specified folder.

Parameters
the_taskThe task that is about to be created.
folderThe target folder where the task is saved.
Returns
The new task's item_id if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< task > &  tasks)
inline

Creates new tasks from the given vector in the Exchange store.

Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< task > &  tasks,
const folder_id folder 
)
inline

Creates new tasks from the given vector in the the specified folder.

Parameters
tasksThe tasks that are about to be created.
folderThe target folder where the tasks are saved.
Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const contact the_contact)
inline

Creates a new contact from the given object in the Exchange store.

Returns
The new contact's item_id if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const contact the_contact,
const folder_id folder 
)
inline

Creates a new contact from the given object in the specified folder.

Parameters
the_contactThe contact that is about to be created.
folderThe target folder where the contact is saved.
Returns
The new contact's item_id if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< contact > &  contacts)
inline

Creates new contacts from the given vector in the Exchange store.

Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< contact > &  contacts,
const folder_id folder 
)
inline

Creates new contacts from the given vector in the specified folder.

Parameters
contactsThe contacts that are about to be created.
folderThe target folder where the contact is saved.
Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const calendar_item the_calendar_item,
send_meeting_invitations  send_invitations = send_meeting_invitations::send_to_none 
)
inline

Creates a new calendar item from the given object in the Exchange store.

Parameters
the_calendar_itemThe calendar item that is about to be created.
send_invitationsWhether to send invitations to any participants.
Returns
The new calendar items's item_id if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const calendar_item the_calendar_item,
send_meeting_invitations  send_invitations,
const folder_id folder 
)
inline

Creates a new calendar item from the given object in the specified folder.

Parameters
the_calendar_itemThe calendar item that is about to be created.
send_invitationsWhether to send invitations to any participants.
folderThe target folder where the calendar item is saved.
Returns
The new calendar items's item_id if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< calendar_item > &  calendar_items,
send_meeting_invitations  send_invitations = send_meeting_invitations::send_to_none 
)
inline

Creates new calendar items from the given vector in the Exchange store.

Parameters
calendar_itemsThe calendar items that are about to be created.
send_invitationsWhether to send invitations to any participants.
Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< calendar_item > &  calendar_items,
send_meeting_invitations  send_invitations,
const folder_id folder 
)
inline

Creates new calendar items from the given vector in the specified folder.

Parameters
calendar_itemsThe calendar items that are about to be created.
send_invitationsWhether to send invitations to any participants.
folderThe target folder where the calendar item is saved.
Returns
A vector of item_ids if successful.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const message the_message,
message_disposition  disposition 
)
inline

Creates a new message in the Exchange store.

Creates a new message and, depending of the chosen message disposition, sends it to the recipients.

Note that if you pass message_disposition::send_only or message_disposition::send_and_save_copy this function always returns an invalid item id because Exchange does not include the item identifier in the response. A common workaround for this would be to create the item with message_disposition::save_only, get the item identifier, and then use the send_item to send the message.

Returns
The item id of the saved message when message_disposition::save_only was given; otherwise an invalid item id.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::create_item ( const message the_message,
message_disposition  disposition,
const folder_id folder 
)
inline

Creates a new message in the specified folder.

Parameters
the_messageThe message item that is about to be created.
dispositionWhether the message is only saved, only send, or saved and send.
folderThe target folder where the message is saved.
Returns
The item id of the saved message when message_disposition::save_only was given; otherwise an invalid item id.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< message > &  messages,
message_disposition  disposition 
)
inline

Creates new messages in the Exchange store.

Creates new messages and, depending of the chosen message disposition, sends them to the recipients.

Note that if you pass message_disposition::send_only or message_disposition::send_and_save_copy this function always returns an invalid item id because Exchange does not include the item identifier in the response. A common workaround for this would be to create the item with message_disposition::save_only, get the item identifier, and then use the send_item to send the message.

Returns
A vector of the item ids of the saved messages when message_disposition::save_only was given; otherwise a vector of invalid item ids.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::create_item ( const std::vector< message > &  messages,
message_disposition  disposition,
const folder_id folder 
)
inline

Creates new messages in the specified folder.

Parameters
messagesThe message items that are about to be created.
dispositionWhether the message is only saved, only send, or saved and send.
folderThe target folder where the message is saved.
Returns
A vector of the item ids of the saved messages when message_disposition::save_only was given; otherwise a vector of invalid item ids.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::delete_attachment ( const attachment_id id)
inline

Deletes given attachment from the Exchange store.

Returns the item_id of the parent item from which the attachment was removed (also known as root item). This item_id contains the updated change key of the parent item.

template<typename RequestHandler = internal::http_request>
std::vector<folder_id> ews::basic_service< RequestHandler >::find_folder ( const folder_id parent_folder_id)
inline

Sends a <FindFolder/> operation to the server.

Returns all subfolder in a specified folder from the users mailbox.

Parameters
parent_folder_idThe parent folder in the mailbox

Returns a list of subfolder (item_ids) that are located inside the specified parent folder

template<typename RequestHandler = internal::http_request>
std::vector<calendar_item> ews::basic_service< RequestHandler >::find_item ( const calendar_view view,
const folder_id parent_folder_id,
const item_shape shape = item_shape() 
)
inline

Returns all calendar items in given calendar view.

Sends a <FindItem/> operation to the server containing a <CalendarView/> element. It returns single calendar items and all occurrences of recurring meetings.

template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::find_item ( const folder_id parent_folder_id,
search_expression  restriction 
)
inline

Sends a <FindItem/> operation to the server.

Allows you to search for items that are located in a user's mailbox.

Parameters
parent_folder_idThe folder in the mailbox that is searched
restrictionA search expression that restricts the elements returned by this operation

Returns a list of items (item_ids) that match given folder and restrictions

template<typename RequestHandler = internal::http_request>
folder_id ews::basic_service< RequestHandler >::move_folder ( folder_id  folder,
const folder_id target 
)
inline

Moves one folder to a folder.

Parameters
folderThe id of the folder you want to move.
targetThe id of the target folder.
Returns
The new item_id of the folder that has been moved.
template<typename RequestHandler = internal::http_request>
std::vector<folder_id> ews::basic_service< RequestHandler >::move_folder ( const std::vector< folder_id > &  folders,
const folder_id target 
)
inline

Moves one or more folders to a target folder.

Parameters
foldersA list of ids of folders that shall be moved.
targetThe id of the target folder.
Returns
A vector of new ids of the folders that have been moved.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::move_item ( item_id  item,
const folder_id folder 
)
inline

Moves one item to a folder.

Parameters
itemThe id of the item you want to move.
folderThe id of the target folder.
Returns
The new id of the item that has been moved.
template<typename RequestHandler = internal::http_request>
std::vector<item_id> ews::basic_service< RequestHandler >::move_item ( const std::vector< item_id > &  items,
const folder_id folder 
)
inline

Moves one or more items to a folder.

Parameters
itemsA list of ids of items that shall be moved.
folderThe id of the target folder.
Returns
A vector of new ids of the items that have been moved.
template<typename RequestHandler = internal::http_request>
resolution_set ews::basic_service< RequestHandler >::resolve_names ( const std::string &  unresolved_entry,
search_scope  scope 
)
inline

The ResolveNames operation resolves ambiguous email addresses and display names.

Parameters
unresolved_entryPartial or full name of the user to look for
scopeThe scope in which to look for the user

Returns a resolution_set which contains a vector of resolutions. ContactDataShape and ReturnFullContactData are set by default. A directory_id is returned in place of the contact. If no name can be resolved, an empty resolution_set is returned.

template<typename RequestHandler = internal::http_request>
resolution_set ews::basic_service< RequestHandler >::resolve_names ( const std::string &  unresolved_entry,
search_scope  scope,
const std::vector< folder_id > &  parent_folder_ids 
)
inline

The ResolveNames operation resolves ambiguous email addresses and display names.

Parameters
unresolved_entryPartial or full name of the user to look for
scopeThe scope in which to look for the user
parent_folder_idsContains the folder_ids where to look

Returns a resolution_set which contains a vector of resolutions. ContactDataShape and ReturnFullContactData are set by default. A directory_id is returned in place of the contact. If no name can be resolved, an empty resolution_set is returned.

template<typename RequestHandler = internal::http_request>
void ews::basic_service< RequestHandler >::send_item ( const item_id id)
inline

Sends a message that is already in the Exchange store.

Parameters
idThe item id of the message you want to send
template<typename RequestHandler = internal::http_request>
void ews::basic_service< RequestHandler >::send_item ( const std::vector< item_id > &  ids)
inline

Sends messages that are already in the Exchange store.

Parameters
idsThe item ids of the messages you want to send.
template<typename RequestHandler = internal::http_request>
void ews::basic_service< RequestHandler >::send_item ( const item_id id,
const folder_id folder 
)
inline

Sends a message that is already in the Exchange store.

Parameters
idThe item id of the message you want to send
folderThe folder in the mailbox in which the send message is saved. If you pass an invalid id here, the message won't be saved.
template<typename RequestHandler = internal::http_request>
void ews::basic_service< RequestHandler >::send_item ( const std::vector< item_id > &  ids,
const folder_id folder 
)
inline

Sends messages that are already in the Exchange store.

Parameters
idsThe item ids of the messages you want to send
folderThe folder in the mailbox in which the send messages are saved. If you pass an invalid id here, the messages won't be saved.
template<typename RequestHandler = internal::http_request>
void ews::basic_service< RequestHandler >::set_timeout ( std::chrono::seconds  d)
inline

Sets maximum time the request is allowed to take.

This has been tested and works for short timeout values ( <2), longer periods seem not to work.

To remove any hard limit on a network communication (the default), set the timeout to 0.

template<typename RequestHandler = internal::http_request>
folder_id ews::basic_service< RequestHandler >::update_folder ( folder_id  folder_id,
update  change 
)
inline

Update an existing folder's property.

Sends an <UpdateFolder> request to the server. Allows you to change properties of existing items in the Exchange store.

Parameters
folder_idThe id of the folder you want to change.
changeThe update to the folder.
Returns
The updated folder's new id and change_key upon success.
template<typename RequestHandler = internal::http_request>
folder_id ews::basic_service< RequestHandler >::update_folder ( folder_id  folder_id,
const std::vector< update > &  changes 
)
inline

Update multiple properties of an existing folder.

Sends an <UpdateFolder> request to the server. Allows you to change multiple properties at once.

Parameters
folder_idThe id of the folder you want to change.
changesA list of updates to the folder.
Returns
The updated folder's new id and change_key upon success.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::update_item ( item_id  id,
update  change,
conflict_resolution  resolution = conflict_resolution::auto_resolve,
send_meeting_invitations_or_cancellations  invitations_or_cancellations = send_meeting_invitations_or_cancellations::send_to_none 
)
inline

Update an existing item's property.

Sends an <UpdateItem> request to the server. Allows you to change properties of existing items in the Exchange store.

Parameters
idThe id of the item you want to change.
changeThe update to the item.
resolutionThe conflict resolution mode during the update; normally AutoResolve.
invitations_or_cancellationsSpecifies how meeting updates are communicated to other participants. Only meaningful (and mandatory) if the item is a calendar item.
Returns
The updated item's new id and change_key upon success.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::update_item ( item_id  id,
update  change,
conflict_resolution  resolution,
send_meeting_invitations_or_cancellations  invitations_or_cancellations,
const folder_id folder 
)
inline

Update an existing item's property in the specified folder.

Sends an <UpdateItem> request to the server. Allows you to change properties of an existing item that is located in the specified folder.

Parameters
idThe id of the item you want to change.
changeThe update to the item.
resolutionThe conflict resolution mode during the update; normally AutoResolve.
invitations_or_cancellationsSpecifies how meeting updates are communicated to other participants. Only meaningful (and mandatory) if the item is a calendar item.
folderSpecified the target folder for this operation. This is useful if you want to gain implicit delegate access to another user's items.
Returns
The updated item's new id and change_key upon success.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::update_item ( item_id  id,
const std::vector< update > &  changes,
conflict_resolution  resolution = conflict_resolution::auto_resolve,
send_meeting_invitations_or_cancellations  invitations_or_cancellations = send_meeting_invitations_or_cancellations::send_to_none 
)
inline

Update multiple properties of an existing item.

Sends an <UpdateItem> request to the server. Allows you to change multiple properties at once.

Parameters
idThe id of the item you want to change.
changesA list of updates to the item.
resolutionThe conflict resolution mode during the update; normally AutoResolve.
invitations_or_cancellationsSpecifies how meeting updates are communicated to other participants. Only meaningful if the item is a calendar item.
Returns
The updated item's new id and change_key upon success.
template<typename RequestHandler = internal::http_request>
item_id ews::basic_service< RequestHandler >::update_item ( item_id  id,
const std::vector< update > &  changes,
conflict_resolution  resolution,
send_meeting_invitations_or_cancellations  invitations_or_cancellations,
const folder_id folder 
)
inline

Update multiple properties of an existing item in the specified folder.

Sends an <UpdateItem> request to the server. Allows you to change multiple properties at once.

Parameters
idThe id of the item you want to change.
changesA list of updates to the item.
resolutionThe conflict resolution mode during the update; normally AutoResolve.
invitations_or_cancellationsSpecifies how meeting updates are communicated to other participants. Only meaningful if the item is a calendar item.
folderSpecified the target folder for this operation. This is useful if you want to gain implicit delegate access to another user's items.
Returns
The updated item's new id and change_key upon success.

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