2003-11-01 06:35:29 +01:00
|
|
|
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; compile-command: "make -k";-*- */
|
|
|
|
/*
|
2008-01-19 17:03:53 +01:00
|
|
|
* Copyright 1997-2008 by Eric House (xwords@eehouse.org). All rights reserved.
|
2003-11-01 06:35:29 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
#ifndef _LINUXMAIN_H_
|
|
|
|
#define _LINUXMAIN_H_
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
#include "dictnry.h"
|
|
|
|
#include "mempool.h"
|
|
|
|
#include "comms.h"
|
|
|
|
#include "memstream.h"
|
|
|
|
/* #include "compipe.h" */
|
|
|
|
|
|
|
|
extern int errno;
|
|
|
|
|
|
|
|
typedef struct LinuxBMStruct {
|
|
|
|
XP_U8 nCols;
|
|
|
|
XP_U8 nRows;
|
|
|
|
XP_U8 nBytes;
|
|
|
|
} LinuxBMStruct;
|
|
|
|
|
|
|
|
int initListenerSocket( int port );
|
2006-08-26 23:15:20 +02:00
|
|
|
XP_S16 linux_send( const XP_U8* buf, XP_U16 buflen,
|
|
|
|
const CommsAddrRec* addrRec, void* closure );
|
2008-01-19 17:03:53 +01:00
|
|
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
|
|
|
# define LINUX_SEND linux_send
|
|
|
|
#else
|
|
|
|
# define LINUX_SEND NULL
|
|
|
|
#endif
|
|
|
|
|
2007-11-19 00:43:27 +01:00
|
|
|
#ifdef COMMS_HEARTBEAT
|
|
|
|
void linux_reset( void* closure );
|
|
|
|
#endif
|
2006-08-26 23:15:20 +02:00
|
|
|
int linux_relay_receive( CommonGlobals* cGlobals, unsigned char* buf,
|
|
|
|
int bufSize );
|
2005-03-12 06:33:30 +01:00
|
|
|
|
2005-09-09 05:12:58 +02:00
|
|
|
void linuxFireTimer( CommonGlobals* cGlobals, XWTimerReason why );
|
|
|
|
|
|
|
|
|
2006-08-16 15:44:44 +02:00
|
|
|
XWStreamCtxt* stream_from_msgbuf( CommonGlobals* cGlobals,
|
|
|
|
unsigned char* bufPtr, XP_U16 nBytes );
|
2003-11-01 06:35:29 +01:00
|
|
|
XP_UCHAR* strFromStream( XWStreamCtxt* stream );
|
|
|
|
|
|
|
|
void catGameHistory( CommonGlobals* cGlobals );
|
|
|
|
void catOnClose( XWStreamCtxt* stream, void* closure );
|
2008-09-18 05:46:27 +02:00
|
|
|
XP_Bool file_exists( const char* fileName );
|
|
|
|
XWStreamCtxt* streamFromFile( CommonGlobals* cGlobals, char* name,
|
|
|
|
void* closure );
|
|
|
|
void writeToFile( XWStreamCtxt* stream, void* closure );
|
|
|
|
|
2009-02-28 20:19:42 +01:00
|
|
|
void linux_close_socket( CommonGlobals* cGlobals );
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2007-01-06 18:46:02 +01:00
|
|
|
#ifdef KEYBOARD_NAV
|
|
|
|
XP_Bool linShiftFocus( CommonGlobals* cGlobals, XP_Key key,
|
|
|
|
const BoardObjectType* order,
|
|
|
|
BoardObjectType* nxtP );
|
|
|
|
#endif
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
#endif
|