![]() |
Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
THREAD.hGo to the documentation of this file.00001 #ifndef _THREAD_H 00002 #define _THREAD_H 00003 00004 #define INBUFSIZE 8192 00005 #define OUTBUFSIZE 32000 00006 00007 00008 typedef struct advstruct 00009 { 00010 struct advstruct *next; 00011 int num; 00012 char descr[100]; 00013 char author[80]; 00014 char rating[20]; 00015 char flags[20]; 00016 char dir[40]; 00017 } ADV; 00018 00019 typedef struct eventstruct 00020 { 00021 struct eventstruct *next; 00022 void *source; 00023 char text[200]; 00024 } EVENT; 00025 00026 00027 class THREAD : public ParserIO 00028 { 00029 public: 00030 THREAD(); 00031 virtual ~THREAD(); 00032 int ioloop(char *,int *); 00033 int read_text(char *,int *); // ParserIO callback method 00034 int write_text(char *,int ll = -1); 00035 // ParserIO callback method 00036 void echo_on(); // socket control (not used) 00037 void echo_off(); // socket control (not used) 00038 void add_event(char *s); // node-node communication 00039 int catchup(); // node-node communication 00040 int get_adv(); // eol select adventure method 00041 00042 // thread control 00043 THREAD *next; 00044 pthread_t thread; 00045 int running; // thread keep-alive 00046 int socket; 00047 int ib,it,iq; 00048 int ob,ot,oq; 00049 char inbuf[INBUFSIZE]; 00050 char outbuf[OUTBUFSIZE]; 00051 00052 // applesoft parser / eamon settings 00053 Parser cmdline; // applesoft parse 00054 db::Account *account; // db object: current account 00055 EVENT *current_event; // current event pointer 00056 ADV *selected; // selected eamon adventure disk 00057 int prompt_shown; 00058 int adjust_case; 00059 char last_print[1024]; 00060 char prompt[200]; // last line of last_print 00061 char instr[1024]; 00062 }; 00063 00064 00065 #endif // _THREAD_H |