Sha256: d02c68b04ac289cfc8e0179f8fa065f943bd284bd2f6694fdb5468a92dadd932

Contents?: true

Size: 1.65 KB

Versions: 8

Compression:

Stored size: 1.65 KB

Contents

/*
 * libxlsxwriter
 *
 * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
 *
 * packager - A libxlsxwriter library for creating Excel XLSX packager files.
 *
 */
#ifndef __LXW_PACKAGER_H__
#define __LXW_PACKAGER_H__

#include <stdint.h>
#include "third_party/zip.h"

#include "common.h"
#include "workbook.h"
#include "worksheet.h"
#include "shared_strings.h"
#include "app.h"
#include "core.h"
#include "custom.h"
#include "theme.h"
#include "styles.h"
#include "format.h"
#include "content_types.h"
#include "relationships.h"

#define LXW_ZIP_BUFFER_SIZE (16384)

/* If zlib returns Z_ERRNO then errno is set and we can trap that. Otherwise
 * return a default libxlsxwriter error. */
#define RETURN_ON_ZIP_ERROR(err, default_err)   \
    if (err == Z_ERRNO)                         \
        return LXW_ERROR_ZIP_FILE_OPERATION;    \
    else                                        \
        return default_err;

/*
 * Struct to represent a packager.
 */
typedef struct lxw_packager {

    FILE *file;
    lxw_workbook *workbook;

    size_t buffer_size;
    zipFile zipfile;
    zip_fileinfo zipfile_info;
    char *filename;
    char *buffer;
    char *tmpdir;

    uint16_t chart_count;
    uint16_t drawing_count;

} lxw_packager;


/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

lxw_packager *lxw_packager_new(const char *filename, char *tmpdir);
void lxw_packager_free(lxw_packager *packager);
lxw_error lxw_create_package(lxw_packager *self);

/* Declarations required for unit testing. */
#ifdef TESTING

#endif /* TESTING */

/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */

#endif /* __LXW_PACKAGER_H__ */

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
fast_excel-0.2.3 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.2.2 libxlsxwriter/include/xlsxwriter/packager.h
kmadej_fast_excel_fork-0.2.2 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.2.1 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.2.0 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.1.7 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.1.6 libxlsxwriter/include/xlsxwriter/packager.h
fast_excel-0.1.5 libxlsxwriter/include/xlsxwriter/packager.h