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_INT,              /**< integer field */
00036   IFT_UINT,             /**< unsigned integer field */
00037   IFT_LONGINT,          /**< long int field */
00038   IFT_LONGUINT,         /**< unsigned long int field */
00039   IFT_FLOAT,            /**< float field */
00040   IFT_STRING,           /**< string field */
00041   IFT_BYTE              /**< byte field */
00042 } interface_fieldtype_t;
00043 
00044 /** Interface field info list */
00045 struct interface_fieldinfo_t {
00046   interface_fieldtype_t    type;        /**< type of this field */
00047   const char              *name;        /**< Name of this field */
00048   size_t                   length;      /**< Length of field (array, string) */
00049   void                    *value;       /**< Current value of this field */
00050   interface_fieldinfo_t   *next;        /**< next field, NULL if last */
00051 };
00052
00053 }
00054
00055 #endif /* __INTERFACE_TYPES_H__ */