File indexing completed on 2024-05-12 04:04:15

0001 /*
0002     This file is part of Knights, a chess board for KDE SC 4.
0003     SPDX-FileCopyrightText: 2009, 2010, 2011 Miha Čančula <miha@noughmad.eu>
0004 
0005     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007 
0008 #ifndef KNIGHTS_LOCALPROTOCOL_H
0009 #define KNIGHTS_LOCALPROTOCOL_H
0010 
0011 #include "proto/protocol.h"
0012 
0013 
0014 namespace Knights {
0015 
0016 class LocalProtocol : public Protocol {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit LocalProtocol(QObject* parent = nullptr);
0021     ~LocalProtocol() override;
0022 
0023     Features supportedFeatures() override;
0024     bool isLocal() override;
0025 
0026     void init() override;
0027     void startGame() override;
0028     void move(const Move& m) override;
0029 
0030     void makeOffer(const Offer& offer) override;
0031     void acceptOffer(const Offer& offer) override;
0032     void declineOffer(const Offer& offer) override;
0033 };
0034 
0035 }
0036 
0037 #endif // KNIGHTS_LOCALPROTOCOL_H