File indexing completed on 2025-01-05 04:37:24

0001 /*
0002     SPDX-FileCopyrightText: 2005 Joris Guisson <joris.guisson@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #ifndef BTSERVER_H
0007 #define BTSERVER_H
0008 
0009 #include "globals.h"
0010 #include <interfaces/serverinterface.h>
0011 #include <ktorrent_export.h>
0012 #include <qlist.h>
0013 #include <qobject.h>
0014 
0015 namespace bt
0016 {
0017 class PeerManager;
0018 
0019 /**
0020  * @author Joris Guisson
0021  *
0022  * Class which listens for incoming connections.
0023  * Handles authentication and then hands of the new
0024  * connections to a PeerManager.
0025  *
0026  * All PeerManager's should register with this class when they
0027  * are created and should unregister when they are destroyed.
0028  */
0029 class KTORRENT_EXPORT Server : public ServerInterface
0030 {
0031     Q_OBJECT
0032 public:
0033     Server();
0034     ~Server() override;
0035 
0036     bool changePort(Uint16 port) override;
0037 
0038 private:
0039     class Private;
0040     Private *d;
0041 };
0042 
0043 }
0044 
0045 #endif