|
|
|
|
@ -25,6 +25,7 @@
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <mutex>
|
|
|
|
|
|
|
|
|
|
namespace network
|
|
|
|
|
{
|
|
|
|
|
@ -56,6 +57,15 @@ namespace network
|
|
|
|
|
PeerNetwork(const std::string& address, uint16_t port, uint16_t localPort, uint32_t peerId, const std::string& password,
|
|
|
|
|
bool duplex, bool debug, bool dmr, bool p25, bool nxdn, bool slot1, bool slot2, bool allowActivityTransfer, bool allowDiagnosticTransfer, bool updateLookup, bool saveLookup);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Helper to lock the peer status mutex.
|
|
|
|
|
*/
|
|
|
|
|
void lockPeerStatus() { m_peerStatusMutex.lock(); }
|
|
|
|
|
/**
|
|
|
|
|
* @brief Helper to unlock the peer status mutex.
|
|
|
|
|
*/
|
|
|
|
|
void unlockPeerStatus() { m_peerStatusMutex.unlock(); }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Map of peer status.
|
|
|
|
|
*/
|
|
|
|
|
@ -78,6 +88,9 @@ namespace network
|
|
|
|
|
* @returns bool True, if configuration was sent, otherwise false.
|
|
|
|
|
*/
|
|
|
|
|
bool writeConfig() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static std::mutex m_peerStatusMutex;
|
|
|
|
|
};
|
|
|
|
|
} // namespace network
|
|
|
|
|
|
|
|
|
|
|