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
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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
28 #ifndef __INICACHE_H__
29 #define __INICACHE_H__
32 typedef struct _INICACHEKEY
37 struct _INICACHEKEY
*Next
;
38 struct _INICACHEKEY
*Prev
;
39 } INICACHEKEY
, *PINICACHEKEY
;
42 typedef struct _INICACHESECTION
46 PINICACHEKEY FirstKey
;
49 struct _INICACHESECTION
*Next
;
50 struct _INICACHESECTION
*Prev
;
51 } INICACHESECTION
, *PINICACHESECTION
;
54 typedef struct _INICACHE
56 PINICACHESECTION FirstSection
;
57 PINICACHESECTION LastSection
;
58 } INICACHE
, *PINICACHE
;
61 typedef struct _PINICACHEITERATOR
63 PINICACHESECTION Section
;
65 } INICACHEITERATOR
, *PINICACHEITERATOR
;
76 /* FUNCTIONS ****************************************************************/
79 IniCacheLoad(PINICACHE
*Cache
,
80 PUNICODE_STRING FileName
,
84 IniCacheDestroy(PINICACHE Cache
);
87 IniCacheGetSection(PINICACHE Cache
,
91 IniCacheGetKey(PINICACHESECTION Section
,
98 IniCacheFindFirstValue(PINICACHESECTION Section
,
103 IniCacheFindNextValue(PINICACHEITERATOR Iterator
,
108 IniCacheFindClose(PINICACHEITERATOR Iterator
);
112 IniCacheInsertKey(PINICACHESECTION Section
,
113 PINICACHEKEY AnchorKey
,
114 INSERTATION_TYPE InsertationType
,
119 IniCacheCreate(VOID
);
122 IniCacheSave(PINICACHE Cache
,
126 IniCacheAppendSection(PINICACHE Cache
,
130 #endif /* __INICACHE_H__ */