dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
CSourceTransport.hpp
1// SPDX-FileCopyrightText: 2026 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Project includes
12#include "../../Plugin.hpp"
13#include <dfx-core/transports/sources/SourceTransport.hpp>
15
16namespace dfx::Plugins
17{
26{
27public:
32
34
37
38public:
40 void start(FdWatch::Poller & poller) override;
41
43 void stop() noexcept override;
44
45private:
46 Plugin const & _plugin;
47 dfx_transport_interface_t _interface{};
48 dfx_transport_handle_t _handle{};
49 dfx_poller_api_t _pluginPoller{};
50};
51} // !namespace dfx::Plugins
Convenience macros to explicitly control copy and move semantics.
#define DFX_DISABLE_COPY_AND_MOVE(ClassName)
Disable both copy and move.
Definition CopyMoveControl.hpp:37
void * dfx_transport_handle_t
Opaque handle representing a transport instance created by the plugin.
Definition PluginInterface.h:66
Definition Endpoint.hpp:24
Abstract base class for all source transports that inject messages into a Channel.
Definition SourceTransport.hpp:25
Endpoint const & endpoint() const noexcept
Gets the endpoint descriptor associated with this transport.
Definition Transport.hpp:161
nlohmann::json const & config() const noexcept
Gets the JSON configuration used to initialize this transport.
Definition Transport.hpp:176
Abstract interface for FD-based event polling.
Definition Poller.hpp:37
~CSourceTransport()
Destructor. Calls dfx_transport_interface_t::destroy on the plugin API.
CSourceTransport(Core::Endpoint endpoint, nlohmann::json config, Plugin const &plugin, dfx_transport_interface_t interface)
Constructs the adaptor and initializes the plugin-side transport.
void stop() noexcept override
Deactivates the transport.
void start(FdWatch::Poller &poller) override
Activates the transport and provides the poller vtable to the plugin.
Manager for a loaded plugin shared library.
Definition Plugin.hpp:38
Definition MessageApi.hpp:16
Interface to the host's event loop (Poller).
Definition PluginInterface.h:212
The Transport Plugin Interface.
Definition PluginInterface.h:781