xrpld
Loading...
Searching...
No Matches
RPCSub.h
1#pragma once
2
3#include <xrpl/core/JobQueue.h>
4#include <xrpl/core/ServiceRegistry.h>
5#include <xrpl/server/InfoSub.h>
6
7#include <boost/asio/io_context.hpp>
8
9#include <memory>
10#include <string>
11
12namespace xrpl {
13
17class RPCSub : public InfoSub
18{
19public:
20 virtual void
21 setUsername(std::string const& strUsername) = 0;
22 virtual void
23 setPassword(std::string const& strPassword) = 0;
24
25protected:
26 explicit RPCSub(InfoSub::Source& source);
27};
28
29// VFALCO Why is the ioContext needed?
32 InfoSub::Source& source,
33 boost::asio::io_context& ioContext,
34 JobQueue& jobQueue,
35 std::string const& strUrl,
36 std::string const& strUsername,
37 std::string const& strPassword,
38 ServiceRegistry& registry);
39
40} // namespace xrpl
Abstracts the source of subscription data.
Definition InfoSub.h:106
InfoSub(Source &source)
A pool of threads to perform work.
Definition JobQueue.h:60
RPCSub(InfoSub::Source &source)
Definition RPCSub.cpp:206
virtual void setUsername(std::string const &strUsername)=0
virtual void setPassword(std::string const &strPassword)=0
Service registry for dependency injection.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::shared_ptr< RPCSub > makeRPCSub(InfoSub::Source &source, boost::asio::io_context &ioContext, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, ServiceRegistry &registry)
Definition RPCSub.cpp:211