add message_cache functions
authorVolker Birk <vb@pep-project.org>
Tue, 28 Jul 2020 18:37:10 +0200
changeset 1024627cd00b19a3
parent 1023 3371cfd52a38
child 1025 65bd786c02c9
child 1026 b0aede2f1bc5
add message_cache functions
server/ev_server.cc
     1.1 --- a/server/ev_server.cc	Fri Jul 24 10:21:57 2020 +0200
     1.2 +++ b/server/ev_server.cc	Tue Jul 28 18:37:10 2020 +0200
     1.3 @@ -22,6 +22,7 @@
     1.4  #include <pEp/Adapter.hh>
     1.5  #include <pEp/status_to_string.hh>
     1.6  #include <pEp/slurp.hh>
     1.7 +#include <pEp/message_cache.hh>
     1.8  
     1.9  #include <boost/filesystem.hpp>
    1.10  #include "json_spirit/json_spirit_reader.h"
    1.11 @@ -75,11 +76,14 @@
    1.12  			In<pEp_identity*>, In<message*>, In<stringlist_t*>, Out<message*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &encrypt_message_for_self ) ),
    1.13  
    1.14  		FP( "decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, Out<PEP_rating>, InOutP<PEP_decrypt_flags_t>>(  &decrypt_message ) ),
    1.15 +		FP( "cache_decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, Out<PEP_rating>, InOutP<PEP_decrypt_flags_t>>(  &pEp::MessageCache::cache_decrypt_message) ),
    1.16  		FP( "get_key_rating_for_user", new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>, In<c_string>, Out<PEP_rating>>( &get_key_rating_for_user) ),
    1.17  		
    1.18  		// from mime.h
    1.19  		FP( "MIME handling API", new Separator),
    1.20  		FP( "mime_encode_message", new Func<PEP_STATUS, In<const message*>, In<bool>, Out<char*>, In<bool, ParamFlag::NoInput>>( &mime_encode_message )),
    1.21 +		FP( "cache_mime_encode_message", new Func<PEP_STATUS, In<int>, In<const message*>, In<bool>, Out<char*>, In<bool, ParamFlag::NoInput>>( &pEp::MessageCache::cache_mime_encode_message)),
    1.22 +        FP( "cache_release", new Func<PEP_STATUS, In<c_string>>( &pEp::MessageCache::cache_release )),
    1.23  		FP( "mime_decode_message", new Func<PEP_STATUS, In<c_string>, InLength<>, Out<message*>, In<bool*, ParamFlag::NoInput>>( &mime_decode_message )),
    1.24  		
    1.25  		// from pEpEngine.h