Crossfire Client, Branch  R11627
script.h
Go to the documentation of this file.
00001 /*
00002  * static char *rcsid_script_h =
00003  *   "$Id: script.h 8952 2008-05-09 13:16:22Z ryo_saeba $";
00004  */
00005 /*
00006     Crossfire client, a client program for the crossfire program.
00007 
00008     Copyright (C) 2003 Mark Wedel & Crossfire Development Team
00009     This source file also Copyright (C) 2003 Preston Crow
00010 
00011     This program is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     This program is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU General Public License for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with this program; if not, write to the Free Software
00023     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024 
00025     The author can be reached via e-mail to crossfire-devel@real-time.com
00026 */
00027 #ifndef SCRIPT_H
00028 #define SCRIPT_H
00029 
00030 #ifndef PF_LOCAL
00031 #define      PF_LOCAL         PF_UNIX /* Old BSD name for PF_LOCAL.  */
00032 #endif
00033 #ifndef AF_LOCAL
00034 #define      AF_LOCAL        PF_LOCAL
00035 #endif
00036 
00037 enum CmdFormat {
00038    ASCII,
00039    SHORT_ARRAY,
00040    INT_ARRAY,
00041    SHORT_INT, /* one short, one int */
00042    MIXED, /* weird ones like magic map */
00043    STATS,
00044    NODATA
00045 };
00046 
00047 void script_init(const char *params);
00048 void script_list(void);
00049 void script_sync(int cmddiff);
00050 void script_kill(const char *params);
00051 #ifdef WIN32
00052 void script_killall(void);
00053 #endif
00054 void script_fdset(int *maxfd,fd_set *set);
00055 void script_process(fd_set *set);
00056 void script_watch(const char *cmd, const uint8 *data, const int len, const enum CmdFormat format);
00057 void script_monitor(const char *command, int repeat, int must_send);
00058 void script_monitor_str(const char *command);
00059 void script_tell(const char *params);
00060 
00061 #endif /*  SCRIPT_H */