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

0001 /*
0002     SPDX-FileCopyrightText: 2012 Joris Guisson <joris.guisson@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef DHT_FINDNODERSP_H
0008 #define DHT_FINDNODERSP_H
0009 
0010 #include "packednodecontainer.h"
0011 #include "rpcmsg.h"
0012 
0013 namespace dht
0014 {
0015 /**
0016  * FindNode response message for DHT
0017  */
0018 class KTORRENT_EXPORT FindNodeRsp : public RPCMsg, public PackedNodeContainer
0019 {
0020 public:
0021     FindNodeRsp();
0022     FindNodeRsp(const QByteArray &mtid, const Key &id);
0023     ~FindNodeRsp() override;
0024 
0025     void apply(DHT *dh_table) override;
0026     void print() override;
0027     void encode(QByteArray &arr) const override;
0028     void parse(bt::BDictNode *dict) override;
0029 
0030     typedef QSharedPointer<FindNodeRsp> Ptr;
0031 };
0032 
0033 }
0034 
0035 #endif // DHT_FINDNODERSP_H