Sync with trunk head
[reactos.git] / lib / inflib / infhost.h
1 /*
2 * PROJECT: .inf file parser
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PROGRAMMER: Royce Mitchell III
5 * Eric Kohl
6 * Ge van Geldorp <gvg@reactos.org>
7 */
8
9 #pragma once
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14
15 #include "infcommon.h"
16
17 extern int InfHostOpenBufferedFile(PHINF InfHandle,
18 void *Buffer,
19 ULONG BufferSize,
20 ULONG *ErrorLine);
21 extern int InfHostOpenFile(PHINF InfHandle,
22 const CHAR *FileName,
23 ULONG *ErrorLine);
24 extern int InfHostWriteFile(HINF InfHandle,
25 const CHAR *FileName,
26 const CHAR *HeaderComment);
27 extern void InfHostCloseFile(HINF InfHandle);
28 extern int InfHostFindFirstLine(HINF InfHandle,
29 const CHAR *Section,
30 const CHAR *Key,
31 PINFCONTEXT *Context);
32 extern int InfHostFindNextLine(PINFCONTEXT ContextIn,
33 PINFCONTEXT ContextOut);
34 extern int InfHostFindFirstMatchLine(PINFCONTEXT ContextIn,
35 const CHAR *Key,
36 PINFCONTEXT ContextOut);
37 extern int InfHostFindNextMatchLine(PINFCONTEXT ContextIn,
38 const CHAR *Key,
39 PINFCONTEXT ContextOut);
40 extern LONG InfHostGetLineCount(HINF InfHandle,
41 const CHAR *Section);
42 extern LONG InfHostGetFieldCount(PINFCONTEXT Context);
43 extern int InfHostGetBinaryField(PINFCONTEXT Context,
44 ULONG FieldIndex,
45 UCHAR *ReturnBuffer,
46 ULONG ReturnBufferSize,
47 ULONG *RequiredSize);
48 extern int InfHostGetIntField(PINFCONTEXT Context,
49 ULONG FieldIndex,
50 ULONG *IntegerValue);
51 extern int InfHostGetMultiSzField(PINFCONTEXT Context,
52 ULONG FieldIndex,
53 CHAR *ReturnBuffer,
54 ULONG ReturnBufferSize,
55 ULONG *RequiredSize);
56 extern int InfHostGetStringField(PINFCONTEXT Context,
57 ULONG FieldIndex,
58 CHAR *ReturnBuffer,
59 ULONG ReturnBufferSize,
60 ULONG *RequiredSize);
61 extern int InfHostGetData(PINFCONTEXT Context,
62 CHAR **Key,
63 CHAR **Data);
64 extern int InfHostGetDataField(PINFCONTEXT Context,
65 ULONG FieldIndex,
66 CHAR **Data);
67 extern int InfHostFindOrAddSection(HINF InfHandle,
68 const CHAR *Section,
69 PINFCONTEXT *Context);
70 extern int InfHostAddLine(PINFCONTEXT Context, const CHAR *Key);
71 extern int InfHostAddField(PINFCONTEXT Context, const CHAR *Data);
72 extern void InfHostFreeContext(PINFCONTEXT Context);
73
74 #ifdef __cplusplus
75 }
76 #endif /* __cplusplus */
77
78 /* EOF */