rippled
ripple
rpc
Request.h
1
//------------------------------------------------------------------------------
2
/*
3
This file is part of rippled: https://github.com/ripple/rippled
4
Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6
Permission to use, copy, modify, and/or distribute this software for any
7
purpose with or without fee is hereby granted, provided that the above
8
copyright notice and this permission notice appear in all copies.
9
10
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
*/
18
//==============================================================================
19
20
#ifndef RIPPLE_RPC_REQUEST_H_INCLUDED
21
#define RIPPLE_RPC_REQUEST_H_INCLUDED
22
23
#include <ripple/json/json_value.h>
24
#include <ripple/resource/Charge.h>
25
#include <ripple/resource/Fees.h>
26
#include <beast/utility/Journal.h>
27
28
namespace
ripple
{
29
30
class
Application;
31
32
namespace
RPC {
33
34
struct
Request
35
{
36
explicit
Request
(
37
beast::Journal
journal_,
38
std::string
const
& method_,
39
Json::Value
& params_,
40
Application
& app_)
41
:
journal
(journal_)
42
,
method
(method_)
43
,
params
(params_)
44
,
fee
(Resource::feeReferenceRPC)
45
,
app
(app_)
46
{
47
}
48
49
// [in] The Journal for logging
50
beast::Journal
const
journal
;
51
52
// [in] The JSON-RPC method
53
std::string
method
;
54
55
// [in] The Ripple-specific "params" object
56
Json::Value
params
;
57
58
// [in, out] The resource cost for the command
59
Resource::Charge
fee
;
60
61
// [out] The JSON-RPC response
62
Json::Value
result
;
63
64
// [in] The Application instance
65
Application
&
app
;
66
67
private
:
68
Request
&
69
operator=
(
Request
const
&);
70
};
71
72
}
// namespace RPC
73
}
// namespace ripple
74
75
#endif
ripple::Application
Definition:
Application.h:115
std::string
STL class.
ripple::RPC::Request::operator=
Request & operator=(Request const &)
ripple::RPC::Request::journal
const beast::Journal journal
Definition:
Request.h:50
ripple::RPC::Request::Request
Request(beast::Journal journal_, std::string const &method_, Json::Value ¶ms_, Application &app_)
Definition:
Request.h:36
ripple::RPC::Request::params
Json::Value params
Definition:
Request.h:56
beast::Journal
A generic endpoint for log messages.
Definition:
Journal.h:58
ripple::RPC::Request::method
std::string method
Definition:
Request.h:53
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition:
RCLCensorshipDetector.h:29
ripple::RPC::Request::app
Application & app
Definition:
Request.h:65
ripple::RPC::Request
Definition:
Request.h:34
ripple::Resource::Charge
A consumption charge.
Definition:
Charge.h:30
ripple::RPC::Request::fee
Resource::Charge fee
Definition:
Request.h:59
Json::Value
Represents a JSON value.
Definition:
json_value.h:145
ripple::RPC::Request::result
Json::Value result
Definition:
Request.h:62
Generated by
1.8.17