nlib
|
Class for representing the JSON-RPC response. More...
#include "nn/nlib/msgpack/jsonrpc/JsonRpcResponse.h"
Public Types | |
enum | ErrorCode { OK = 0, PARSE_ERROR = -32700, INVALID_REQUEST = -32600, METHOD_NOT_FOUND = -32601, INVALID_PARAMS = -32602, INTERNAL_ERROR = -32603, CLIENT_ABORT = -31000 } |
Definition of the predefined error code contained in the JSON-RPC response. More... | |
Public Member Functions | |
JsonRpcResponse () noexcept | |
Instantiates the object with default parameters (default constructor). | |
void | MoveResultFrom (MpObject &obj) noexcept |
Sets the JSON-RPC return value (when not an error). More... | |
void | SetError (int errcode, const char *msg, MpObject &data) noexcept |
Sets the JSON-RPC function error. More... | |
void | SetError (int errcode, const char *msg) noexcept |
Sets the JSON-RPC function error. More... | |
ErrorCode | GetError () const noexcept |
Returns an error code. More... | |
reqid_t | GetId () const noexcept |
Returns the ID of the JSON-RPC response. More... | |
const char * | GetErrorMessage () const noexcept |
Returns an error message. More... | |
MpObject & | GetMpObject () noexcept |
Returns the JSON-RPC return value, or additional information about an error. More... | |
const MpObject & | GetMpObject () const noexcept |
Returns the JSON-RPC return value, or additional information about an error. More... | |
operator bool () const | |
Returns true if an error has not occurred. | |
Class for representing the JSON-RPC response.
2.0
becomes the value.Definition at line 22 of file JsonRpcResponse.h.
Definition of the predefined error code contained in the JSON-RPC response.
Definition at line 24 of file JsonRpcResponse.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Returns the ID of the JSON-RPC response.
Definition at line 47 of file JsonRpcResponse.h.
|
inlinenoexcept |
Returns the JSON-RPC return value, or additional information about an error.
Definition at line 51 of file JsonRpcResponse.h.
|
inlinenoexcept |
Returns the JSON-RPC return value, or additional information about an error.
Definition at line 52 of file JsonRpcResponse.h.
|
noexcept |
Sets the JSON-RPC return value (when not an error).
[in,out] | obj | The specified return value. |
JsonRpcResponse
object to avoid the overhead of copying.
|
noexcept |
Sets the JSON-RPC function error.
[in] | errcode | Error code. |
[in] | msg | Error message. |
[in,out] | data | Additional information about the error. |
JsonRpcResponse
object to avoid the overhead of copying.
|
inlinenoexcept |
Sets the JSON-RPC function error.
[in] | errcode | Error code. |
[in] | msg | Error message. |
Definition at line 39 of file JsonRpcResponse.h.
© 2012-2016 Nintendo Co., Ltd. All rights reserved.