1// -*- C++ -*- 2// This file is part of the aMule Project. 3// 4// Copyright (c) 2008-2011 D��vai Tam��s ( gonosztopi@amule.org ) 5// Copyright (c) 2008-2011 aMule Team ( admin@amule.org / http://www.amule.org ) 6// Copyright (c) 2002-2011 Merkur ( devs@emule-project.net / http://www.emule-project.net ) 7// 8// Any parts of this program derived from the xMule, lMule or eMule project, 9// or contributed by third-party developers are copyrighted by their 10// respective authors. 11// 12// This program is free software; you can redistribute it and/or modify 13// it under the terms of the GNU General Public License as published by 14// the Free Software Foundation; either version 2 of the License, or 15// (at your option) any later version. 16// 17// This program is distributed in the hope that it will be useful, 18// but WITHOUT ANY WARRANTY; without even the implied warranty of 19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20// GNU General Public License for more details. 21// 22// You should have received a copy of the GNU General Public License 23// along with this program; if not, write to the Free Software 24// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 25// 26 27#ifndef KADEMLIA_UTILS_KADCLIENTSEARCHER_H 28#define KADEMLIA_UTILS_KADCLIENTSEARCHER_H 29 30// Interface class for non-kad classes which want to do clientsearches 31namespace Kademlia 32{ 33 34enum EKadClientSearchRes 35{ 36 KCSR_SUCCEEDED, 37 KCSR_NOTFOUND, 38 KCSR_TIMEOUT 39}; 40 41class CKadClientSearcher 42{ 43 public: 44 virtual void KadSearchNodeIDByIPResult(EKadClientSearchRes status, const unsigned char* nodeID) = 0; 45 virtual void KadSearchIPByNodeIDResult(EKadClientSearchRes status, uint32_t ip, uint16_t port) = 0; 46}; 47 48} 49 50#endif /* KADEMLIA_UTILS_KADCLIENTSEARCHER_H */ 51