Browse Source

PYADPT-14 Remove me boolean member in identity struct

PYADPT-55
Edouard Tisserant 8 years ago
parent
commit
6d6f49d521
  1. 3
      src/basic_api.cc
  2. 3
      src/identity.hh
  3. 3
      src/pEpmodule.cc

3
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);

3
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; }

3
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)")

Loading…
Cancel
Save