ReactOS 0.4.15-dev-8096-ga0eec98
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
10typedef struct _INI_KEYWORD
11{
16
17typedef struct _INI_SECTION
18{
23
24typedef struct _INICACHE
25{
28
29typedef struct _PINICACHEITERATOR
30{
34
35typedef enum
36{
42
43/* FUNCTIONS ****************************************************************/
44
48 PCHAR FileBuffer,
51
57
63
64VOID
67
72
75 _In_ PINI_SECTION Section,
77 _Out_ PCWSTR* KeyData);
78
81 _In_ PINI_SECTION Section,
83 _Out_ PCWSTR* KeyData);
84
89 _Out_ PCWSTR* KeyData);
90
91VOID
94
99
100VOID
102 _In_ PINI_SECTION Section);
103
106 _In_ PINI_SECTION Section,
107 _In_ PINI_KEYWORD AnchorKey,
108 _In_ INSERTION_TYPE InsertionType,
111
114 _In_ PINI_SECTION Section,
117
118VOID
120 _In_ PINI_SECTION Section,
122
123VOID
125 _In_ PINI_SECTION Section,
127
130
135
140
141/* EOF */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
VOID IniCacheDestroy(_In_ PINICACHE Cache)
Definition: inicache.c:699
NTSTATUS IniCacheLoad(PINICACHE *Cache, PWCHAR FileName, BOOLEAN String)
Definition: inicache.c:655
NTSTATUS IniCacheLoadFromMemory(PINICACHE *Cache, PCHAR FileBuffer, ULONG FileLength, BOOLEAN String)
Definition: inicache.c:487
VOID IniRemoveSection(_In_ PINI_SECTION Section)
Definition: inicache.c:851
VOID IniRemoveKeyByName(_In_ PINI_SECTION Section, _In_ PCWSTR KeyName)
Definition: inicache.c:892
PINI_SECTION IniAddSection(_In_ PINICACHE Cache, _In_ PCWSTR Name)
Definition: inicache.c:838
NTSTATUS IniCacheSaveByHandle(PINICACHE Cache, HANDLE FileHandle)
Definition: inicache.c:938
VOID IniRemoveKey(_In_ PINI_SECTION Section, _In_ PINI_KEYWORD Key)
Definition: inicache.c:905
PINICACHEITERATOR IniFindFirstValue(_In_ PINI_SECTION Section, _Out_ PCWSTR *KeyName, _Out_ PCWSTR *KeyData)
Definition: inicache.c:756
PINI_SECTION IniGetSection(_In_ PINICACHE Cache, _In_ PCWSTR Name)
Definition: inicache.c:717
struct _PINICACHEITERATOR * PINICACHEITERATOR
PINI_KEYWORD IniGetKey(_In_ PINI_SECTION Section, _In_ PCWSTR KeyName, _Out_ PCWSTR *KeyData)
Definition: inicache.c:730
INSERTION_TYPE
Definition: inicache.h:36
@ INSERT_BEFORE
Definition: inicache.h:38
@ INSERT_AFTER
Definition: inicache.h:39
@ INSERT_LAST
Definition: inicache.h:40
@ INSERT_FIRST
Definition: inicache.h:37
struct _INICACHE INICACHE
struct _INI_SECTION * PINI_SECTION
NTSTATUS IniCacheSave(PINICACHE Cache, PWCHAR FileName)
Definition: inicache.c:1038
struct _INI_KEYWORD * PINI_KEYWORD
struct _INICACHE * PINICACHE
PINICACHE IniCacheCreate(VOID)
Definition: inicache.c:919
VOID IniFindClose(_In_ PINICACHEITERATOR Iterator)
Definition: inicache.c:828
NTSTATUS IniCacheLoadByHandle(PINICACHE *Cache, HANDLE FileHandle, BOOLEAN String)
Definition: inicache.c:581
BOOLEAN IniFindNextValue(_In_ PINICACHEITERATOR Iterator, _Out_ PCWSTR *KeyName, _Out_ PCWSTR *KeyData)
Definition: inicache.c:797
struct _PINICACHEITERATOR INICACHEITERATOR
struct _INI_KEYWORD INI_KEYWORD
PINI_KEYWORD IniAddKey(_In_ PINI_SECTION Section, _In_ PCWSTR Name, _In_ PCWSTR Data)
Definition: inicache.c:883
PINI_KEYWORD IniInsertKey(_In_ PINI_SECTION Section, _In_ PINI_KEYWORD AnchorKey, _In_ INSERTION_TYPE InsertionType, _In_ PCWSTR Name, _In_ PCWSTR Data)
Definition: inicache.c:863
struct _INI_SECTION INI_SECTION
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3228
Definition: fatfs.h:173
LIST_ENTRY SectionList
Definition: inicache.h:26
PWSTR Name
Definition: inicache.h:12
LIST_ENTRY ListEntry
Definition: inicache.h:14
PWSTR Data
Definition: inicache.h:13
PWSTR Name
Definition: inicache.h:19
LIST_ENTRY ListEntry
Definition: inicache.h:21
LIST_ENTRY KeyList
Definition: inicache.h:20
Definition: typedefs.h:120
PINI_KEYWORD Key
Definition: inicache.h:32
PINI_SECTION Section
Definition: inicache.h:31
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR Iterator
Definition: wdfchildlist.h:656
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433