nlib
JsonRpcServerExec.h
Go to the documentation of this file.
1 
2 /*---------------------------------------------------------------------------*
3 
4  Project: CrossRoad
5  Copyright (C)2012-2016 Nintendo. All rights reserved.
6 
7  These coded instructions, statements, and computer programs contain
8  proprietary information of Nintendo of America Inc. and/or Nintendo
9  Company Ltd., and are protected by Federal copyright law. They may
10  not be disclosed to third parties or copied or duplicated in any form,
11  in whole or in part, without the prior written consent of Nintendo.
12 
13  *---------------------------------------------------------------------------*/
14 
15 #pragma once
16 #ifndef INCLUDE_NN_NLIB_MSGPACK_JSONRPC_JSONRPCSERVEREXEC_H_
17 #define INCLUDE_NN_NLIB_MSGPACK_JSONRPC_JSONRPCSERVEREXEC_H_
18 
19 #include "nn/nlib/Config.h"
20 #include "nn/nlib/Nlist.h"
21 #include "nn/nlib/OutputStream.h"
22 #include "nn/nlib/UniquePtr.h"
26 
27 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
28 #undef NLIB_VIS_PUBLIC
29 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT
30 #endif
31 
32 NLIB_NAMESPACE_BEGIN
33 namespace msgpack {
34 namespace jsonrpc {
35 
43 };
44 
46  JsonRpcResponse& response); // NOLINT
47 
51 
52 NLIB_VIS_PUBLIC size_t JsonRpcServerExec(const void* p, size_t n,
54 
55 } // namespace jsonrpc
56 } // namespace msgpack
57 NLIB_NAMESPACE_END
58 
59 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
60 #undef NLIB_VIS_PUBLIC
61 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT
62 #endif
63 
64 #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:109
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:87
Object created when MessagePack or JSON is read.
Definition: MpObject.h:95
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:37