15 #ifndef ZYPP_EXTERNALDATASOURCE_H
16 #define ZYPP_EXTERNALDATASOURCE_H
23 namespace externalprogram {
57 bool send (
const char *buffer,
size_t length);
63 bool send (std::string s);
71 size_t receive(
char *buffer,
size_t length);
110 #endif // ZYPP_EXTERNALDATASOURCE_H
Bidirectional stream to external data.
std::string receiveUpto(char c)
Read characters into a string until character c is read.
size_t receive(char *buffer, size_t length)
Read some data from the input stream.
ExternalDataSource(FILE *inputfile=0, FILE *outputfile=0)
Create a new instance.
virtual int close()
Close the input and output streams.
std::string receiveLine()
Read one line from the input stream.
FILE * inputFile() const
Return the input stream.
void setBlocking(bool mode)
Set the blocking mode of the input stream.
FILE * outputFile() const
Return the output stream.
virtual ~ExternalDataSource()
Implicitly close the connection.
bool send(const char *buffer, size_t length)
Send some data to the output stream.