style: add clang-format config and reformat scaffolding files

This commit is contained in:
2026-09-07 10:07:26 +02:00
parent 975e3b2974
commit 50369995c7
12 changed files with 100 additions and 64 deletions
+8 -7
View File
@@ -1,5 +1,6 @@
#pragma once
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
@@ -14,22 +15,22 @@ struct DiscoveredPeer {
class DiscoveryService {
public:
using PeerCallback = std::function<void ( const DiscoveredPeer & )>;
using PeerCallback = std::function<void(const DiscoveredPeer&)>;
virtual ~DiscoveryService () = default;
virtual ~DiscoveryService() = default;
// Announce this peer on the LAN.
virtual bool announce ( const std::string &service_name, uint16_t signaling_port ) = 0;
virtual bool announce(const std::string& service_name, uint16_t signaling_port) = 0;
// Browse for peers; callback is invoked for each newly found service.
virtual bool browse ( PeerCallback on_peer ) = 0;
virtual bool browse(PeerCallback on_peer) = 0;
virtual void stop () = 0;
virtual void stop() = 0;
};
class DiscoveryFactory {
public:
static std::unique_ptr<DiscoveryService> create_avahi ();
static std::unique_ptr<DiscoveryService> create_avahi();
};
} // namespace sc
} // namespace sc