ReactOS  0.4.14-dev-608-gd495a4f
inicache.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Setup Library
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: INI file parser that caches contents of INI file in memory.
5  * COPYRIGHT: Copyright 2002-2018 Royce Mitchell III
6  */
7 
8 #pragma once
9 
10 typedef struct _INICACHEKEY
11 {
14 
15  struct _INICACHEKEY *Next;
16  struct _INICACHEKEY *Prev;
18 
19 
20 typedef struct _INICACHESECTION
21 {
23 
26 
30 
31 
32 typedef struct _INICACHE
33 {
37 
38 
39 typedef struct _PINICACHEITERATOR
40 {
44 
45 
46 typedef enum
47 {
53 
54 /* FUNCTIONS ****************************************************************/
55 
59  PCHAR FileBuffer,
61  BOOLEAN String);
62 
67  BOOLEAN String);
68 
73  BOOLEAN String);
74 
75 VOID
78 
82  PWCHAR Name);
83 
86  PINICACHESECTION Section,
88  PWCHAR *KeyData);
89 
92  PINICACHESECTION Section,
93  PWCHAR *KeyName,
94  PWCHAR *KeyData);
95 
96 BOOLEAN
98  PINICACHEITERATOR Iterator,
99  PWCHAR *KeyName,
100  PWCHAR *KeyData);
101 
102 VOID
104  PINICACHEITERATOR Iterator);
105 
106 
109  PINICACHESECTION Section,
110  PINICACHEKEY AnchorKey,
111  INSERTION_TYPE InsertionType,
112  PWCHAR Name,
113  PWCHAR Data);
114 
115 PINICACHE
117 
118 NTSTATUS
122 
123 NTSTATUS
126  PWCHAR FileName);
127 
131  PWCHAR Name);
132 
133 /* EOF */
signed char * PCHAR
Definition: retypes.h:7
PWCHAR Name
Definition: inicache.h:12
PINICACHE IniCacheCreate(VOID)
Definition: inicache.c:929
PINICACHEKEY FirstKey
Definition: inicache.h:24
struct _INICACHESECTION * Prev
Definition: inicache.h:28
NTSTATUS IniCacheLoadFromMemory(PINICACHE *Cache, PCHAR FileBuffer, ULONG FileLength, BOOLEAN String)
Definition: inicache.c:452
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3227
struct _INICACHEKEY * PINICACHEKEY
Definition: fatfs.h:173
PINICACHEKEY LastKey
Definition: inicache.h:25
struct _PINICACHEITERATOR INICACHEITERATOR
PINICACHESECTION IniCacheGetSection(PINICACHE Cache, PWCHAR Name)
Definition: inicache.c:683
PINICACHESECTION LastSection
Definition: inicache.h:35
LONG NTSTATUS
Definition: precomp.h:26
PINICACHEKEY IniCacheInsertKey(PINICACHESECTION Section, PINICACHEKEY AnchorKey, INSERTION_TYPE InsertionType, PWCHAR Name, PWCHAR Data)
Definition: inicache.c:826
static WCHAR String[]
Definition: stringtable.c:55
uint16_t * PWCHAR
Definition: typedefs.h:54
PWCHAR Data
Definition: inicache.h:13
struct _INICACHESECTION INICACHESECTION
PINICACHESECTION Section
Definition: inicache.h:41
HANDLE FileHandle
Definition: stats.c:38
INSERTION_TYPE
Definition: inicache.h:46
NTSTATUS IniCacheLoadByHandle(PINICACHE *Cache, HANDLE FileHandle, BOOLEAN String)
Definition: inicache.c:547
VOID IniCacheDestroy(PINICACHE Cache)
Definition: inicache.c:666
unsigned char BOOLEAN
NTSTATUS IniCacheGetKey(PINICACHESECTION Section, PWCHAR KeyName, PWCHAR *KeyData)
Definition: inicache.c:716
VOID IniCacheFindClose(PINICACHEITERATOR Iterator)
Definition: inicache.c:815
PINICACHEKEY Key
Definition: inicache.h:42
PINICACHESECTION FirstSection
Definition: inicache.h:34
struct _INICACHEKEY * Prev
Definition: inicache.h:16
struct _INICACHE INICACHE
struct _INICACHEKEY * Next
Definition: inicache.h:15
struct _PINICACHEITERATOR * PINICACHEITERATOR
PINICACHEITERATOR IniCacheFindFirstValue(PINICACHESECTION Section, PWCHAR *KeyName, PWCHAR *KeyData)
Definition: inicache.c:744
NTSTATUS IniCacheLoad(PINICACHE *Cache, PWCHAR FileName, BOOLEAN String)
Definition: inicache.c:621
struct _INICACHEKEY INICACHEKEY
NTSTATUS IniCacheSaveByHandle(PINICACHE Cache, HANDLE FileHandle)
Definition: inicache.c:948
struct _INICACHESECTION * PINICACHESECTION
struct _INICACHE * PINICACHE
PINICACHESECTION IniCacheAppendSection(PINICACHE Cache, PWCHAR Name)
Definition: inicache.c:1088
unsigned int ULONG
Definition: retypes.h:1
struct _INICACHESECTION * Next
Definition: inicache.h:27
BOOLEAN IniCacheFindNextValue(PINICACHEITERATOR Iterator, PWCHAR *KeyName, PWCHAR *KeyData)
Definition: inicache.c:785
NTSTATUS IniCacheSave(PINICACHE Cache, PWCHAR FileName)
Definition: inicache.c:1043