diff --git a/src/pEp/_pEp/message.hh b/src/pEp/_pEp/message.hh index 5eba845..ea5d287 100644 --- a/src/pEp/_pEp/message.hh +++ b/src/pEp/_pEp/message.hh @@ -169,6 +169,10 @@ namespace pEp { void enc_format(PEP_enc_format value) { _msg->enc_format = value; } + PEP_rating rating() { return _msg->rating; } + + void rating(PEP_rating value) { _msg->rating = value; } + Message encrypt(); Message _encrypt(boost::python::list extra, int enc_format = 4, int flags = 0); diff --git a/src/pEp/_pEp/pEpmodule.cc b/src/pEp/_pEp/pEpmodule.cc index b08278c..e3872f3 100644 --- a/src/pEp/_pEp/pEpmodule.cc +++ b/src/pEp/_pEp/pEpmodule.cc @@ -488,6 +488,11 @@ namespace pEp { (void(Message::*)(int)) (void(Message::*)(PEP_enc_format)) &Message::enc_format, "0: unencrypted, 1: inline PGP, 2: S/MIME, 3: PGP/MIME, 4: p≡p format") + .add_property("rating", (int(Message::*)()) + (PEP_rating(Message::*)()) &Message::rating, + (void(Message::*)(int)) + (void(Message::*)(PEP_rating)) &Message::rating, + "the message rating as computed on this endpoint") .def("encrypt", (Message(Message::*)())&Message::encrypt) .def("encrypt", (Message(Message::*)(boost::python::list))&Message::_encrypt) .def("encrypt", (Message(Message::*)(boost::python::list, int))&Message::_encrypt)