add Run::Go(...) methods with pt::TextStream arguments
This commit is contained in:
2 files changed
+233
-52
No files matched your search
+36
-17
@@ -120,22 +120,32 @@ public:
|
||||
|
||||
|
||||
/*
|
||||
executing the command
|
||||
you should call Par(), Env() and Cmd() beforehand
|
||||
*/
|
||||
int Go(const char * in, size_t inlen, std::string & out);
|
||||
int Go(const char * in, std::string & out);
|
||||
int Go(const char * in, size_t inlen);
|
||||
int Go(const char * in);
|
||||
int Go(const std::string in, std::string & out);
|
||||
int Go(const std::string in);
|
||||
int Go(std::string & out);
|
||||
* executing the command
|
||||
* you should call Par(), Env() and Cmd() beforehand
|
||||
*
|
||||
* in the first method in, out and err_out can be a null
|
||||
*
|
||||
*/
|
||||
int Go(const pt::TextStream * in, pt::TextStream * out, pt::TextStream * err_out);
|
||||
int Go(const pt::TextStream & in, pt::TextStream & out, pt::TextStream & err_out);
|
||||
int Go(const pt::TextStream & in, pt::TextStream & out);
|
||||
int Go(const pt::TextStream & in);
|
||||
int Go();
|
||||
|
||||
/*
|
||||
* with standard error
|
||||
*/
|
||||
int Go(const char * in, size_t inlen, pt::TextStream & out, pt::TextStream & err_out);
|
||||
int Go(const char * in, size_t inlen, pt::TextStream & out);
|
||||
int Go(const char * in, size_t inlen);
|
||||
int Go(const char * in, pt::TextStream & out, pt::TextStream & err_out);
|
||||
int Go(const char * in, pt::TextStream & out);
|
||||
int Go(const char * in);
|
||||
|
||||
int Go(const char * in, size_t inlen, std::string & out, std::string & err_out);
|
||||
int Go(const char * in, size_t inlen, std::string & out);
|
||||
int Go(const char * in, std::string & out, std::string & err_out);
|
||||
int Go(const char * in, std::string & out);
|
||||
int Go(const std::string & in, std::string & out, std::string & err_out);
|
||||
int Go(const std::string & in, std::string & out);
|
||||
int Go(const std::string & in);
|
||||
|
||||
|
||||
/*
|
||||
@@ -163,16 +173,25 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
int Go(const char * in, size_t inlen, std::string * out, std::string * err_out);
|
||||
int GoStringStream(const char * in, size_t inlen, pt::TextStream * out, pt::TextStream * err_out);
|
||||
int GoStringString(const char * in, size_t inlen, std::string * out, std::string * err_out);
|
||||
bool GoPrepare(pt::TextStream * out, pt::TextStream * err_out);
|
||||
void GoFinish();
|
||||
|
||||
|
||||
void SetName();
|
||||
void CheckStatus();
|
||||
void WriteRead(const char * in, size_t inlen, std::string * out, std::string * err_out);
|
||||
void WriteRead(const char * in, size_t inlen, pt::TextStream * out, pt::TextStream * err_out);
|
||||
void WriteRead(const pt::TextStream * in, pt::TextStream * out, pt::TextStream * err_out);
|
||||
void WriteReadFinish(pt::TextStream * out, pt::TextStream * err_out);
|
||||
bool CreatePipes();
|
||||
bool Fork();
|
||||
void ChildThrow();
|
||||
void Child();
|
||||
void Write(const char * in, size_t inlen);
|
||||
bool Write(const char * in, size_t inlen, int descriptor);
|
||||
bool Write(const pt::TextStream & in, int descriptor);
|
||||
void Read(std::string & out, int descriptor);
|
||||
void Read(pt::TextStream & out, int descriptor);
|
||||
|
||||
|
||||
int last_status;
|
||||
@@ -187,7 +206,7 @@ private:
|
||||
|
||||
char * par[WINIX_RUN_MAX_PARAMETERS + 2];
|
||||
char * env[WINIX_RUN_MAX_PARAMETERS + 1];
|
||||
const char * command;
|
||||
const char * command; // a pointer to the command being run
|
||||
|
||||
size_t parlen;
|
||||
size_t envlen;
|
||||
|
||||
Reference in new issue
Block a user