nlib
|
Class for representing a JSON-RPC request. More...
#include "nn/nlib/msgpack/jsonrpc/JsonRpcRequest.h"
Public Member Functions | |
JsonRpcRequest () | |
Instantiates the object with default parameters (default constructor). | |
reqid_t | GetId () const |
Get the id of the request. If 0 , the request is a notification. More... | |
const char * | GetMethod () const |
Gets the method name of the request. More... | |
const MpObject & | GetParams () const |
Gets the parameter of the request. More... | |
MpObject & | GetParams () |
Gets the parameter of the request. More... | |
void | SetId (reqid_t id) |
Sets the request ID. More... | |
bool | SetMethod (const char *method) |
Sets the ID for the request. More... | |
void | MoveParamsFrom (MpObject ¶ms) |
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 32 of file JsonRpcRequest.h.
|
inline |
Get the id of the request. If 0
, the request is a notification.
Definition at line 37 of file JsonRpcRequest.h.
|
inline |
Gets the method name of the request.
Definition at line 38 of file JsonRpcRequest.h.
|
inline |
Gets the parameter of the request.
Definition at line 39 of file JsonRpcRequest.h.
|
inline |
Gets the parameter of the request.
Definition at line 40 of file JsonRpcRequest.h.
|
inline |
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 44 of file JsonRpcRequest.h.
|
inline |
Sets the request ID.
[in] | id | Request ID. |
JsonRpcClient::GenerateId
. The id must be unique to each request. Definition at line 42 of file JsonRpcRequest.h.
nn::nlib::msgpack::jsonrpc::JsonRpcRequest::SetMethod | ( | const char * | method | ) |
Sets the ID for the request.
[in] | method | Method name. |
true
when successful.false
when dynamic memory allocation fails. © 2013, 2014, 2015 Nintendo Co., Ltd. All rights reserved.