forked from Kistler-Group/sdbus-cpp
Little code cleanups and refactorings
This commit is contained in:
+9
-1
@@ -80,14 +80,22 @@ namespace sdbus { namespace internal {
|
||||
std::unique_ptr<sdbus::internal::IConnection> clone() const override;
|
||||
|
||||
private:
|
||||
static sd_bus* openBus(Connection::BusType type);
|
||||
static void finishHandshake(sd_bus* bus);
|
||||
static int createProcessingExitDescriptor();
|
||||
static void closeProcessingExitDescriptor(int fd);
|
||||
static bool processPendingRequest(sd_bus* bus);
|
||||
static bool waitForNextRequest(sd_bus* bus, int exitFd);
|
||||
static std::string composeSignalMatchFilter( const std::string& objectPath
|
||||
, const std::string& interfaceName
|
||||
, const std::string& signalName );
|
||||
void notifyProcessingLoopToExit();
|
||||
void joinWithProcessingLoop();
|
||||
|
||||
private:
|
||||
std::unique_ptr<sd_bus, decltype(&sd_bus_flush_close_unref)> bus_{nullptr, &sd_bus_flush_close_unref};
|
||||
std::thread asyncLoopThread_;
|
||||
std::atomic<int> runFd_{-1};
|
||||
std::atomic<int> exitLoopFd_{-1};
|
||||
BusType busType_;
|
||||
|
||||
static constexpr const uint64_t POLL_TIMEOUT_USEC = 500000;
|
||||
|
||||
Reference in New Issue
Block a user