You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-07 00:35:37 +02:00
Filters can now produce output that differs from input.
This allows filters such as compression, encryption, etc. to be implemented.
This commit is contained in:
@ -12,32 +12,13 @@ Buffer write object
|
||||
***********************************************************************************************************************************/
|
||||
struct IoBufferWrite
|
||||
{
|
||||
MemContext *memContext;
|
||||
IoWrite *io;
|
||||
Buffer *write;
|
||||
MemContext *memContext; // Object memory context
|
||||
IoWrite *io; // IoWrite interface
|
||||
Buffer *write; // Buffer to write into
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Write to the buffer
|
||||
***********************************************************************************************************************************/
|
||||
static void
|
||||
ioBufferWrite(IoBufferWrite *this, Buffer *buffer)
|
||||
{
|
||||
FUNCTION_DEBUG_BEGIN(logLevelTrace);
|
||||
FUNCTION_DEBUG_PARAM(IO_BUFFER_WRITE, this);
|
||||
FUNCTION_DEBUG_PARAM(BUFFER, buffer);
|
||||
|
||||
FUNCTION_DEBUG_ASSERT(this != NULL);
|
||||
FUNCTION_DEBUG_ASSERT(buffer != NULL);
|
||||
FUNCTION_DEBUG_END();
|
||||
|
||||
bufCat(this->write, buffer);
|
||||
|
||||
FUNCTION_DEBUG_RESULT_VOID();
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create object
|
||||
New object
|
||||
***********************************************************************************************************************************/
|
||||
IoBufferWrite *
|
||||
ioBufferWriteNew(Buffer *buffer)
|
||||
@ -63,6 +44,25 @@ ioBufferWriteNew(Buffer *buffer)
|
||||
FUNCTION_DEBUG_RESULT(IO_BUFFER_WRITE, this);
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Write to the buffer
|
||||
***********************************************************************************************************************************/
|
||||
void
|
||||
ioBufferWrite(IoBufferWrite *this, Buffer *buffer)
|
||||
{
|
||||
FUNCTION_DEBUG_BEGIN(logLevelTrace);
|
||||
FUNCTION_DEBUG_PARAM(IO_BUFFER_WRITE, this);
|
||||
FUNCTION_DEBUG_PARAM(BUFFER, buffer);
|
||||
|
||||
FUNCTION_DEBUG_ASSERT(this != NULL);
|
||||
FUNCTION_DEBUG_ASSERT(buffer != NULL);
|
||||
FUNCTION_DEBUG_END();
|
||||
|
||||
bufCat(this->write, buffer);
|
||||
|
||||
FUNCTION_DEBUG_RESULT_VOID();
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Move the object to a new context
|
||||
***********************************************************************************************************************************/
|
||||
|
Reference in New Issue
Block a user