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