state_connected.h

00001 #ifndef _DHT_KADC_STATE_CONNECTED_H_
00002 #define _DHT_KADC_STATE_CONNECTED_H_
00003 
00004 #include "state.h"
00005 #include "observer_message.h"
00006 
00007 namespace dht {
00008 namespace kadc {
00009     class state_connected : public state, 
00010                             public observer_message {
00011         static state_connected *_instance;
00012     public:
00013         static state_connected *instance();
00014         
00015         virtual void connect(client *d, notify_handler *n);
00016         virtual void disconnect(client *d, notify_handler *n);
00017         virtual void find(client *d,
00018                           const key      &index,
00019                           search_handler *handler);     
00020         virtual void store(client *d,
00021                            const key      &index,
00022                            const value    &content,
00023                            notify_handler *notify = NULL);
00024 
00025         // Observer interface
00026         virtual int received_message(client *d, message *m, 
00027                                      const observer_info &oi);
00028     protected:
00029         state_connected() : state("connected") {}
00030     };
00031 } // ns kadc
00032 } // ns dht
00033 
00034 #endif

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