3#include "feed/SubscriptionManagerInterface.hpp"
4#include "feed/Types.hpp"
5#include "rpc/common/SpecBackend.hpp"
6#include "rpc/common/Types.hpp"
8#include <rpcspec/handlers/unsubscribe/Types.hpp>
9#include <xrpl/protocol/AccountID.h>
10#include <xrpl/protocol/UintTypes.h>
27 std::shared_ptr<feed::SubscriptionManagerInterface> subscriptions_;
33 using OrderBook = rpc::spec::handlers::unsubscribe::OrderBook;
38 using StreamType = rpc::spec::handlers::unsubscribe::StreamType;
54 UnsubscribeHandler(std::shared_ptr<feed::SubscriptionManagerInterface>
const& subscriptions);
68 unsubscribeFromStreams(
69 std::vector<StreamType>
const& streams,
74 unsubscribeFromAccounts(
75 std::vector<xrpl::AccountID>
const& accounts,
80 unsubscribeFromProposedAccounts(
81 std::vector<xrpl::AccountID>
const& accountsProposed,
87 std::vector<OrderBook>
const& books,
92 unsubscribeFromMPTIssuances(
93 std::vector<xrpl::MPTID>
const& mptIssuanceIDs,
rpc::spec::handlers::unsubscribe::OrderBook OrderBook
A struct to hold one order book.
Definition Unsubscribe.hpp:33
VoidOutput Output
The command has no output data.
Definition Unsubscribe.hpp:43
HandlerReturnType< Output > Result
The result type of the command: either the Output or an error status.
Definition Unsubscribe.hpp:47
UnsubscribeHandler(std::shared_ptr< feed::SubscriptionManagerInterface > const &subscriptions)
Construct a new BaseUnsubscribeHandler object.
Definition Unsubscribe.cpp:18
Result process(Input const &input, Context const &ctx) const
Process the Unsubscribe command.
Definition Unsubscribe.cpp:26
rpc::spec::handlers::unsubscribe::StreamType StreamType
A subscribable stream type.
Definition Unsubscribe.hpp:38
std::shared_ptr< Subscriber > SubscriberSharedPtr
Shared ownership pointer to a subscriber.
Definition Types.hpp:22
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:17
std::expected< OutputType, Status > HandlerReturnType
Return type for each individual handler.
Definition Types.hpp:63
spec::HandlerFor< InputT, boost::json::value > HandlerFor
The spec-driven base every typed handler inherits.
Definition SpecBackend.hpp:24
Context of an RPC call.
Definition Types.hpp:102
An empty type used as Output for handlers than don't actually produce output.
Definition Types.hpp:97