00001 #ifndef PIPE_H 00002 #define PIPE_H 00003 00004 #include <fcntl.h> 00005 #include "guicast.h" 00006 #include "asset.h" 00007 00008 extern "C" { 00009 extern int sigpipe_received; 00010 } 00011 00012 class Pipe { 00013 public: 00014 Pipe(char *command, char *sub_str = 0, char sub_char = '%'); 00015 ~Pipe() ; 00016 int open_read() ; 00017 int open_write() ; 00018 void close() ; 00019 00020 int fd; 00021 private: 00022 int substitute() ; 00023 int open(char *mode) ; 00024 00025 char sub_char; 00026 char *sub_str; 00027 char *command; 00028 char complete[BCTEXTLEN]; 00029 FILE *file; 00030 }; 00031 00032 #endif /* PIPE_H */
1.5.5