nlib
|
Class for representing a JSON-RPC request. More...
#include "nn/nlib/msgpack/jsonrpc/JsonRpcRequest.h"
Public Member Functions | |
JsonRpcRequest () noexcept | |
Instantiates the object with default parameters (default constructor). | |
reqid_t | GetId () const noexcept |
Get the id of the request. If 0 , the request is a notification. More... | |
const char * | GetMethod () const noexcept |
Gets the method name of the request. More... | |
const MpObject & | GetParams () const noexcept |
Gets the parameter of the request. More... | |
MpObject & | GetParams () noexcept |
Gets the parameter of the request. More... | |
void | SetId (reqid_t id) noexcept |
Sets the request ID. More... | |
bool | SetMethod (const char *method) noexcept |
Sets the ID for the request. More... | |
void | MoveParamsFrom (MpObject ¶ms) noexcept |
Sets the JSON-RPC parameters. More... | |
Class for representing a JSON-RPC request.
2.0
becomes the value.JsonRpcClient::GenerateId
. The server associates the response to the request by assigning the same id parameter. Definition at line 45 of file JsonRpcRequest.h.
|
inlinenoexcept |
Get the id of the request. If 0
, the request is a notification.
Definition at line 51 of file JsonRpcRequest.h.
|
inlinenoexcept |
Gets the method name of the request.
Definition at line 52 of file JsonRpcRequest.h.
|
inlinenoexcept |
Gets the parameter of the request.
Definition at line 53 of file JsonRpcRequest.h.
|
inlinenoexcept |
Gets the parameter of the request.
Definition at line 54 of file JsonRpcRequest.h.
|
inlinenoexcept |
Sets the JSON-RPC parameters.
[in,out] | params | JSON-RPC parameters. |
JsonRpcRequest
, instead of copying it when setting the parameters to prevent the copying of MpObject
. Definition at line 58 of file JsonRpcRequest.h.
|
inlinenoexcept |
Sets the request ID.
[in] | id | Request ID. |
JsonRpcClient::GenerateId
. The id must be unique to each request. Definition at line 56 of file JsonRpcRequest.h.
|
noexcept |
Sets the ID for the request.
[in] | method | Method name. |
true
when successful.false
when dynamic memory allocation fails. © 2012-2017 Nintendo Co., Ltd. All rights reserved.