nlib
JsonRpcServerExec.h
[詳解]
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
サーバー側のJSON-RPCメソッドハンドラの戻り値です。
JSON-RPCのレスポンスを表すクラスです。
JSON-RPC2.0の-32600エラーを設定します。 JSON-RPCのメソッドハンドラが呼ばれている場合は、既に有効なJS...
JSON-RPC2.0の-32602エラーを設定します。 JSON-RPCリクエストのパラメータがハンドラの処理すべき形式でな...
void ClearJsonRpcServerMethodTable()
登録されているJSON-RPCのメソッドハンドラを全て削除します。
JsonRpcServerFuncCallError(* JsonRpcServerFunc)(MpObject &param, JsonRpcResponse &response)
JSON-RPCのメソッドハンドラです。
JSON-RPC2.0の-32603エラーを設定します。 JSON-RPCメソッドハンドラ内部でのエラーが発生した場合に、この...
UniquePtrはポインタの所有権を保持し、UniquePtrがスコープから出るときにデストラクタでポインタをDELで指...
Definition: UniquePtr.h:109
std::unique_ptrに相当するクラスが定義されています。
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:87
MessagePack又はJSONを読み込むことで作成されるオブジェクトです。
Definition: MpObject.h:95
std::vectorに似ていますが、コピーできないオブジェクトを格納可能なクラスが定義されています。 ...
MessagePack, JSON及びCSVを読み込むと作成されるオブジェクトです。
JSON-RPC2.0の-32700エラーを設定します。 JSON-RPCのメソッドハンドラが呼ばれている場合は、既にJSON-RPC...
errno_t AddJsonRpcServerMethod(const char *method, JsonRpcServerFunc func)
JSON-RPCのメソッドハンドラを登録します。
関数の処理が成功した場合に返します。 また、サーバー実装独自のエラーを返す場合も、レスポンスを設定し...
開発環境別の設定が書かれるファイルです。
JSON-RPC2.0の-32601エラーを設定します。 JSON-RPCのメソッドハンドラが呼ばれている場合は、既にメソッド...
size_t JsonRpcServerExec(const void *p, size_t n, ReallocOutputStream::UniquePtrType *ptr)
JSON-RPCリクエストを処理してJSON-RPCレスポンスのバイト列を作成します。
JsonRpcServerFunc GetJsonRpcServerMethod(const char *method)
メソッド名を指定して登録されているJSON-RPCのメソッドハンドラを取得します。
出力ストリームの基底クラスを定義しています。
int errno_t
intのtypedefで、戻り値としてPOSIXのエラー値を返すことを示します。
Definition: NMalloc.h:37