interface_info.h

00001
00002 /***************************************************************************
00003  *  interface_info.h - BlackBoard Interface Info
00004  *
00005  *  Created: Mon Mar 03 15:43:45 2008 (after topic switch)
00006  *  Copyright  2006-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 __INTERFACE_INTERFACE_INFO_H_
00025 #define __INTERFACE_INTERFACE_INFO_H_
00026 
00027 #include <list>
00028
00029 namespace fawkes {
00030
00031 class InterfaceInfo
00032 {
00033  public:
00034   InterfaceInfo(const char *type, const char *id, const unsigned char *hash,
00035                 unsigned int serial, bool has_writer, unsigned int num_readers);
00036   InterfaceInfo(const InterfaceInfo &i);
00037   ~InterfaceInfo();
00038
00039   const char *           type() const;
00040   const char *           id() const;
00041   const unsigned char *  hash() const;
00042   bool                   has_writer() const;
00043   unsigned int           num_readers() const;
00044   unsigned int           serial() const;
00045
00046  private:
00047   char          *__type;
00048   char          *__id;
00049   unsigned char *__hash;
00050   bool           __has_writer;
00051   unsigned int   __num_readers;
00052   unsigned int   __serial;
00053 };
00054
00055
00056 class InterfaceInfoList : public std::list<InterfaceInfo>
00057 {
00058  public:
00059   void append(const char *type, const char *id, const unsigned char *hash,
00060               unsigned int serial, bool has_writer, unsigned int num_readers);
00061 };
00062
00063 } // end namespace fawkes
00064
00065 #endif