2019-03-08 18:18:31 +01:00
|
|
|
/* SPDX-License-Identifier: ISC */
|
2019-01-19 17:26:41 +01:00
|
|
|
#ifndef PKGWRITER_H
|
|
|
|
#define PKGWRITER_H
|
|
|
|
|
2019-02-15 09:05:12 +01:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2019-01-19 17:26:41 +01:00
|
|
|
#include "pkgformat.h"
|
|
|
|
#include "compressor.h"
|
|
|
|
|
|
|
|
typedef struct pkg_writer_t pkg_writer_t;
|
|
|
|
|
2019-02-15 09:05:12 +01:00
|
|
|
pkg_writer_t *pkg_writer_open(const char *path, bool force);
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
void pkg_writer_close(pkg_writer_t *writer);
|
|
|
|
|
|
|
|
int pkg_writer_start_record(pkg_writer_t *writer, uint32_t magic,
|
|
|
|
compressor_t *cmp);
|
|
|
|
|
|
|
|
int pkg_writer_write_payload(pkg_writer_t *wr, void *data, size_t size);
|
|
|
|
|
|
|
|
int pkg_writer_end_record(pkg_writer_t *wr);
|
|
|
|
|
|
|
|
#endif /* PKGWRITER_H */
|