blob: 457b546affbcf04112d0ec5df48f9f56ca4506da [file] [log] [blame]
Peer Chen8d782ee2011-01-18 21:34:18 -05001/**
2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23/*
24 * parse.h - Definitions for the cbootimage parsing code.
25 */
26
27/*
28 * TODO / Notes
29 * - Add doxygen commentary
30 */
31
32#ifndef INCLUDED_PARSE_H
33#define INCLUDED_PARSE_H
34
35#include "cbootimage.h"
36
37
38/*
39 * Enums
40 */
41
42typedef enum
43{
44 token_none = 0,
45 token_attribute,
46 token_bootloader,
47 token_page_size,
48 token_redundancy,
49 token_version,
50 token_bct_file,
51 token_addon,
52
53 token_force32 = 0x7fffffff
54} parse_token;
55
56/* Forward declarations */
57typedef int (*process_function)(build_image_context *context,
58 parse_token token,
59 char *Remiainder);
60
61typedef struct
62{
63 char *prefix;
64 parse_token token;
65 process_function process;
66} parse_item;
67
68/*
69 * Function prototypes
70 */
71void process_config_file(build_image_context *context);
72
73
74#endif /* #ifndef INCLUDED_PARSE_H */