nlib
|
Class for representing the JSON-RPC response. More...
#include "nn/nlib/msgpack/jsonrpc/JsonRpcResponse.h"
Public Types | |
enum | ErrorCode { kOk = 0, kParseError = -32700, kInvalidRequest = -32600, kMethodNotFound = -32601, kInvalidParams = -32602, kInternalError = -32603, kClientAbort = -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 36 of file JsonRpcResponse.h.
Definition of the predefined error code contained in the JSON-RPC response.
Definition at line 38 of file JsonRpcResponse.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Returns the ID of the JSON-RPC response.
Definition at line 68 of file JsonRpcResponse.h.
|
inlinenoexcept |
Returns the JSON-RPC return value, or additional information about an error.
Definition at line 72 of file JsonRpcResponse.h.
|
inlinenoexcept |
Returns the JSON-RPC return value, or additional information about an error.
Definition at line 73 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 60 of file JsonRpcResponse.h.
© 2012-2017 Nintendo Co., Ltd. All rights reserved.