Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with "to_xml()" method and ItemId initialization method "item_id(std::string id)". #199

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions include/ews/ews.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9264,8 +9264,13 @@ class item_id final
//! Serializes this item_id to an XML string
std::string to_xml() const
{
return "<t:ItemId Id=\"" + id() + "\" ChangeKey=\"" + change_key() +
"\"/>";
std::stringstream sstr;
sstr << "<t:ItemId Id=\"" << id_;
if (!change_key_.empty()) {
sstr << "\" ChangeKey=\"" << change_key_;
}
sstr << "\"/>";
return sstr.str();
}

//! Makes an item_id instance from an <tt>\<ItemId></tt> XML element
Expand Down Expand Up @@ -13868,39 +13873,39 @@ class item
//! Default: false.
bool is_submitted() const
{
return xml().get_value_as_string("isSubmitted") == "true";
return xml().get_value_as_string("IsSubmitted") == "true";
}

//! \brief True if this item is a draft.
//!
//! Default: false
bool is_draft() const
{
return xml().get_value_as_string("isDraft") == "true";
return xml().get_value_as_string("IsDraft") == "true";
}

//! \brief True if this item is from you.
//!
//! Default: false.
bool is_from_me() const
{
return xml().get_value_as_string("isFromMe") == "true";
return xml().get_value_as_string("IsFromMe") == "true";
}

//! \brief True if this item a re-send.
//!
//! Default: false
bool is_resend() const
{
return xml().get_value_as_string("isResend") == "true";
return xml().get_value_as_string("IsResend") == "true";
}

//! \brief True if this item is unmodified.
//!
//! Default: false.
bool is_unmodified() const
{
return xml().get_value_as_string("isUnmodified") == "true";
return xml().get_value_as_string("IsUnmodified") == "true";
}

//! \brief Returns a collection of Internet message headers associated
Expand Down