Refactor BeRTOS to be in his own directory.
[bertos.git] / bertos / dt / dtag.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
30  * -->
31  *
32  * \version $Id$
33  *
34  * \brief Tags interface.
35  * This module contains the base message definitions and the list of all available tags.
36  *
37  * \version $Id$
38  * \author Bernardo Innocenti <bernie@develer.com>
39  * \author Francesco Sacchi <batt@develer.com>
40  */
41
42 /*#*
43  *#* $Log$
44  *#* Revision 1.2  2006/07/19 12:56:26  bernie
45  *#* Convert to new Doxygen style.
46  *#*
47  *#* Revision 1.1  2005/11/04 18:26:38  bernie
48  *#* Import into DevLib.
49  *#*
50  *#* Revision 1.8  2005/06/07 15:22:29  batt
51  *#* Add const_dval_t.
52  *#*
53  *#* Revision 1.7  2005/06/06 17:42:23  batt
54  *#* Add error tag TAG_ERROR.
55  *#*
56  *#* Revision 1.6  2005/06/06 12:45:33  batt
57  *#* Add TAG_NONE tag.
58  *#*
59  *#* Revision 1.5  2005/06/06 11:04:12  batt
60  *#* Add some comments.
61  *#*
62  *#* Revision 1.4  2005/05/31 11:09:52  batt
63  *#* Add some tags.
64  *#*
65  *#* Revision 1.3  2005/05/26 14:55:12  batt
66  *#* Add form_processTime; change form_kbdProcess to form_processKey.
67  *#*
68  *#* Revision 1.2  2005/05/26 14:43:33  batt
69  *#* Add new message filter interface.
70  *#*
71  *#* Revision 1.1  2005/05/26 08:32:53  batt
72  *#* Add new Develer widget system :)
73  *#*
74  *#*/
75
76 #ifndef DT_DTAG_H
77 #define DT_DTAG_H
78
79 #include <cfg/macros.h>
80
81 /** Type for values associated with tags. */
82 typedef iptr_t dval_t;
83
84 /** Type for constant values associated with tags. */
85 typedef const_iptr_t const_dval_t;
86
87 /** Type for tag */
88 typedef enum dtag_t
89 {
90         TAG_END = 0,
91         TAG_NONE,
92         TAG_ANY,
93         TAG_SETVALUE,
94         TAG_UP,
95         TAG_DOWN,
96         TAG_START,
97         TAG_STOP,
98         TAG_TOGGLE,
99         TAG_KEY,
100         TAG_TIME,
101         TAG_ERROR,
102 } dtag_t;
103
104 /** This is the basic message structure used by all dnotifiers. */
105 typedef struct DTagItem
106 {
107         dtag_t tag;
108         dval_t val;
109 } DTagItem;
110
111 /** Marker to indicate the end of a map for message filtering/translating */
112 #define TAG_END_MARKER {{TAG_END, 0}, {TAG_END, 0}}
113 #endif