rippled
Loading...
Searching...
No Matches
Context.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_CONTEXT_H_INCLUDED
21#define RIPPLE_RPC_CONTEXT_H_INCLUDED
22
23#include <xrpld/core/JobQueue.h>
24#include <xrpld/net/InfoSub.h>
25#include <xrpld/rpc/Role.h>
26
27#include <xrpl/beast/utility/Journal.h>
28
29namespace ripple {
30
31class Application;
32class NetworkOPs;
33class LedgerMaster;
34
35namespace RPC {
36
38struct Context
39{
49 unsigned int apiVersion;
50};
51
52struct JsonContext : public Context
53{
57 struct Headers
58 {
61 };
62
64
66};
67
68template <class RequestType>
69struct GRPCContext : public Context
70{
71 RequestType params;
72};
73
74} // namespace RPC
75} // namespace ripple
76
77#endif
Represents a JSON value.
Definition: json_value.h:148
A generic endpoint for log messages.
Definition: Journal.h:60
Provides server functionality for clients.
Definition: NetworkOPs.h:88
A consumption charge.
Definition: Charge.h:31
An endpoint that consumes resources.
Definition: Consumer.h:35
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
Role
Indicates the level of administrative permission to grant.
Definition: Role.h:44
The context of information needed to call an RPC.
Definition: Context.h:39
unsigned int apiVersion
Definition: Context.h:49
std::shared_ptr< JobQueue::Coro > coro
Definition: Context.h:47
Resource::Charge & loadType
Definition: Context.h:42
Application & app
Definition: Context.h:41
InfoSub::pointer infoSub
Definition: Context.h:48
beast::Journal const j
Definition: Context.h:40
LedgerMaster & ledgerMaster
Definition: Context.h:44
NetworkOPs & netOps
Definition: Context.h:43
Resource::Consumer & consumer
Definition: Context.h:45
RequestType params
Definition: Context.h:71
Data passed in from HTTP headers.
Definition: Context.h:58
std::string_view forwardedFor
Definition: Context.h:60
Json::Value params
Definition: Context.h:63