Browse Source

enable_identity_for_sync() and disable_identity_for_sync()

PYADPT-55
Volker Birk 2 years ago
parent
commit
a082bc35a0
3 changed files with 18 additions and 0 deletions
  1. +12
    -0
      src/identity.cc
  2. +3
    -0
      src/identity.hh
  3. +3
    -0
      src/pEpmodule.cc

+ 12
- 0
src/identity.cc View File

@ -164,6 +164,18 @@ namespace pEp {
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)
: Identity(address, username, user_id, "", 0, lang)


+ 3
- 0
src/identity.hh View File

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


+ 3
- 0
src/pEpmodule.cc View File

@ -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"
"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,
(void(pEp::PythonAdapter::Identity::*)(string)) &pEp::PythonAdapter::Identity::address,
"email address or URI")


Loading…
Cancel
Save