- Factor out .inf handling code from usetup
[reactos.git] / reactos / lib / inflib / infhost.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: .inf file parser
4 * FILE: lib/inflib/infros.h
5 * PURPOSE: Public .inf routines for use on the host build system
6 * PROGRAMMER: Royce Mitchell III
7 * Eric Kohl
8 * Ge van Geldorp
9 */
10
11 #ifndef INFHOST_H_INCLUDED
12 #define INFHOST_H_INCLUDED
13
14 #include <infcommon.h>
15
16 extern int InfHostOpenBufferedFile(PHINF InfHandle,
17 void *Buffer,
18 unsigned long BufferSize,
19 unsigned long *ErrorLine);
20 extern int InfHostOpenFile(PHINF InfHandle,
21 char *FileName,
22 unsigned long *ErrorLine);
23 extern void InfHostCloseFile(HINF InfHandle);
24 extern int InfHostFindFirstLine(HINF InfHandle,
25 const char *Section,
26 const char *Key,
27 PINFCONTEXT *Context);
28 extern int InfHostFindNextLine(PINFCONTEXT ContextIn,
29 PINFCONTEXT ContextOut);
30 extern int InfHostFindFirstMatchLine(PINFCONTEXT ContextIn,
31 const char *Key,
32 PINFCONTEXT ContextOut);
33 extern int InfHostFindNextMatchLine(PINFCONTEXT ContextIn,
34 const char *Key,
35 PINFCONTEXT ContextOut);
36 extern long InfHostGetLineCount(HINF InfHandle,
37 const char *Section);
38 extern long InfHostGetFieldCount(PINFCONTEXT Context);
39 extern int InfHostGetBinaryField(PINFCONTEXT Context,
40 unsigned long FieldIndex,
41 unsigned char *ReturnBuffer,
42 unsigned long ReturnBufferSize,
43 unsigned long *RequiredSize);
44 extern int InfHostGetIntField(PINFCONTEXT Context,
45 unsigned long FieldIndex,
46 unsigned long *IntegerValue);
47 extern int InfHostGetMultiSzField(PINFCONTEXT Context,
48 unsigned long FieldIndex,
49 char *ReturnBuffer,
50 unsigned long ReturnBufferSize,
51 unsigned long *RequiredSize);
52 extern int InfHostGetStringField(PINFCONTEXT Context,
53 unsigned long FieldIndex,
54 char *ReturnBuffer,
55 unsigned long ReturnBufferSize,
56 unsigned long *RequiredSize);
57 extern int InfHostGetData(PINFCONTEXT Context,
58 char **Key,
59 char **Data);
60 extern int InfHostGetDataField(PINFCONTEXT Context,
61 unsigned long FieldIndex,
62 char **Data);
63 extern VOID InfHostFreeContext(PINFCONTEXT Context);
64
65 #endif /* INFROS_H_INCLUDED */
66
67 /* EOF */