Fawkes API  Fawkes Development Version
types.h
00001 
00002 /***************************************************************************
00003  *  types.h - Field types used in the intefaces and the messages
00004  *
00005  *  Created: Fri Jul 16 17:35:43 2009
00006  *  Copyright  2006  Tim Niemueller [www.niemueller.de]
00007  *             2009  Daniel Beck
00008  *
00009  ****************************************************************************/
00010 
00011 /*  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version. A runtime exception applies to
00015  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU Library General Public License for more details.
00021  *
00022  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00023  */
00024 
00025 #ifndef __INTERFACE_TYPES_H__
00026 #define __INTERFACE_TYPES_H__
00027 
00028 #include <sys/types.h>
00029 
00030 namespace fawkes {
00031 
00032 /** Interface field type*/
00033 typedef enum {
00034   IFT_BOOL,             /**< boolean field */
00035   IFT_INT8,             /**< 8 bit integer field */
00036   IFT_UINT8,            /**< 8 bit unsigned integer field */
00037   IFT_INT16,            /**< 16 bit integer field */
00038   IFT_UINT16,           /**< 16 bit unsigned integer field */
00039   IFT_INT32,            /**< 32 bit integer field */
00040   IFT_UINT32,           /**< 32 bit unsigned integer field */
00041   IFT_INT64,            /**< 64 bit integer field */
00042   IFT_UINT64,           /**< 64 bit unsigned integer field */
00043   IFT_FLOAT,            /**< float field */
00044   IFT_STRING,           /**< string field */
00045   IFT_BYTE,             /**< byte field, alias for uint8 */
00046   IFT_ENUM              /**< field with interface specific enum type */
00047 } interface_fieldtype_t;
00048 
00049 /** Interface field info list */
00050 struct interface_fieldinfo_t {
00051   interface_fieldtype_t    type;        /**< type of this field */
00052   const char              *enumtype;    /**< text representation of enum type */
00053   const char              *name;        /**< Name of this field */
00054   size_t                   length;      /**< Length of field (array, string) */
00055   void                    *value;       /**< Current value of this field */
00056   interface_fieldinfo_t   *next;        /**< next field, NULL if last */
00057 };
00058 
00059 }
00060 
00061 #endif /* __INTERFACE_TYPES_H__ */