From 268a4c5d26081af2940b0efbcc98b95fe2e791b8 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 26 Aug 2022 13:19:05 +0200 Subject: [PATCH 1/5] #8 - add new signal --- src/pEp/_pEp/pEpmodule.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index 5872ed9..ce92f8c 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -652,7 +652,8 @@ namespace pEp { .value("SYNC_NOTIFY_ACCEPTED_GROUP_CREATED", SYNC_NOTIFY_ACCEPTED_GROUP_CREATED) .value("SYNC_NOTIFY_ACCEPTED_DEVICE_ACCEPTED", SYNC_NOTIFY_ACCEPTED_DEVICE_ACCEPTED) .value("SYNC_NOTIFY_SOLE", SYNC_NOTIFY_SOLE) - .value("SYNC_NOTIFY_IN_GROUP", SYNC_NOTIFY_IN_GROUP); + .value("SYNC_NOTIFY_IN_GROUP", SYNC_NOTIFY_IN_GROUP) + .value("SYNC_NOTIFY_OUTGOING_RATING_CHANGE", SYNC_NOTIFY_OUTGOING_RATING_CHANGE); def("deliver_handshake_result", &deliverHandshakeResult, boost::python::arg("identities")=object(), "deliverHandshakeResult(self, result, identities=None)\n" From 69bda89fa21de8030be251a6d8919cd01b33ea6f Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 26 Aug 2022 13:24:44 +0200 Subject: [PATCH 2/5] #8 - add function config_enable_echo_protocol() --- src/pEp/_pEp/pEpmodule.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index ce92f8c..b842148 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -62,6 +62,10 @@ namespace pEp { ::config_unencrypted_subject(Adapter::session(), enable); } + void config_enable_echo_protocol(bool enable) { + ::config_enable_echo_protocol(Adapter::session(), enable); + } + void key_reset_user(string user_id, string fpr) { if (user_id == "") throw invalid_argument("user_id required"); @@ -269,6 +273,9 @@ namespace pEp { def("unencrypted_subject", config_unencrypted_subject, "do not encrypt the subject of messages"); + def("config_enable_echo_protocol", config_enable_echo_protocol, + "enable or disable the Distribution.Echo"); + def("key_reset", key_reset_user, "reset the default database status for the user / keypair provided\n" "This will effectively perform key_reset on each identity\n" From e4ef9b2bc4609f5ebdf3d962a7fc801cd71af01f Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 26 Aug 2022 13:26:25 +0200 Subject: [PATCH 3/5] #8 - add function config_enable_echo_in_outgoing_message_rating_preview() --- src/pEp/_pEp/pEpmodule.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index b842148..5009a15 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -66,6 +66,10 @@ namespace pEp { ::config_enable_echo_protocol(Adapter::session(), enable); } + void config_enable_echo_in_outgoing_message_rating_preview(bool enable) { + ::config_enable_echo_in_outgoing_message_rating_preview(Adapter::session(), enable); + } + void key_reset_user(string user_id, string fpr) { if (user_id == "") throw invalid_argument("user_id required"); @@ -276,6 +280,9 @@ namespace pEp { def("config_enable_echo_protocol", config_enable_echo_protocol, "enable or disable the Distribution.Echo"); + def("config_enable_echo_in_outgoing_message_rating_preview", config_enable_echo_in_outgoing_message_rating_preview, + "enable or disable Distribution.Echo.Ping"); + def("key_reset", key_reset_user, "reset the default database status for the user / keypair provided\n" "This will effectively perform key_reset on each identity\n" From 23e1e6ac988521016b3a3e72a3da01787632c8ad Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 26 Aug 2022 13:31:49 +0200 Subject: [PATCH 4/5] #8 - add function sync_reinit() --- src/pEp/_pEp/pEpmodule.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index 5009a15..de90d39 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -193,6 +193,11 @@ namespace pEp { ::disable_all_sync_channels(Adapter::session()); } + void sync_reinit() { + PEP_STATUS status = ::sync_reinit(Adapter::session()); + _throw_status(status); + } + void testfunc() { _messageToSend(NULL); } @@ -693,6 +698,11 @@ namespace pEp { "Disable sync for all identities\n" ); + def("sync_reinit", &sync_reinit, + "Explicitly reinitialize Sync. This is meant to be explicitly called\n" + "from the application upon user request\n" + ); + // codecs call< object >(((object)(import("codecs").attr("register"))).ptr(), make_function(sync_search)); call< object >(((object)(import("codecs").attr("register"))).ptr(), make_function(distribution_search)); From 389a812d3dfad22457d4bf71c2218bd04dc78249 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 26 Aug 2022 14:19:04 +0200 Subject: [PATCH 5/5] #8 - add function config_media_keys() --- src/pEp/_pEp/pEpmodule.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index de90d39..b92543e 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -14,6 +14,7 @@ #include #include #include +#include // libpEpAdapter #include @@ -198,6 +199,14 @@ namespace pEp { _throw_status(status); } + void config_media_keys(dict value) { + ::stringpair_list_t *_spl = nullptr; + strdict_attr(_spl, value); + + PEP_STATUS status = ::config_media_keys(Adapter::session(), _spl); + _throw_status(status); + } + void testfunc() { _messageToSend(NULL); } @@ -703,6 +712,10 @@ namespace pEp { "from the application upon user request\n" ); + def("config_media_keys", &config_media_keys, + "Replace the session map with the given map" + ); + // codecs call< object >(((object)(import("codecs").attr("register"))).ptr(), make_function(sync_search)); call< object >(((object)(import("codecs").attr("register"))).ptr(), make_function(distribution_search));