zypp::ExternalProgramWithStderr Class Reference

ExternalProgram extended to offer reading programs stderr. More...

#include <ExternalProgram.h>

Inheritance diagram for zypp::ExternalProgramWithStderr:
[legend]

List of all members.

Public Member Functions

 ExternalProgramWithStderr (const Arguments &argv_r)
 ExternalProgramWithStderr (const Arguments &argv_r, const Environment &environment_r)
bool stderrGetUpTo (std::string &retval_r, const char delim_r, bool returnDelim_r=false)
 Read data up to delim_r from stderr (nonblocking).
bool stderrGetline (std::string &retval_r, bool returnDelim_r=false)
 Read next complete line from stderr (nonblocking).

Private Member Functions

void _initStdErr ()
 Close write end of the pipe (childs end).

Private Attributes

std::string _buffer


Detailed Description

ExternalProgram extended to offer reading programs stderr.

See also:
ExternalProgram

Definition at line 250 of file ExternalProgram.h.


Constructor & Destructor Documentation

zypp::ExternalProgramWithStderr::ExternalProgramWithStderr ( const Arguments argv_r  )  [inline]

Definition at line 253 of file ExternalProgram.h.

References _initStdErr().

zypp::ExternalProgramWithStderr::ExternalProgramWithStderr ( const Arguments argv_r,
const Environment environment_r 
) [inline]

Definition at line 257 of file ExternalProgram.h.

References _initStdErr().


Member Function Documentation

bool zypp::ExternalProgramWithStderr::stderrGetUpTo ( std::string &  retval_r,
const char  delim_r,
bool  returnDelim_r = false 
)

Read data up to delim_r from stderr (nonblocking).

Note:
If delim_r is '', we read as much data as possible.
Returns:
false if data are not yet available (retval_r remains untouched then).

Definition at line 593 of file ExternalProgram.cc.

References _buffer, and zypp::_ExternalProgram::EarlyPipe::_stderr.

Referenced by zypp::repo::PluginServiceRepos::PluginServiceRepos(), and stderrGetline().

bool zypp::ExternalProgramWithStderr::stderrGetline ( std::string &  retval_r,
bool  returnDelim_r = false 
) [inline]

Read next complete line from stderr (nonblocking).

Returns:
false if data are not yet available (retval_r remains untouched then).

Definition at line 274 of file ExternalProgram.h.

References stderrGetUpTo().

void zypp::ExternalProgramWithStderr::_initStdErr (  )  [inline, private]

Close write end of the pipe (childs end).

Definition at line 279 of file ExternalProgram.h.

References zypp::_ExternalProgram::EarlyPipe::closeW().

Referenced by ExternalProgramWithStderr().


Member Data Documentation

Definition at line 283 of file ExternalProgram.h.

Referenced by stderrGetUpTo().


The documentation for this class was generated from the following files:

doxygen