Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
types.h
1 
2 /***************************************************************************
3  * types.h - Field types used in the intefaces and the messages
4  *
5  * Created: Fri Jul 16 17:35:43 2009
6  * Copyright 2006 Tim Niemueller [www.niemueller.de]
7  * 2009 Daniel Beck
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version. A runtime exception applies to
15  * this software (see LICENSE.GPL_WRE file mentioned below for details).
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Library General Public License for more details.
21  *
22  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23  */
24 
25 #ifndef __INTERFACE_TYPES_H__
26 #define __INTERFACE_TYPES_H__
27 
28 #include <sys/types.h>
29 
30 namespace fawkes {
31 
32 /** Interface field type*/
33 typedef enum {
34  IFT_BOOL, /**< boolean field */
35  IFT_INT8, /**< 8 bit integer field */
36  IFT_UINT8, /**< 8 bit unsigned integer field */
37  IFT_INT16, /**< 16 bit integer field */
38  IFT_UINT16, /**< 16 bit unsigned integer field */
39  IFT_INT32, /**< 32 bit integer field */
40  IFT_UINT32, /**< 32 bit unsigned integer field */
41  IFT_INT64, /**< 64 bit integer field */
42  IFT_UINT64, /**< 64 bit unsigned integer field */
43  IFT_FLOAT, /**< float field */
44  IFT_DOUBLE, /**< double field */
45  IFT_STRING, /**< string field */
46  IFT_BYTE, /**< byte field, alias for uint8 */
47  IFT_ENUM /**< field with interface specific enum type */
49 
50 /** Interface field info list */
52  interface_fieldtype_t type; /**< type of this field */
53  const char *enumtype; /**< text representation of enum type */
54  const char *name; /**< Name of this field */
55  size_t length; /**< Length of field (array, string) */
56  void *value; /**< Current value of this field */
57  interface_fieldinfo_t *next; /**< next field, NULL if last */
58 };
59 
60 }
61 
62 #endif /* __INTERFACE_TYPES_H__ */