1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * Copyright 2003 Martin Fuchs
3*c2c66affSColin Finck  *
4*c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
5*c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
6*c2c66affSColin Finck  * License as published by the Free Software Foundation; either
7*c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
8*c2c66affSColin Finck  *
9*c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
10*c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*c2c66affSColin Finck  * Lesser General Public License for more details.
13*c2c66affSColin Finck  *
14*c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
15*c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
16*c2c66affSColin Finck  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17*c2c66affSColin Finck  */
18*c2c66affSColin Finck 
19*c2c66affSColin Finck 
20*c2c66affSColin Finck  //
21*c2c66affSColin Finck  // Explorer clone
22*c2c66affSColin Finck  //
23*c2c66affSColin Finck  // unixfs.h
24*c2c66affSColin Finck  //
25*c2c66affSColin Finck  // Martin Fuchs, 23.07.2003
26*c2c66affSColin Finck  //
27*c2c66affSColin Finck 
28*c2c66affSColin Finck 
29*c2c66affSColin Finck #ifdef __WINE__
30*c2c66affSColin Finck 
31*c2c66affSColin Finck struct UnixEntry : public Entry
32*c2c66affSColin Finck {
UnixEntryUnixEntry33*c2c66affSColin Finck 	UnixEntry(Entry* parent) : Entry(parent) {}
34*c2c66affSColin Finck 
35*c2c66affSColin Finck protected:
UnixEntryUnixEntry36*c2c66affSColin Finck 	UnixEntry() : Entry(ET_UNIX) {}
37*c2c66affSColin Finck 
38*c2c66affSColin Finck 	virtual bool get_path(PTSTR path, size_t path_count) const;
39*c2c66affSColin Finck };
40*c2c66affSColin Finck 
41*c2c66affSColin Finck struct UnixDirectory : public UnixEntry, public Directory
42*c2c66affSColin Finck {
UnixDirectoryUnixDirectory43*c2c66affSColin Finck 	UnixDirectory(LPCTSTR root_path)
44*c2c66affSColin Finck 	 :	UnixEntry()
45*c2c66affSColin Finck 	{
46*c2c66affSColin Finck 		_path = _tcsdup(root_path);
47*c2c66affSColin Finck 	}
48*c2c66affSColin Finck 
UnixDirectoryUnixDirectory49*c2c66affSColin Finck 	UnixDirectory(UnixDirectory* parent, LPCTSTR path)
50*c2c66affSColin Finck 	 :	UnixEntry(parent)
51*c2c66affSColin Finck 	{
52*c2c66affSColin Finck 		_path = _tcsdup(path);
53*c2c66affSColin Finck 	}
54*c2c66affSColin Finck 
~UnixDirectoryUnixDirectory55*c2c66affSColin Finck 	~UnixDirectory()
56*c2c66affSColin Finck 	{
57*c2c66affSColin Finck 		free(_path);
58*c2c66affSColin Finck 		_path = NULL;
59*c2c66affSColin Finck 	}
60*c2c66affSColin Finck 
61*c2c66affSColin Finck 	virtual void read_directory();
62*c2c66affSColin Finck 	virtual const void* get_next_path_component(const void*);
63*c2c66affSColin Finck 	virtual Entry* find_entry(const void*);
64*c2c66affSColin Finck };
65*c2c66affSColin Finck 
66*c2c66affSColin Finck #endif
67