Sha256: c3f26d7f5214eef576895d0629dc26792805b41422b88ee6b7c242481b4311e3

Contents?: true

Size: 1.85 KB

Versions: 11

Compression:

Stored size: 1.85 KB

Contents

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

#include <stdint.h>

#include "common.h"

/* Define the queue.h STAILQ structs for the generic data structs. */
STAILQ_HEAD(lxw_rel_tuples, lxw_rel_tuple);

typedef struct lxw_rel_tuple {

    char *type;
    char *target;
    char *target_mode;

    STAILQ_ENTRY (lxw_rel_tuple) list_pointers;

} lxw_rel_tuple;

/*
 * Struct to represent a relationships.
 */
typedef struct lxw_relationships {

    FILE *file;

    uint32_t rel_id;
    struct lxw_rel_tuples *relationships;

} lxw_relationships;



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

lxw_relationships *lxw_relationships_new(void);
void lxw_free_relationships(lxw_relationships *relationships);
void lxw_relationships_assemble_xml_file(lxw_relationships *self);

void lxw_add_document_relationship(lxw_relationships *self, const char *type,
                                   const char *target);
void lxw_add_package_relationship(lxw_relationships *self, const char *type,
                                  const char *target);
void lxw_add_ms_package_relationship(lxw_relationships *self,
                                     const char *type, const char *target);
void lxw_add_worksheet_relationship(lxw_relationships *self, const char *type,
                                    const char *target,
                                    const char *target_mode);

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

STATIC void _relationships_xml_declaration(lxw_relationships *self);

#endif /* TESTING */

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

#endif /* __LXW_RELATIONSHIPS_H__ */

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
fast_excel-0.4.1 libxlsxwriter/include/xlsxwriter/relationships.h
fast_excel-0.4.0 libxlsxwriter/include/xlsxwriter/relationships.h
fast_excel-0.3.0 libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.2.1.pre.2 ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.2.1.pre ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.2.0 ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.2.0.pre.2 ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.2.0.pre ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.1.2.pre ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.1.1 ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h
xlsxwriter-0.1.0 ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h