Mercurial > cabal
comparison sources/headers/core.h @ 0:bafff9de2a76
Initial commit since summer'07
| author | Vlad Glagolev <enqlave@gmail.com> |
|---|---|
| date | Sun, 20 Jan 2008 19:25:25 +0300 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:bafff9de2a76 |
|---|---|
| 1 /** | |
| 2 * core.h (2007-03-04) | |
| 3 * | |
| 4 * -- CABAL -- core header | |
| 5 * | |
| 6 * Copyright (c) 2007 Vlad Glagolev <enqlave@gmail.com> | |
| 7 * All rights reserved. | |
| 8 * | |
| 9 * Permission to use, copy, modify, and distribute this software for any | |
| 10 * purpose with or without fee is hereby granted, provided that the above | |
| 11 * copyright notice and this permission notice appear in all copies. | |
| 12 * | |
| 13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 20 */ | |
| 21 | |
| 22 #ifndef _CORE_H_ | |
| 23 #define _CORE_H_ | |
| 24 | |
| 25 #define VERSION_CORE "0.0.7" // 2007-05-13 | |
| 26 | |
| 27 #include "engine.h" | |
| 28 #include "connection.h" | |
| 29 #include "parser.h" | |
| 30 | |
| 31 class Core { | |
| 32 | |
| 33 public: | |
| 34 Core(); | |
| 35 ~Core(); | |
| 36 | |
| 37 void commandParse (int argc, char *argv[]); | |
| 38 void configParse(); | |
| 39 void pidCheck(); | |
| 40 void pidWrite(); | |
| 41 | |
| 42 void work(); | |
| 43 | |
| 44 int servers; | |
| 45 Connection *connections[MAX_SERVERS]; | |
| 46 | |
| 47 char *cfg; | |
| 48 char *pid; | |
| 49 | |
| 50 char commander; | |
| 51 | |
| 52 bool debug; | |
| 53 | |
| 54 time_t now; | |
| 55 }; | |
| 56 | |
| 57 extern Connection *C; | |
| 58 | |
| 59 #endif // _CORE_H_ |
