task_find.h

00001 #ifndef _DHT_KADC_TASK_FIND_H_
00002 #define _DHT_KADC_TASK_FIND_H_
00003 
00004 #include <string>
00005 
00006 #include "../key.h"
00007 #include "task.h"
00008 #include "client.h"
00009 
00010 namespace dht {
00011 namespace kadc {
00012     using namespace std;
00013     class task_find : public task {
00014         client                     *_client;
00015         client::message_queue_type *_msg_queue;
00016 
00017         key             _skey;      
00018         string          _index;
00019         search_handler *_handler;
00020         KadCcontext    *_kcc;
00021         
00022 #if 0
00023         // TODO configurable...
00024         // KadC parameters, use defaults when applicable
00025         const static int _nthreads = 0;
00026         const static int _duration = 0;
00027         const static int _max_hits = 500;
00028 #endif
00029     public:
00030         task_find(client *n,
00031                   client::message_queue_type *q,
00032                   KadCcontext             *kcc,
00033                   const key               &skey,
00034                   search_handler          *h);
00035 
00036         virtual ~task_find();
00037         
00038         virtual int svc(void);
00039         
00040         static int hit_callback(KadCdictionary *d, void *context);
00041     };
00042     
00043 } // ns kadc
00044 } // ns dht
00045 
00046 #endif //_DHT_KADC_TASK_FIND_H_

Generated on Thu Mar 1 16:18:47 2007 for libdht by  doxygen 1.5.1