EntryOperationEngineBase.h revision 9680cf0b
1/*
2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Ingo Weinhold <ingo_weinhold@gmx.de>
7 */
8#ifndef _ENTRY_OPERATION_ENGINE_BASE_H
9#define _ENTRY_OPERATION_ENGINE_BASE_H
10
11
12#include <String.h>
13
14
15class BDirectory;
16class BEntry;
17class BPath;
18
19struct entry_ref;
20struct node_ref;
21
22
23namespace BPrivate {
24
25
26class BEntryOperationEngineBase {
27public:
28			class Entry;
29};
30
31
32class BEntryOperationEngineBase::Entry {
33public:
34								Entry(const char* path);
35								Entry(const BDirectory& directory,
36									const char* path = NULL);
37								Entry(const BEntry& entry);
38								Entry(const entry_ref& entryRef);
39								Entry(const node_ref& directoryRef,
40									const char* path = NULL);
41								~Entry();
42
43			status_t			GetPath(BPath& buffer, const char*& _path)
44									const;
45			BString				Path() const;
46
47private:
48			const BDirectory*	fDirectory;
49			const char*			fPath;
50			const BEntry*		fEntry;
51			const entry_ref*	fEntryRef;
52			const node_ref*		fDirectoryRef;
53};
54
55
56} // namespace BPrivate
57
58
59#endif	// _ENTRY_OPERATION_ENGINE_BASE_H
60