"reset the default database status for the identity / keypair provided. If this\n"
" on this communication channel\n").def(boost::python::init<string>()).def(boost::python::init<string,string>()).def(boost::python::init<string,string,string>()).def(boost::python::init<string,string,string,string>())
.def(boost::python::init<string,string,string,string,int>()).def(boost::python::init<string,string,string,string,int,string>()).def("__repr__",&Identity::_repr).def("__str__",&Identity::_str,"string representation of this identity\n"
"following the pattern 'username < address >'\n")
.def("key_reset",&Identity::key_reset,boost::python::arg("fpr")=object(""),"reset the default database status for the identity / keypair provided. If this\n"
"corresponds to the own user and a private key, also revoke the key, generate a\n"
"new one, and communicate the reset to recently contacted pEp partners for this\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.")
.def("key_mistrusted",&Identity::key_mistrusted,
boost::python::arg("fpr")=object(""),
"If you want updated trust on the identity, you ll have"
.def("key_mistrusted",&Identity::key_mistrusted,boost::python::arg("fpr")=object(""),"If you want updated trust on the identity, you ll have"
"to call update_identity or myself respectively after this."
"N.B. If you are calling this on a key that is the identity or user default,"
"it will be removed as the default key for ANY identity and user for which"
@ -264,79 +248,40 @@ namespace pEp {
"will only undo the current identity's / it's user's default, not any"
"other identities which may be impacted (this will not affect most use cases)")
.def("enable_for_sync",&Identity::enable_for_sync,"Enable own identity for p≡p sync.\n\n"
"Only use this on own identities, which are used as accounts.\n").def("disable_for_sync",&Identity::disable_for_sync,"Disable own identity for p≡p sync.\n\n"
"Only use this on own identities, which are used as accounts.\n")
.add_property("address",(string(Identity::*)())&Identity::address,(void(Identity::*)(string))&Identity::address,"email address or URI").add_property("fpr",(string(Identity::*)())&Identity::fpr,(void(Identity::*)(string))&Identity::fpr,"key ID (full fingerprint, hex encoded)")
.add_property("user_id",(string(Identity::*)())&Identity::user_id,(void(Identity::*)(string))&Identity::user_id,"ID of person associated or 'pEp_own_userId' if own identity")
.add_property("username",(string(Identity::*)())&Identity::username,(void(Identity::*)(string))&Identity::username,"name in full of person associated")
.add_property("comm_type",(int(Identity::*)())(PEP_comm_type(Identity::*)())&Identity::comm_type,(void(Identity::*)(int))(void(Identity::*)(::PEP_comm_type))&Identity::comm_type,"communication type, first rating level (p≡p internal)")
.add_property("lang",(string(Identity::*)())&Identity::lang,(void(Identity::*)(string))&Identity::lang,"ISO 639-1 language code").add_property("flags",(identity_flags_t(Identity::*)())&Identity::flags,(void(Identity::*)(::identity_flags_t))&Identity::flags,"flags (p≡p internal)")
.add_property("rating",&Identity::rating,"rating of Identity").add_property("color",&Identity::color,"color of Identity as PEP_color").add_property("is_pEp_user",&Identity::is_pEp_user,"True if this is an identity of a pEp user").def("__deepcopy__",&Identity::deepcopy)
" filename filename to store the data\n",boost::python::init<object,charconst*,charconst*>(args("data","mime_type","filename"))).def(boost::python::init<object,string>()).def(boost::python::init<object>())
.def("__repr__",&Message::Blob::_repr).def("__len__",&Message::Blob::size,"size of Blob data in bytes").def("decode",(string(Message::Blob::*)())&Message::Blob::decode).def("decode",(string(Message::Blob::*)(string))&Message::Blob::decode,"text = blob.decode(encoding='')\n"
"\n"
"decode Blob data into string depending on MIME type if encoding=''\n"
"\n"
" mime_type='application/pEp.sync' decode as 'pEp.sync'\n"
" mime_type='application/pEp.keyreset' decode as 'pEp.keyreset'\n"
" other mime_type decode as 'ascii' by default\n")
.add_property("mime_type",(string(Message::Blob::*)())&Message::Blob::mime_type,(void(Message::Blob::*)(string))&Message::Blob::mime_type,"MIME type of object in Blob")
.add_property("filename",(string(Message::Blob::*)())&Message::Blob::filename,(void(Message::Blob::*)(string))&Message::Blob::filename,"filename of object in Blob");
" mime_text text in Multipurpose Internet Mail Extensions format\n").def(boost::python::init<int>()).def(boost::python::init<int,Identity*>()).def(boost::python::init<string>())
.def("__str__",&Message::_str,"the string representation of a Message is it's MIME text").def("__repr__",&Message::_repr)
.add_property("id",(string(Message::*)())&Message::id,(void(Message::*)(string))&Message::id,"message ID").add_property("shortmsg",(string(Message::*)())&Message::shortmsg,(void(Message::*)(string))&Message::shortmsg,"subject or short message")
.add_property("longmsg",(string(Message::*)())&Message::longmsg,(void(Message::*)(string))&Message::longmsg,"body or long version of message")
.add_property("longmsg_formatted",(string(Message::*)())&Message::longmsg_formatted,(void(Message::*)(string))&Message::longmsg_formatted,"HTML body or fromatted long version of message")
.add_property("attachments",(boost::python::tuple(Message::*)())&Message::attachments,(void(Message::*)(boost::python::list))&Message::attachments,"tuple of Blobs with attachments; setting moves Blobs to attachment tuple")
.add_property("sent",(time_t(Message::*)())&Message::sent,(void(Message::*)(time_t))&Message::sent,"time when message was sent in UTC seconds since epoch")
.add_property("recv",(time_t(Message::*)())&Message::recv,(void(Message::*)(time_t))&Message::recv,"time when message was received in UTC seconds since epoch")
.add_property("from_",(Identity(Message::*)())&Message::from,(void(Message::*)(object))&Message::from,"identity where message is from")
.add_property("to",(boost::python::list(Message::*)())&Message::to,(void(Message::*)(boost::python::list))&Message::to,"list of identities message is going to")
.add_property("recv_by",(Identity(Message::*)())&Message::recv_by,(void(Message::*)(object))&Message::recv_by,"identity where message was received by")
.add_property("cc",(boost::python::list(Message::*)())&Message::cc,(void(Message::*)(boost::python::list))&Message::cc,"list of identities message is going cc")
.add_property("bcc",(boost::python::list(Message::*)())&Message::bcc,(void(Message::*)(boost::python::list))&Message::bcc,"list of identities message is going bcc")
.add_property("reply_to",(boost::python::list(Message::*)())&Message::reply_to,(void(Message::*)(boost::python::list))&Message::reply_to,"list of identities where message will be replied to")
.add_property("references",(boost::python::list(Message::*)())&Message::references,(void(Message::*)(boost::python::list))&Message::references,"message IDs of messages this one is referring to")
.add_property("keywords",(boost::python::list(Message::*)())&Message::keywords,(void(Message::*)(boost::python::list))&Message::keywords,"keywords this message should be stored under")
.add_property("comments",(string(Message::*)())&Message::comments,(void(Message::*)(string))&Message::comments,"comments added to message").add_property("opt_fields",(dict(Message::*)())&Message::opt_fields,(void(Message::*)(dict))&Message::opt_fields,"opt_fields of message")
" flags 1 is force encryption\n").def("decrypt",&Message::decrypt,boost::python::arg("flags")=0,"msg2, keys, rating, flags = msg1.decrypt()\n"
"\n"
"decrypts a p≡p message and returns a tuple with data\n"
"\n"
" msg the decrypted p≡p message\n"
" keys a list of keys being used\n"
" rating the rating of the message as integer\n"
" flags flags set while decryption\n"
)
.add_property("outgoing_rating",&Message::outgoing_rating,"rating outgoing message will have")
.add_property("outgoing_color",&Message::outgoing_color,"color outgoing message will have as PEP_color")
.def("__deepcopy__",&Message::deepcopy)
.def("__copy__",&Message::copy);
" flags flags set while decryption\n")
.add_property("outgoing_rating",&Message::outgoing_rating,"rating outgoing message will have").add_property("outgoing_color",&Message::outgoing_color,"color outgoing message will have as PEP_color").def("__deepcopy__",&Message::deepcopy).def("__copy__",&Message::copy);