header_body_checks.h [plain text]
#ifndef _HBC_H_INCLUDED_
#define _HBC_H_INCLUDED_
#include <mime_state.h>
#include <maps.h>
#ifndef MIME_HDR_FIRST
#define MIME_HDR_FIRST (1)
#define MIME_HDR_LAST (3)
#endif
typedef struct {
const char *map_class;
MAPS *maps;
} HBC_MAP_INFO;
typedef struct {
void (*logger) (void *, const char *, const char *, const char *, const char *);
void (*prepend) (void *, int, const char *, ssize_t, off_t);
char *(*extend) (void *, const char *, ssize_t, const char *, const char *, const char *, ssize_t, off_t);
} HBC_CALL_BACKS;
typedef struct {
HBC_CALL_BACKS *call_backs;
HBC_MAP_INFO map_info[1];
} HBC_CHECKS;
#define HBC_CHECKS_STAT_IGNORE ((char *) 0)
#define HBC_CHECKS_STAT_ERROR (&hbc_checks_error)
#define HBC_CHECKS_STAT_UNKNOWN (&hbc_checks_unknown)
extern HBC_CHECKS *hbc_header_checks_create(const char *, const char *,
const char *, const char *,
const char *, const char *,
HBC_CALL_BACKS *);
extern HBC_CHECKS *hbc_body_checks_create(const char *, const char *,
HBC_CALL_BACKS *);
extern char *hbc_header_checks(void *, HBC_CHECKS *, int, const HEADER_OPTS *,
VSTRING *, off_t);
extern char *hbc_body_checks(void *, HBC_CHECKS *, const char *, ssize_t, off_t);
#define hbc_header_checks_free(hbc) _hbc_checks_free((hbc), HBC_HEADER_SIZE)
#define hbc_body_checks_free(hbc) _hbc_checks_free((hbc), 1)
#define HBC_HEADER_SIZE (MIME_HDR_LAST - MIME_HDR_FIRST + 1)
extern void _hbc_checks_free(HBC_CHECKS *, ssize_t);
extern char hbc_checks_error;
extern const char hbc_checks_unknown;
#endif