summaryrefslogtreecommitdiffstats
path: root/private/unimodem/new/mic/ini.cpp
blob: 617471ec98019460f8ab0b3c97a4bd17328b53b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
//
//		Copyright (c) 1996 Microsoft Corporation
//
//
//		INI.CPP		-- Implemtation for Classes:
//							CIniFile
//
//		History:
//			05/22/96	JosephJ		Created
//
//
#include "common.h"
#include "ini.h"


///////////////////////////////////////////////////////////////////////////
//		CLASS CIniFile
///////////////////////////////////////////////////////////////////////////


CIniFile::CIniFile(void)
{
}


CIniFile::~CIniFile()
{
	mfn_EnterCrit();

	// Free resources
}


//--------------	Load			------------------
// Loads the specified file. (Obviously) only one file can be loaded at
// a time.
// TODO: unimplemented
BOOL CIniFile::Load	(const TCHAR rgchPathname[])
{
	BOOL fRet = FALSE;

	//mfn_EnterCrit();

	fRet = TRUE;

// end:

	if (!fRet)
	{
		//mfn_Cleanup();
	}

	//mfn_LeaveCrit();

	return fRet;
}


//--------------	Unload			------------------
// Unloads a previously loaded file. If there are open sessions to this
// object, Unload returns a handle which will be signalled when all
// sessions are closed. New sessions will not be allowed after this
// function returns. The call should free the handle.
// TODO: unimplemented
HANDLE CIniFile::Unload	(void)
{
	HANDLE hUnload = NULL;

	// mfn_EnterCrit();

	// TODO: call m_sync.BeginUnload to try to put us in unloadable state.

	// mfn_Cleanup();

	// mfn_LeaveCrit();


	return hUnload;
}


//--------------	LookupSection			------------------
// Unloads a previously loaded file. If there are open sessions to this
const CIniFileSection 	*
CIniFile::LookupSection(const TCHAR *lptcszSection)
const 
// TODO
{
	static const CIniFileSection * pIS;
	if (!pIS) pIS = new CIniFileSection;
	return pIS;
}


///////////////////////////////////////////////////////////////////////////
//		CLASS CIniFileSection
///////////////////////////////////////////////////////////////////////////


//--------------	LookupEntry			------------------
const	CIniFileEntry	*
CIniFileSection::LookupEntry(const TCHAR *lptcszEntry)
const 
// TODO
{
	static const CIniFileEntry * pIE;
	if (!pIE) pIE = new CIniFileEntry;
	return pIE;
}

//--------------	GetFirstEntry		------------------
CIniFileEntry			*
CIniFileSection::GetFirstEntry (void)
// TODO
const
{
	static CIniFileEntry * pIE;
	if (!pIE) pIE = new CIniFileEntry;
	return pIE;
}

//--------------	Release			------------------
void
CIniFileSection::Release(void)
const 
// TODO
{
}


///////////////////////////////////////////////////////////////////////////
//		CLASS CIniFileEntry
///////////////////////////////////////////////////////////////////////////


//--------------	GetRHS			------------------
const CInfSymbol	*	
CIniFileEntry::GetRHS(void)
const 
// TODO
{
	return gSymtab.Lookup("[RHS]", TRUE);
}


//--------------	Release			------------------
void
CIniFileEntry::Release(void)
const 
// TODO
{
}