style: add clang-format config and reformat scaffolding files
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user