13c5dbb46SIngo Weinhold/*
23c5dbb46SIngo Weinhold * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
33c5dbb46SIngo Weinhold * Distributed under the terms of the MIT License.
43c5dbb46SIngo Weinhold */
53c5dbb46SIngo Weinhold#ifndef LOCATABLE_DIRECTORY_H
63c5dbb46SIngo Weinhold#define LOCATABLE_DIRECTORY_H
73c5dbb46SIngo Weinhold
83c5dbb46SIngo Weinhold#include "LocatableEntry.h"
93c5dbb46SIngo Weinhold
103c5dbb46SIngo Weinhold
113c5dbb46SIngo Weinholdclass LocatableDirectory : public LocatableEntry {
123c5dbb46SIngo Weinholdpublic:
133c5dbb46SIngo Weinhold								LocatableDirectory(LocatableEntryOwner* owner,
143c5dbb46SIngo Weinhold									LocatableDirectory* parent,
153c5dbb46SIngo Weinhold									const BString& path);
163c5dbb46SIngo Weinhold								~LocatableDirectory();
173c5dbb46SIngo Weinhold
183c5dbb46SIngo Weinhold	virtual	const char*			Name() const;
193c5dbb46SIngo Weinhold			const char*			Path() const;
203c5dbb46SIngo Weinhold			void				GetPath(BString& _path) const;
213c5dbb46SIngo Weinhold
223c5dbb46SIngo Weinhold			// mutable (requires locking)
233c5dbb46SIngo Weinhold	virtual	bool				GetLocatedPath(BString& _path) const;
243c5dbb46SIngo Weinhold	virtual	void				SetLocatedPath(const BString& path,
253c5dbb46SIngo Weinhold									bool implicit);
263c5dbb46SIngo Weinhold
273c5dbb46SIngo Weinhold			void				AddEntry(LocatableEntry* entry);
283c5dbb46SIngo Weinhold			void				RemoveEntry(LocatableEntry* entry);
293c5dbb46SIngo Weinhold			const LocatableEntryList& Entries() const	{ return fEntries; }
303c5dbb46SIngo Weinhold
313c5dbb46SIngo Weinholdprivate:
323c5dbb46SIngo Weinhold			BString				fPath;
333c5dbb46SIngo Weinhold			BString				fLocatedPath;
343c5dbb46SIngo Weinhold			LocatableEntryList	fEntries;
353c5dbb46SIngo Weinhold};
363c5dbb46SIngo Weinhold
373c5dbb46SIngo Weinhold
383c5dbb46SIngo Weinhold#endif	// LOCATABLE_DIRECTORY_H
39