1 /*
2  * static char *rcsid_common_script_h =
3  *   "$Id$";
4  */
5 /*
6     Crossfire client, a client program for the crossfire program.
7 
8     Copyright (C) 2003 Mark Wedel & Crossfire Development Team
9     This source file also Copyright (C) 2003 Preston Crow
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.
15 
16     This program is distributed in the hope that it will be useful,
17     but WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19     GNU General Public License for more details.
20 
21     You should have received a copy of the GNU General Public License
22     along with this program; if not, write to the Free Software
23     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 
25     The author can be reached via e-mail to crossfire-devel@real-time.com
26 */
27 
28 /**
29  * @file common/script.h
30  *
31  */
32 
33 #ifndef SCRIPT_H
34 #define SCRIPT_H
35 
36 #ifndef PF_LOCAL
37 #define      PF_LOCAL         PF_UNIX /* Old BSD name for PF_LOCAL.  */
38 #endif
39 #ifndef AF_LOCAL
40 #define      AF_LOCAL        PF_LOCAL
41 #endif
42 
43 enum CmdFormat {
44    ASCII,
45    SHORT_ARRAY,
46    INT_ARRAY,
47    SHORT_INT, /* one short, one int */
48    MIXED, /* weird ones like magic map */
49    STATS,
50    NODATA
51 };
52 
53 void script_init(const char *params);
54 void script_list(void);
55 void script_sync(int cmddiff);
56 void script_kill(const char *params);
57 #ifdef WIN32
58 void script_killall(void);
59 #endif
60 void script_fdset(int *maxfd,fd_set *set);
61 void script_process(fd_set *set);
62 void script_watch(const char *cmd, const guint8 *data, const int len, const enum CmdFormat format);
63 void script_monitor(const char *command, int repeat, int must_send);
64 void script_monitor_str(const char *command);
65 void script_tell(const char *params);
66 
67 #endif /*  SCRIPT_H */
68