#include <stdio.h>
#include <stdlib.h>
#include "rdd.h"
#include "rdd_internals.h"
#include "reader.h"
#include "writer.h"
#include "filter.h"
#include "filterset.h"
#include "copier.h"
Go to the source code of this file.
Functions | |
int | rdd_copy_exec (RDD_COPIER *c, RDD_READER *r, RDD_FILTERSET *fset, RDD_COPIER_RETURN *ret) |
Generic copy routine that instructs a copier to start copying. | |
int | rdd_copy_free (RDD_COPIER *c) |
Deallocates the copier object and releases its resources. | |
int | rdd_new_copier (RDD_COPIER **self, RDD_COPY_OPS *ops, unsigned statesize) |
Allocates a copier object and space for its implementation-specific state. |
int rdd_copy_exec | ( | RDD_COPIER * | c, | |
RDD_READER * | r, | |||
RDD_FILTERSET * | fset, | |||
RDD_COPIER_RETURN * | ret | |||
) |
Generic copy routine that instructs a copier to start copying.
c | a pointer to the copier object. | |
r | a reader object from which the copier will read its source data. | |
fset | a filter set; the copier will push the data it reads from the reader to all filters in the filter set. |
RDD_OK
on success.r
. The data it reads, or the data that it substitutes, is passed to the filter set fset
. The current copier implementation differ in how they handle read errors. A simple copier will give up after the first read error, but a robust copier will retry and eventually substitute data if a read fails repeatedly.
Definition at line 75 of file copier.c.
References _RDD_COPY_OPS::exec, and _RDD_COPIER::ops.
int rdd_copy_free | ( | RDD_COPIER * | c | ) |
Deallocates the copier object and releases its resources.
c | a pointer to the copier object. |
RDD_OK
on success. Definition at line 84 of file copier.c.
References _RDD_COPY_OPS::free, _RDD_COPIER::ops, RDD_OK, and _RDD_COPIER::state.
int rdd_new_copier | ( | RDD_COPIER ** | c, | |
RDD_COPY_OPS * | ops, | |||
unsigned | statesize | |||
) |
Allocates a copier object and space for its implementation-specific state.
c | output value: will be set to a pointer to the new copier object. | |
ops | a pointer to a copiers implementation-specific copy routines. | |
statesize | the size in bytes of the copier's state. |
RDD_OK
on success. Returns RDD_NOMEM
if there is insufficient memory to create the object.Definition at line 49 of file copier.c.
References _RDD_COPIER::ops, RDD_BADARG, RDD_NOMEM, RDD_OK, and _RDD_COPIER::state.