00001 #ifndef _DHT_SEARCH_HANDLER_H_ 00002 #define _DHT_SEARCH_HANDLER_H_ 00003 00004 #include "notify_handler.h" 00005 #include "key.h" 00006 #include "value.h" 00007 00008 namespace dht { 00017 class search_handler : public notify_handler { 00018 public: 00019 virtual ~search_handler(); 00020 00036 virtual int found(const dht::key &k, const dht::value &v) = 0; 00037 00045 virtual void success(const dht::key &k); 00046 00054 virtual void failure(const dht::key &k, 00055 int error, const char *errstr); 00056 00057 virtual void success(); 00058 virtual void failure(int error, const char *errstr); 00059 }; 00060 } 00061 00062 #endif //_DHT_SEARCH_HANDLER_H_