Browse Source

set_identity() has _const_ pEp_identity* parameter.

JSON-139
Roker 2 years ago
parent
commit
de8be64565
2 changed files with 3 additions and 11 deletions
  1. +3
    -3
      server/ev_server.cc
  2. +0
    -8
      server/function_map.hh

+ 3
- 3
server/ev_server.cc View File

@ -107,7 +107,7 @@ const FunctionMap functions = {
FP( "Identity Management API", new Separator),
FP( "get_identity" , new Func<PEP_STATUS, In_Pep_Session, In<c_string>, In<c_string>, Out<pEp_identity*>>( &get_identity) ),
FP( "set_identity" , new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>> ( &set_identity) ),
FP( "set_identity" , new Func<PEP_STATUS, In_Pep_Session, In<const pEp_identity*>> ( &set_identity) ),
FP( "mark_as_comprimized", new Func<PEP_STATUS, In_Pep_Session, In<c_string>> ( &mark_as_compromized) ),
FP( "identity_rating" , new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, Out<PEP_rating>>( &identity_rating) ),
FP( "outgoing_message_rating", new Func<PEP_STATUS, In_Pep_Session, In<message*>, Out<PEP_rating>>( &outgoing_message_rating) ),
@ -163,8 +163,8 @@ const FunctionMap functions = {
// my own example function that does something useful. :-)
FP( "Other", new Separator ),
FP( "serverVersion", new Func<ServerVersion>( &server_version ) ),
FP( "version", new Func<std::string>( &version_as_a_string ) ),
FP( "serverVersion", new Func<ServerVersion>( &server_version ) ),
FP( "version", new Func<std::string>( &version_as_a_string ) ),
FP( "getBinaryPath", new Func<std::string>( &getBinaryPath ) ),
FP( "shutdown", new Func<void, In<JsonAdapter*,ParamFlag::NoInput>>( &JsonAdapter::shutdown_now ) ),


+ 0
- 8
server/function_map.hh View File

@ -137,7 +137,6 @@ public:
virtual bool isSeparator() const = 0;
virtual void setJavaScriptSignature(js::Object& o) const = 0;
virtual js::Value call(const js::Array& params, Context* context) const = 0;
virtual const void* fn_ptr() const = 0;
};
@ -161,12 +160,6 @@ public:
std::function<ReturnType(typename Args::c_type ...)> fn;
const void* fn_ptr() const noexcept override
{
// return static_cast<const void*>(fn);
return nullptr;
}
js::Value call(const js::Array& parameters, Context* context) const override
{
typedef helper<R, 0, sizeof...(Args), Args...> Helper;
@ -226,7 +219,6 @@ public:
virtual bool isSeparator() const noexcept override { return true; }
virtual void setJavaScriptSignature(js::Object& o) const override { o.emplace_back("separator", true); }
virtual js::Value call(const js::Array&, Context*) const override { return js::Value{}; }
virtual void* fn_ptr() const noexcept override { return nullptr; }
};
//typedef std::map< std::string, FuncBase* > FunctionMap;


Loading…
Cancel
Save