From b1996b2156ab13a9fc44fd94226c067b0c32b94f Mon Sep 17 00:00:00 2001 From: pingshuo Date: Thu, 17 Feb 2022 11:09:56 +0800 Subject: [PATCH 1/3] Compatible with "to_xml()" method and ItemId initialization method "item_id(std::string id)". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If there is no ChangeKey when initializing item_id, to_xml() returns the data of ,which will cause an error. --- include/ews/ews.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/ews/ews.hpp b/include/ews/ews.hpp index 6b691402..a0f8b54a 100644 --- a/include/ews/ews.hpp +++ b/include/ews/ews.hpp @@ -9264,8 +9264,15 @@ class item_id final //! Serializes this item_id to an XML string std::string to_xml() const { - return ""; + // return ""; + std::stringstream sstr; + sstr << ""; + return sstr.str(); } //! Makes an item_id instance from an \ XML element From 8b058d0a894edfc18964faec1953fb97f88e9fd6 Mon Sep 17 00:00:00 2001 From: pingshuo Date: Thu, 17 Feb 2022 11:24:42 +0800 Subject: [PATCH 2/3] delete code annotation --- include/ews/ews.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/ews/ews.hpp b/include/ews/ews.hpp index a0f8b54a..e938f2c4 100644 --- a/include/ews/ews.hpp +++ b/include/ews/ews.hpp @@ -9264,8 +9264,6 @@ class item_id final //! Serializes this item_id to an XML string std::string to_xml() const { - // return ""; std::stringstream sstr; sstr << " Date: Thu, 17 Mar 2022 10:14:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?These=20element=20names=EF=BC=8Csuch=20as?= =?UTF-8?q?=20"inReplyTo","isSubmitted","isDraft","isFromMe","isResend","i?= =?UTF-8?q?sUnmodified"=20are=20wrong.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/ews/ews.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ews/ews.hpp b/include/ews/ews.hpp index e938f2c4..ebe27dd6 100644 --- a/include/ews/ews.hpp +++ b/include/ews/ews.hpp @@ -13873,7 +13873,7 @@ 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. @@ -13881,7 +13881,7 @@ class item //! 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. @@ -13889,7 +13889,7 @@ class item //! 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. @@ -13897,7 +13897,7 @@ class item //! 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. @@ -13905,7 +13905,7 @@ class item //! 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