/************************************************************************ Realms of Aurealis James Rhone aka Vall of RoA clicomm.h RoA server side client comm header file. ******** 100% Completely Original Code ******** *** BE AWARE OF ALL RIGHTS AND RESERVATIONS *** ******** 100% Completely Original Code ******** All rights reserved henceforth. Please note that no guarantees are associated with any code from Realms of Aurealis. All code which has been released to the general public has been done so with an 'as is' pretense. RoA is based on both Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well as the RoA license. *** Read, Learn, Understand, Improve *** *************************************************************************/ #ifndef ROA_CLICOMM_H #define ROA_CLICOMM_H // second generation client stuff begins here... 2/13/98 -jtrhone // general defines... #define NOSTREAM 0 #define HEADLENGTH sizeof(int) #define BLOCKSTRLENGTH 128 // pseudo client dblock types... #define LOGIN_REQUEST 1 #define SOUND_NOGO 2 #define SOUND_GO 3 // #define UNUSED 4 #define PIC_NOGO 5 #define PIC_GO 6 #define PIC_STOP 7 #define EDIT_REPLY 8 #define COMMAND 9 #define HELPINDEX_REQUEST 10 #define HELPFILE_REQUEST 11 // pseudo server dblock types #define TEXT_FILE 50 #define SOUND_FILE 51 #define PIC_FILE 52 #define TEXT_MESG 53 #define SOUND_QUERY 54 #define PIC_QUERY 55 #define TEXT_QUERY 56 #define EDIT_REQUEST 57 #define MUDTERM_INFO_MSG 58 #define WHO_LIST 59 #define CHANNEL_TEXT 60 #define EQ_LIST 61 #define INV_LIST 62 //#define UNUSED 63 #define HELPINDEX_REPLY 64 #define HELPFILE_REPLY 65 #define HITMANAMOVE 66 // pseudo common types to both... #define SOUNDSTOP 998 #define DISCONNECT 999 // for clpid bitvector... #define CL_POLICIES (1 << 0) #define CL_TEXTMSG (1 << 1) #define CL_SOUNDQUERY (1 << 2) #define CL_SOUNDFILE (1 << 3) #define CL_EDITREQUEST (1 << 4) typedef struct dblock_type { int type; int version; char str1[BLOCKSTRLENGTH]; char str2[BLOCKSTRLENGTH]; int streamlen; void *stream; } dblock; // keep the protos below... /* client related functions, opening up and maintaining clients */ void start_cli_router(void); int init_client_socket(int port); int new_client_descriptor(dsdata *d, int desc); void close_client_socket(dsdata *d); int process_client_input(dsdata *d); int process_client_output(dsdata *d); void send_welcome_to_client(dsdata *d); void send_policies_to_client(dsdata *d); void send_soundfile_to_client(dsdata *d, char *fname); void send_sound_data(dsdata *d, char *fname); void send_messg_to_client(char *mesg, dsdata *d); void delete_clpid_entry(clpid_info *cl); void insert_clpid_entry(int pid, int bitvector, dsdata *d, char *stream); void client_edit(dsdata *d, char *prompt, char *txt); void null_char_clpids(chdata *ch); void wax_descriptor_clpids(dsdata *d); int process_prelim_client(cldesc *c); void close_prelim_socket(cldesc *c); int new_prelim_socket(int s); #endif /* ROA_CLICOMM_H */