From 6d6f49d52155727f7939b39a005cece19c750b0f Mon Sep 17 00:00:00 2001 From: Edouard Tisserant Date: Thu, 10 Aug 2017 18:43:39 +0200 Subject: [PATCH] PYADPT-14 Remove me boolean member in identity struct --- src/basic_api.cc | 3 --- src/identity.hh | 3 --- src/pEpmodule.cc | 3 --- 3 files changed, 9 deletions(-) diff --git a/src/basic_api.cc b/src/basic_api.cc index 7cf4f93..a747bb6 100644 --- a/src/basic_api.cc +++ b/src/basic_api.cc @@ -9,8 +9,6 @@ namespace pEp { { if (ident.address() == "") throw invalid_argument("address needed"); - if (ident.me()) - throw runtime_error("update_identity: not for own identities"); if (ident.user_id() == PEP_OWN_USERID) throw runtime_error("update_identity: '" PEP_OWN_USERID "' may only be used for own identities"); @@ -28,7 +26,6 @@ namespace pEp { if (!(ident.user_id() == "" || ident.user_id() == PEP_OWN_USERID)) throw invalid_argument("user_id must be empty or '" PEP_OWN_USERID "'"); - ident.me(true); ident.user_id(PEP_OWN_USERID); PEP_STATUS status = myself(session, ident); diff --git a/src/identity.hh b/src/identity.hh index 0eaf70e..b732ca5 100644 --- a/src/identity.hh +++ b/src/identity.hh @@ -49,9 +49,6 @@ namespace pEp { std::string lang(); void lang(std::string value); - bool me() { return _ident->me; } - void me(bool value) { _ident->me = value; } - identity_flags_t flags() { return _ident->flags; } void flags(identity_flags_t flags) { _ident->flags = flags; } diff --git a/src/pEpmodule.cc b/src/pEpmodule.cc index e2ccab7..738e388 100644 --- a/src/pEpmodule.cc +++ b/src/pEpmodule.cc @@ -108,9 +108,6 @@ BOOST_PYTHON_MODULE(pEp) .add_property("lang", (string(pEp::PythonAdapter::Identity::*)()) &pEp::PythonAdapter::Identity::lang, (void(pEp::PythonAdapter::Identity::*)(string)) &pEp::PythonAdapter::Identity::lang, "ISO 639-1 language code") - .add_property("me", (bool(pEp::PythonAdapter::Identity::*)()) &pEp::PythonAdapter::Identity::me, - (void(pEp::PythonAdapter::Identity::*)(bool)) &pEp::PythonAdapter::Identity::me, - "true if own identity, false otherwise") .add_property("flags", (identity_flags_t(pEp::PythonAdapter::Identity::*)()) &pEp::PythonAdapter::Identity::flags, (void(pEp::PythonAdapter::Identity::*)(identity_flags_t)) &pEp::PythonAdapter::Identity::flags, "flags (p≡p internal)")