blob: 1a57c1b1c5ae119d5d3ee1425a512d01cf8333a1 [file] [log] [blame]
#pragma once
#include <memory>
#include <mutex>
#include <sdbus-c++/sdbus-c++.h>
#include <string>
class DbusSemaphoreServer {
public:
DbusSemaphoreServer(sdbus::IConnection& connection, const std::string& objectPath, const std::string& propertyName, const std::string& propertyInterface, const std::string& state);
void runStateChanges(const std::vector<std::pair<std::string, std::chrono::milliseconds>>& sequence);
private:
std::unique_ptr<sdbus::IObject> m_object;
std::string m_propertyName;
std::string m_propertyInterface;
std::string m_semaphoreState;
std::mutex m_semaphoreStateMtx;
};