rippled
Loading...
Searching...
No Matches
RPCSub.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_NET_RPCSUB_H_INCLUDED
21#define RIPPLE_NET_RPCSUB_H_INCLUDED
22
23#include <xrpld/core/JobQueue.h>
24#include <xrpld/rpc/InfoSub.h>
25
26#include <boost/asio/io_context.hpp>
27
28namespace ripple {
29
31class RPCSub : public InfoSub
32{
33public:
34 virtual void
35 setUsername(std::string const& strUsername) = 0;
36 virtual void
37 setPassword(std::string const& strPassword) = 0;
38
39protected:
40 explicit RPCSub(InfoSub::Source& source);
41};
42
43// VFALCO Why is the io_context needed?
46 InfoSub::Source& source,
47 boost::asio::io_context& io_context,
48 JobQueue& jobQueue,
49 std::string const& strUrl,
50 std::string const& strUsername,
51 std::string const& strPassword,
52 Logs& logs);
53
54} // namespace ripple
55
56#endif
Abstracts the source of subscription data.
Definition InfoSub.h:68
Manages a client's subscription to data feeds.
Definition InfoSub.h:52
A pool of threads to perform work.
Definition JobQueue.h:58
Manages partitions for logging.
Definition Log.h:52
Subscription object for JSON RPC.
Definition RPCSub.h:32
virtual void setPassword(std::string const &strPassword)=0
virtual void setUsername(std::string const &strUsername)=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
std::shared_ptr< RPCSub > make_RPCSub(InfoSub::Source &source, boost::asio::io_context &io_context, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, Logs &logs)
Definition RPCSub.cpp:208