#include <ExternalDataSource.h>
Inheritance diagram for zypp::externalprogram::ExternalDataSource:
Public Member Functions | |
ExternalDataSource (FILE *inputfile=0, FILE *outputfile=0) | |
Create a new instance. | |
virtual | ~ExternalDataSource () |
Implicitly close the connection. | |
bool | send (const char *buffer, size_t length) |
Send some data to the output stream. | |
bool | send (std::string s) |
Send some data down the stream. | |
size_t | receive (char *buffer, size_t length) |
Read some data from the input stream. | |
std::string | receiveLine () |
Read one line from the input stream. | |
std::string | receiveUpto (char c) |
Read characters into a string until character c is read. | |
void | setBlocking (bool mode) |
Set the blocking mode of the input stream. | |
virtual int | close () |
Close the input and output streams. | |
FILE * | inputFile () const |
Return the input stream. | |
FILE * | outputFile () const |
Return the output stream. | |
Protected Attributes | |
FILE * | inputfile |
FILE * | outputfile |
Private Attributes | |
char * | linebuffer |
size_t | linebuffer_size |
Definition at line 28 of file ExternalDataSource.h.
|
Create a new instance.
Definition at line 34 of file ExternalDataSource.cc. |
|
Implicitly close the connection.
Definition at line 43 of file ExternalDataSource.cc. References close(), and linebuffer. |
|
Send some data to the output stream.
Definition at line 52 of file ExternalDataSource.cc. References outputfile. |
|
Send some data down the stream.
|
|
Read some data from the input stream.
Definition at line 107 of file ExternalDataSource.cc. References inputfile. |
|
Read one line from the input stream. Returns the line read, including the terminator. Definition at line 141 of file ExternalDataSource.cc. References zypp::iostr::getline(), inputfile, linebuffer, and linebuffer_size. Referenced by zypp::target::rpm::diffFiles(), zypp::debug::dumpMemOn(), zypp::KeyRing::Impl::dumpPublicKey(), zypp::KeyRing::Impl::publicKeys(), zypp::KeyRing::Impl::readPublicKey(), and zypp::KeyRing::Impl::readSignatureKeyId(). |
|
Read characters into a string until character c is read. C is put at the end of the string. Definition at line 73 of file ExternalDataSource.cc. References inputfile. |
|
Set the blocking mode of the input stream.
Definition at line 115 of file ExternalDataSource.cc. References ERR, inputfile, and zypp::str::strerror(). |
|
Close the input and output streams.
Reimplemented in zypp::ExternalProgram. Definition at line 157 of file ExternalDataSource.cc. References inputfile, and outputfile. Referenced by ~ExternalDataSource(). |
|
Return the input stream.
Definition at line 99 of file ExternalDataSource.h. References inputfile. |
|
Return the output stream.
Definition at line 104 of file ExternalDataSource.h. References outputfile. |
|
Definition at line 31 of file ExternalDataSource.h. Referenced by close(), inputFile(), receive(), receiveLine(), receiveUpto(), and setBlocking(). |
|
Definition at line 32 of file ExternalDataSource.h. Referenced by close(), outputFile(), and send(). |
|
Definition at line 35 of file ExternalDataSource.h. Referenced by receiveLine(), and ~ExternalDataSource(). |
|
Definition at line 36 of file ExternalDataSource.h. Referenced by receiveLine(). |