diff options
Diffstat (limited to 'src/serv/tempmap.h')
| -rw-r--r-- | src/serv/tempmap.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/serv/tempmap.h b/src/serv/tempmap.h new file mode 100644 index 0000000..0b9cf5a --- /dev/null +++ b/src/serv/tempmap.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /************************************************************************* | ||
| 2 | * | ||
| 3 | * HTCd - Copyright (C) 1998-2006 Henrik Rydberg | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef TEMPMAPH | ||
| 21 | #define TEMPMAPH | ||
| 22 | |||
| 23 | #include <sh/htc.h> | ||
| 24 | |||
| 25 | const mstring TEMP_tag="TEMP"; | ||
| 26 | |||
| 27 | const int temp_tabs=5,temp_id=0,temp_name=1,temp_start=2,temp_stop=3; | ||
| 28 | const mstring temp_tab[temp_tabs]={ | ||
| 29 | "ID","NAME","START","STOP","REFER" | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct tempmap_t { | ||
| 33 | spile list; | ||
| 34 | |||
| 35 | tempmap_t() : list(temp_tabs) { reset(); } | ||
| 36 | |||
| 37 | mstring& id() { return list[0]; } | ||
| 38 | mstring& name() { return list[1]; } | ||
| 39 | mstring& start() { return list[2]; } | ||
| 40 | mstring& stop() { return list[3]; } | ||
| 41 | mstring& refer() { return list[4]; } | ||
| 42 | |||
| 43 | void reset() { | ||
| 44 | list.resize(temp_tabs); | ||
| 45 | id()=itoa(0); | ||
| 46 | name().clear(); | ||
| 47 | start()=itoa(0); | ||
| 48 | stop()=itoa(0); | ||
| 49 | refer()=itoa(0); | ||
| 50 | } | ||
| 51 | }; | ||
| 52 | |||
| 53 | ///////////////////////////////////////////////////////// | ||
| 54 | |||
| 55 | void envAddTemp(tokmap& T); | ||
| 56 | |||
| 57 | #endif | ||
