Browse Source

enable_identity_for_sync() and disable_identity_for_sync()

PYADPT-55
Volker Birk 6 years ago
parent
commit
a082bc35a0
  1. 12
      src/identity.cc
  2. 3
      src/identity.hh
  3. 3
      src/pEpmodule.cc

12
src/identity.cc

@ -164,6 +164,18 @@ namespace pEp {
return result; return result;
} }
void Identity::enable_for_sync()
{
PEP_STATUS status = ::enable_identity_for_sync(adapter.session(), *this);
_throw_status(status);
}
void Identity::disable_for_sync()
{
PEP_STATUS status = ::disable_identity_for_sync(adapter.session(), *this);
_throw_status(status);
}
Myself::Myself(string address, string username, string user_id, string lang) Myself::Myself(string address, string username, string user_id, string lang)
: Identity(address, username, user_id, "", 0, lang) : Identity(address, username, user_id, "", 0, lang)

3
src/identity.hh

@ -67,6 +67,9 @@ namespace pEp {
void key_reset(string fpr=""); void key_reset(string fpr="");
bool is_pEp_user(); bool is_pEp_user();
void enable_for_sync();
void disable_for_sync();
}; };
class Myself : public Identity { class Myself : public Identity {

3
src/pEpmodule.cc

@ -202,6 +202,9 @@ BOOST_PYTHON_MODULE(pEp)
"identity. If it does not, remove the key from the keyring; the key's status is\n" "identity. If it does not, remove the key from the keyring; the key's status is\n"
"completely fresh on next contact from the partner.") "completely fresh on next contact from the partner.")
.def("enable_for_sync", &pEp::PythonAdapter::Identity::enable_for_sync)
.def("disable_for_sync", &pEp::PythonAdapter::Identity::disable_for_sync)
.add_property("address", (string(pEp::PythonAdapter::Identity::*)()) &pEp::PythonAdapter::Identity::address, .add_property("address", (string(pEp::PythonAdapter::Identity::*)()) &pEp::PythonAdapter::Identity::address,
(void(pEp::PythonAdapter::Identity::*)(string)) &pEp::PythonAdapter::Identity::address, (void(pEp::PythonAdapter::Identity::*)(string)) &pEp::PythonAdapter::Identity::address,
"email address or URI") "email address or URI")

Loading…
Cancel
Save