summaryrefslogtreecommitdiff
path: root/src/cos_parse.h
blob: e7f1ce02cce1a87dceeb11652004e9c90c389d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright 2018 Vincent Sanders <vince@netsurf-browser.org>
 *
 * This file is part of libnspdf.
 *
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 */

/**
 * \file
 * NetSurf PDF library parsing cos objects from file
 */

#ifndef NSPDF__COS_PARSE_H_
#define NSPDF__COS_PARSE_H_

struct nspdf_doc;
struct cos_object;
struct cos_stream;

/**
 * Parse input stream into an object
 *
 * lex and parse a byte stream to generate a COS object.
 */
nspdferror cos_parse_object(struct nspdf_doc *doc, struct cos_stream *stream, uint64_t *offset_out, struct cos_object **cosobj_out);

/**
 * Parse content stream into content operations object
 */
nspdferror cos_parse_content_stream(struct nspdf_doc *doc, struct cos_stream *stream, struct cos_object **content_out);

#endif