12#ifndef ZYPP_EXTERNALDATASOURCE_H
13#define ZYPP_EXTERNALDATASOURCE_H
19#include <zypp-core/base/IOTools.h>
22 namespace externalprogram {
27 class ExternalDataSource
56 bool send(
const char *buffer,
size_t length );
62 bool send( std::string s );
70 size_t receive(
char *buffer,
size_t length );
size_t receive(char *buffer, size_t length)
Read some data from the input stream.
FILE * outputFile() const
Return the output stream.
bool send(const char *buffer, size_t length)
Send some data to the output stream.
ExternalDataSource(FILE *inputfile=0, FILE *outputfile=0)
Create a new instance.
virtual int close()
Close the input and output streams.
void setBlocking(bool mode)
Set the blocking mode of the input stream.
FILE * inputFile() const
Return the input stream.
std::string receiveUpto(char c)
Read characters into a string until delimiter c or EOF is read.
std::string receiveLine()
Read one line from the input stream.
virtual ~ExternalDataSource()
Implicitly close the connection.
Easy-to use interface to the ZYPP dependency resolver.