nlib
JsonRpcServerExec.h
Go to the documentation of this file.
1 
2 #pragma once
3 #ifndef INCLUDE_NN_NLIB_MSGPACK_JSONRPC_JSONRPCSERVEREXEC_H_
4 #define INCLUDE_NN_NLIB_MSGPACK_JSONRPC_JSONRPCSERVEREXEC_H_
5 
6 #include "nn/nlib/Config.h"
7 #include "nn/nlib/Nlist.h"
8 #include "nn/nlib/OutputStream.h"
9 #include "nn/nlib/UniquePtr.h"
13 
14 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
15 #undef NLIB_VIS_PUBLIC
16 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT
17 #endif
18 
19 NLIB_NAMESPACE_BEGIN
20 namespace msgpack {
21 namespace jsonrpc {
22 
30 };
31 
33  JsonRpcResponse& response); // NOLINT
34 
38 
39 NLIB_VIS_PUBLIC size_t JsonRpcServerExec(const void* p, size_t n,
41 
42 } // namespace jsonrpc
43 } // namespace msgpack
44 NLIB_NAMESPACE_END
45 
46 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
47 #undef NLIB_VIS_PUBLIC
48 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT
49 #endif
50 
51 #endif // INCLUDE_NN_NLIB_MSGPACK_JSONRPC_JSONRPCSERVEREXEC_H_
JsonRpcServerFuncCallError
Return value of the server-side JSON-RPC method handler.
Class for representing the JSON-RPC response.
Sets the JSON-RPC2.0 -32600 error. The JSON-RPC request is already known to be valid if the JSON-RP...
Sets the JSON-RPC2.0 -32602 error. Returning this value when the JSON-RPC request parameter is not ...
void ClearJsonRpcServerMethodTable()
Deletes all registered JSON-RPC method handlers.
JsonRpcServerFuncCallError(* JsonRpcServerFunc)(MpObject &param, JsonRpcResponse &response)
JSON-RPC method handler.
Sets the JSON-RPC2.0 -32603 error. Returning this value when an error has occurred within the JSON-...
UniquePtr owns the pointer, and when it goes out of scope, the pointer is released by the destructor ...
Definition: UniquePtr.h:96
Defines that class that is corresponding to std::unique_ptr.
#define NLIB_VIS_PUBLIC
Symbols for functions and classes are made available outside of the library.
Definition: Platform_unix.h:61
Object created when MessagePack or JSON is read.
Definition: MpObject.h:82
Defines the class that resembles std::vector but can store objects that cannot be copied...
Object created when MessagePack, JSON, or CSV is read.
Sets the JSON-RPC2.0 -32700 error. Parsing the JSON-RPC request is successful if the JSON-RPC metho...
errno_t AddJsonRpcServerMethod(const char *method, JsonRpcServerFunc func)
Sets the JSON-RPC method handler.
Returned when the function process is successful. Set the response and return this value when retur...
A file that contains the configuration information for each development environment.
Sets the JSON-RPC2.0 -32601 error. The method is already found if the JSON-RPC method handler is ca...
size_t JsonRpcServerExec(const void *p, size_t n, ReallocOutputStream::UniquePtrType *ptr)
Creates the JSON-RPC response byte string by processing the JSON-RPC request.
JsonRpcServerFunc GetJsonRpcServerMethod(const char *method)
Gets the method handler of the JSON-RPC registered by specifying the method name. ...
Defines the base class for output streams.
int errno_t
Indicates with an int-type typedef that a POSIX error value is returned as the return value...
Definition: NMalloc.h:24