00001 #ifndef _DHT_KADC_STATE_CONNECTING_H_
00002 #define _DHT_KADC_STATE_CONNECTING_H_
00003
00004 #include "state.h"
00005 #include "observer_message.h"
00006
00007 namespace dht {
00008 namespace kadc {
00009 class state_connecting : public state,
00010 public observer_message {
00011 static state_connecting *_instance;
00012 public:
00013 static state_connecting *instance();
00014
00015 virtual void connect(client *d, notify_handler *n);
00016 virtual void disconnect(client *d, notify_handler *n);
00017
00018 void prepare_connecting(client *d, notify_handler *n);
00019
00020
00021 virtual int received_message(client *d, message *m,
00022 const observer_info &oi);
00023 protected:
00024 state_connecting() : state("connecting") {}
00025 };
00026 }
00027 }
00028
00029 #endif