Browse Source

Feature: Add set_comm_partner_key()

pull/14/head
heck 4 years ago
parent
commit
cc2a5a2aa7
  1. 7
      src/pEp/_pEp/basic_api.cc
  2. 9
      src/pEp/_pEp/pEpmodule.cc

7
src/pEp/_pEp/basic_api.cc

@ -175,5 +175,12 @@ namespace pEp {
_throw_status(status); _throw_status(status);
} }
void set_comm_partner_key(Identity &ident, string fpr)
{
const char *fpr_c = fpr.c_str();
PEP_STATUS status = ::set_comm_partner_key(Adapter::session(), ident, fpr_c);
_throw_status(status);
}
} // namespace PythonAdapter } // namespace PythonAdapter
} // namespace pEp } // namespace pEp

9
src/pEp/_pEp/pEpmodule.cc

@ -669,6 +669,15 @@ namespace pEp {
"me->address must not be an alias\n" "me->address must not be an alias\n"
"me->fpr will be ignored and replaced by fpr\n"); "me->fpr will be ignored and replaced by fpr\n");
def("set_comm_partner_key",
&set_comm_partner_key,
"set_comm_partner_key(ident, fpr)\n"
"\n"
"Mark a key the default for a comm partner\n"
"\n"
"ident partner identity this key is used for\n"
"fpr fingerprint of the key to set as the identity default\n");
// message API // message API
enum_<PEP_rating>("rating") enum_<PEP_rating>("rating")

Loading…
Cancel
Save