mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-26 06:07:04 +08:00
29 lines
604 B
C++
29 lines
604 B
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
|
|
#ifndef CONNECTIONMANAGER_H
|
|
#define CONNECTIONMANAGER_H
|
|
|
|
class PeerWireClient;
|
|
|
|
#include <QByteArray>
|
|
#include <QSet>
|
|
|
|
class ConnectionManager
|
|
{
|
|
public:
|
|
static ConnectionManager *instance();
|
|
|
|
bool canAddConnection() const;
|
|
void addConnection(PeerWireClient *connection);
|
|
void removeConnection(PeerWireClient *connection);
|
|
int maxConnections() const;
|
|
QByteArray clientId() const;
|
|
|
|
private:
|
|
QSet<PeerWireClient *> connections;
|
|
mutable QByteArray id;
|
|
};
|
|
|
|
#endif
|