- Timestamp:
- 2010-05-26T23:52:09+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/os_process.h
r22173 r22177 33 33 #define OS_PROCESS_H 34 34 35 35 #include <stdlib.h> 36 36 37 enum OSProcessPipeMode { uniRead=0, uniWrite=1, biReadWrite=2, noPipe=3 }; 37 enum OSProcessPipeMode { uniRead=0, uniWrite=1, biReadWrite=2 }; 38 enum OSProcessWarnStatus { withoutWarning, withWarning }; 38 39 39 40 class osprocess … … 41 42 42 43 public: 43 osprocess(char* cmdline);44 44 osprocess(char* cmdline, OSProcessPipeMode mode); 45 45 virtual ~osprocess(); 46 46 47 /* 48 virtual bool eop(); // end of pipe 49 virtual bool eop(OSProcessPipeMode); // end of pipe, for designated pipe 47 /* one day might want these 48 virtual bool end_of_pipe(); 49 virtual bool end_of_read_pipe(); 50 virtual bool end_of_write_pipe(); 50 51 */ 51 52 52 virtual int write(char* buffer, const int buffer_len) ;53 virtual int read(char* buffer, const int buffer_len) ;53 virtual int write(char* buffer, const int buffer_len)=0; 54 virtual int read(char* buffer, const int buffer_len)=0; 54 55 56 virtual bool close_write_pipe(OSProcessWarnStatus warn_status=withWarning)=0; 57 virtual bool close_read_pipe(OSProcessWarnStatus warn_status=withWarning)=0; 55 58 virtual bool close(); 56 virtual bool close(OSProcessPipeMode mode); 59 57 60 58 61 protected: 59 62 OSProcessPipeMode mode_; 60 bool read_pipe_open_;61 bool write_pipe_open_;62 63 63 64 };
Note:
See TracChangeset
for help on using the changeset viewer.