Mostly minor fixes up until version 0.8.10.
[irreco.git] / irtrans / irserver / src / common / dbstruct.h
blob7140b3193a1f7b946282bf915184280de2288b7c
1 /*
2 * Copyright (c) 2007, IRTrans GmbH
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of IRTrans GmbH nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY IRTrans GmbH ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL IRTrans GmbH BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #pragma pack(1)
33 #define COMMAND_MODE_FN 1
34 #define COMMAND_MODE_KEY 2
36 typedef struct {
37 char name[80];
38 word target_mask;
39 } ROUTING;
41 typedef struct {
42 char name[80];
43 byte addr;
44 } ROOMS;
46 typedef struct {
47 char name[80];
48 int number;
49 word target_mask;
50 word source_mask;
51 int timing_start;
52 int timing_end;
53 int command_start;
54 int command_end;
55 int toggle_pos;
56 byte transmitter;
57 byte rcv_len;
58 } IRREMOTE;
61 typedef struct {
62 int remote;
63 byte ir_length;
64 byte transmit_freq;
65 byte mode;
66 word pause_len[TIME_LEN];
67 word pulse_len[TIME_LEN];
68 byte time_cnt;
69 byte ir_repeat;
70 byte repeat_pause;
71 word link_count;
72 word flash_adr;
73 } IRTIMING;
75 typedef struct {
76 char name[20];
77 int remote;
78 int timing;
79 int command_length;
80 int pause;
81 byte toggle_seq;
82 byte toggle_pos;
83 byte mode;
84 word ir_length;
85 byte data[CODE_LEN * 2];
86 word ir_length_cal;
87 byte data_cal[CODE_LEN * 2 + 40];
88 } IRCOMMAND;
90 typedef struct {
91 char name[20];
92 int remote;
93 int timing;
94 int command_length;
95 int pause;
96 byte toggle_seq;
97 byte toggle_pos;
98 byte mode;
99 byte ir_length;
100 int macro_num;
101 int macro_len;
102 } IRMACRO;
106 typedef struct {
107 char mac_remote[80];
108 char mac_command[20];
109 int pause;
110 } MACROCOMMAND;
112 typedef struct {
113 word id;
114 word num;
115 word mode;
116 char remote[80];
117 char command[20];
118 } SWITCH;
120 typedef struct {
121 int comnum;
122 byte type[8];
123 int function[8];
124 } APPCOMMAND;
126 typedef struct {
127 char name[20];
128 char classname[50];
129 char appname[100];
130 char remote[80];
131 int remnum;
132 byte type;
133 byte com_cnt;
134 byte active;
135 byte align;
136 APPCOMMAND com[50];
137 } APP;
139 #pragma pack(8)