Fawkes API Fawkes Development Version

interface_listener.h

00001  
00002 /***************************************************************************
00003  *  net_interface_listener.h - BlackBoard interface listener for net handler
00004  *
00005  *  Created: Tue Mar 04 17:50:54 2008
00006  *  Copyright  2007-2008  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #ifndef __BLACKBOARD_NET_INTERFACE_LISTENER_H_
00025 #define __BLACKBOARD_NET_INTERFACE_LISTENER_H_
00026 
00027 #include <blackboard/interface_listener.h>
00028 
00029 namespace fawkes {
00030 
00031 class FawkesNetworkHub;
00032 class BlackBoard;
00033 
00034 class BlackBoardNetHandlerInterfaceListener
00035 : public BlackBoardInterfaceListener
00036 {
00037  public:
00038   BlackBoardNetHandlerInterfaceListener(BlackBoard *blackboard, Interface *interface,
00039                                         FawkesNetworkHub *hub, unsigned int clid);
00040   virtual ~BlackBoardNetHandlerInterfaceListener();
00041 
00042   virtual void bb_interface_data_changed(Interface *interface) throw();
00043   virtual bool bb_interface_message_received(Interface *interface, Message *message) throw();
00044   virtual void bb_interface_writer_added(Interface *interface,
00045                                          unsigned int instance_serial) throw();
00046   virtual void bb_interface_writer_removed(Interface *interface,
00047                                            unsigned int instance_serial) throw();
00048   virtual void bb_interface_reader_added(Interface *interface,
00049                                          unsigned int instance_serial) throw();
00050   virtual void bb_interface_reader_removed(Interface *interface,
00051                                            unsigned int instance_serial) throw();
00052 
00053  private:
00054   void send_event_serial(Interface *interface, unsigned int msg_id, unsigned int event_serial);
00055 
00056   BlackBoard       *__blackboard;
00057   Interface        *__interface;
00058   FawkesNetworkHub *__fnh;
00059 
00060   unsigned int      __clid;
00061 };
00062 
00063 } // end namespace fawkes
00064 
00065 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends