MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
DomainWatcher.hpp File Reference
#include <cstdint>
#include <filesystem>
#include <memory>
#include <string>
#include <unistd.h>
#include <uuid.h>
#include <mxl/platform.h>
#include "mxl-internal/Flow.hpp"
#include "mxl-internal/SharedMemory.hpp"
Include dependency graph for DomainWatcher.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mxl::lib::DomainWatcherRecord
 Entry stored in the unordered_maps. More...

Namespaces

namespace  mxl
namespace  mxl::lib

Functions

void mxl::lib::addFlow (FlowWriter *writer, uuids::uuid id)
std::size_t mxl::lib::count (uuids::uuid id) const noexcept
 Returns the number of writers registered for flow id 'id'.
 mxl::lib::DomainWatcher (std::filesystem::path const &in_domain)
void mxl::lib::processEvents ()
void mxl::lib::removeFlow (FlowWriter *writer, uuids::uuid id)
std::size_t mxl::lib::size () const noexcept
 Returns the total number of writers that are registered in the DomainWatcher.
void mxl::lib::stop ()
 mxl::lib::~DomainWatcher ()

Variables

std::filesystem::path mxl::lib::_domain
 The monitored domain.
std::mutex mxl::lib::_mutex
 Prodect maps.
std::atomic< bool > mxl::lib::_running
 Controls the event processing thread.
std::unordered_multimap< int, DomainWatcherRecord > mxl::lib::_watches
 Map of watch descriptors to file records. Multiple records could use the same watchfd.
std::thread mxl::lib::_watchThread
 Event processing thread.