00001 /* 00002 * gui - [gega user interface] the flexible solution for user interface problems 00003 * Copyright (C) 2002 Gergely Gati 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; version 2 of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Gergely Gati 00019 * email: g.gati@freemail.hu 00020 * AIM screenname: GatiGergely 00021 * ICQ number: 93131690 00022 * 00023 */ 00024 #ifndef __NETCOMMON_H 00025 #define __NETCOMMON_H 00026 00027 00028 #include "port/Glw.h" 00029 00030 00031 #define NET_WRITE_BUFFER_SIZE 4096 00032 00033 #define FT_NORMAL 0 00034 #define FT_DEFLATED 1 00035 00036 00037 #define FL_REPLY (1L<<7) 00038 #define FL_CLI (32) 00039 00040 #define REQ_NONE (0) 00041 00042 // send by server 00043 #define REQ_SECHO ((u8)1) 00044 #define REQ_SLOADFILE ((u8)2) 00045 #define REQ_SWINEVENT ((u8)3) 00046 #define REQ_SAPP ((u8)4) 00047 #define REQ_SLOADFILES ((u8)5) 00048 00049 // send by client 00050 #define REQ_CECHO (u8)(1+FL_CLI) 00051 #define REQ_CCALLGAD (u8)(2+FL_CLI) 00052 #define REQ_CCLOSEWIN (u8)(3+FL_CLI) 00053 #define REQ_COPENWIN (u8)(4+FL_CLI) 00054 #define REQ_CCLOSEAPP (u8)(5+FL_CLI) 00055 #define REQ_CWINSLEEP (u8)(6+FL_CLI) 00056 #define REQ_CWINAWAKE (u8)(7+FL_CLI) 00057 #define REQ_CNEWSKIN (u8)(8+FL_CLI) 00058 00059 00060 //char *net_GetMsgName(u8 type); 00061 int net_GetPort(void); 00062 u32 net_GetUserData(u32 conn); 00063 int net_GetWaitfor(u32 conn); 00064 int net_StrMsgLen(char *str); 00065 int net_SetState(u32 conn, int waitfor, u32 userdata); 00066 int net_MsgToWaitList(u32 conn, struct glw_SockMsg *msg); 00067 struct glw_SockMsg *net_MsgFromWaitList(u32 conn); 00068 void net_ClearMsgList(u32 conn); 00069 00070 00071 u8 *net_MarshalPutLong(u8 *msg, u32 value); 00072 u8 *net_MarshalPutString(u8 *msg, char *value); 00073 u8 *net_MarshalPutBinary(u8 *msg, u8 *value, int len); 00074 u8 *net_MarshalPutTaglist(u8 *msg, tag *taglist); 00075 u32 net_MarshalGetLong(u8 **msg); 00076 char *net_MarshalGetString(u8 **msg); 00077 u8 *net_MarshalGetBinary(u8 **msg, int *len); 00078 int net_MarshalGetBinaryLen(u8 **msg); 00079 tag *net_MarshalGetTaglist(u8 **msg); 00080 void net_MarshalFreeTaglist(tag *taglist); 00081 00082 00083 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002