rippled
Loading...
Searching...
No Matches
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 <xrpl/beast/utility/Journal.h>
24#include <xrpl/json/json_value.h>
25#include <xrpl/resource/Charge.h>
26#include <xrpl/resource/Fees.h>
27
28namespace ripple {
29
30class Application;
31
32namespace RPC {
33
34struct 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
51
52 // [in] The JSON-RPC method
54
55 // [in] The Ripple-specific "params" object
57
58 // [in, out] The resource cost for the command
60
61 // [out] The JSON-RPC response
63
64 // [in] The Application instance
66
67private:
68 Request&
70};
71
72} // namespace RPC
73} // namespace ripple
74
75#endif
Represents a JSON value.
Definition: json_value.h:150
A generic endpoint for log messages.
Definition: Journal.h:60
A consumption charge.
Definition: Charge.h:31
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
std::string method
Definition: Request.h:53
Request(beast::Journal journal_, std::string const &method_, Json::Value &params_, Application &app_)
Definition: Request.h:36
Resource::Charge fee
Definition: Request.h:59
beast::Journal const journal
Definition: Request.h:50
Application & app
Definition: Request.h:65
Json::Value params
Definition: Request.h:56
Request & operator=(Request const &)
Json::Value result
Definition: Request.h:62