3 * Copyright (C) 2002 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/inicache.h
23 * PURPOSE: INI file parser that caches contents of INI file in memory
24 * PROGRAMMER: Royce Mitchell III
30 typedef struct _INICACHEKEY
35 struct _INICACHEKEY
*Next
;
36 struct _INICACHEKEY
*Prev
;
37 } INICACHEKEY
, *PINICACHEKEY
;
40 typedef struct _INICACHESECTION
44 PINICACHEKEY FirstKey
;
47 struct _INICACHESECTION
*Next
;
48 struct _INICACHESECTION
*Prev
;
49 } INICACHESECTION
, *PINICACHESECTION
;
52 typedef struct _INICACHE
54 PINICACHESECTION FirstSection
;
55 PINICACHESECTION LastSection
;
56 } INICACHE
, *PINICACHE
;
59 typedef struct _PINICACHEITERATOR
61 PINICACHESECTION Section
;
63 } INICACHEITERATOR
, *PINICACHEITERATOR
;
74 /* FUNCTIONS ****************************************************************/
77 IniCacheLoad(PINICACHE
*Cache
,
78 PUNICODE_STRING FileName
,
82 IniCacheDestroy(PINICACHE Cache
);
85 IniCacheGetSection(PINICACHE Cache
,
89 IniCacheGetKey(PINICACHESECTION Section
,
96 IniCacheFindFirstValue(PINICACHESECTION Section
,
101 IniCacheFindNextValue(PINICACHEITERATOR Iterator
,
106 IniCacheFindClose(PINICACHEITERATOR Iterator
);
110 IniCacheInsertKey(PINICACHESECTION Section
,
111 PINICACHEKEY AnchorKey
,
112 INSERTATION_TYPE InsertationType
,
117 IniCacheCreate(VOID
);
120 IniCacheSave(PINICACHE Cache
,
124 IniCacheAppendSection(PINICACHE Cache
,