istream-callback.c revision 2974dca6be5120e49279f06c8aa952e5fac56048
/* Copyright (c) 2014-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "istream-private.h"
#include "istream-callback.h"
struct callback_istream {
struct istream_private istream;
void *context;
};
{
}
{
/* already returned EOF / error */
return -1;
}
}
/* data was added outside the callback */
/* EOF / error */
return -1;
/* EOF was returned with some data still added to the buffer.
return the buffer first and EOF only on the next call. */
/* buffer full */
return -2;
}
}
struct istream *
{
struct callback_istream *cstream;
return istream;
}
{
struct callback_istream *cstream =
}
{
}
{
struct callback_istream *cstream =
}
const char *error)
{
}