1694cb0b2SIngo Weinhold/*
2694cb0b2SIngo Weinhold * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3694cb0b2SIngo Weinhold * Distributed under the terms of the MIT License.
4694cb0b2SIngo Weinhold */
5694cb0b2SIngo Weinhold#ifndef PACKAGE_LEAF_NODE_H
6694cb0b2SIngo Weinhold#define PACKAGE_LEAF_NODE_H
7694cb0b2SIngo Weinhold
8694cb0b2SIngo Weinhold
9694cb0b2SIngo Weinhold#include "PackageNode.h"
10694cb0b2SIngo Weinhold
11ef58ee84SIngo Weinhold#include <io_requests.h>
12ef58ee84SIngo Weinhold
13694cb0b2SIngo Weinhold
14694cb0b2SIngo Weinholdclass PackageLeafNode : public PackageNode {
15694cb0b2SIngo Weinholdpublic:
16744a460cSIngo Weinhold								PackageLeafNode(Package* package, mode_t mode);
17694cb0b2SIngo Weinhold	virtual						~PackageLeafNode();
18694cb0b2SIngo Weinhold
19d07c930cSIngo Weinhold	virtual	String				SymlinkPath() const;
20694cb0b2SIngo Weinhold
21744a460cSIngo Weinhold	virtual	status_t			Read(off_t offset, void* buffer,
22744a460cSIngo Weinhold									size_t* bufferSize);
23ef58ee84SIngo Weinhold	virtual	status_t			Read(io_request* request);
24744a460cSIngo Weinhold
25694cb0b2SIngo Weinholdpublic:
26694cb0b2SIngo Weinhold			SinglyLinkedListLink<PackageLeafNode> fListLink;
27694cb0b2SIngo Weinhold};
28694cb0b2SIngo Weinhold
29694cb0b2SIngo Weinhold
30694cb0b2SIngo Weinholdtypedef SinglyLinkedList<PackageLeafNode,
31694cb0b2SIngo Weinhold	SinglyLinkedListMemberGetLink<PackageLeafNode,
32694cb0b2SIngo Weinhold		&PackageLeafNode::fListLink> > PackageLeafNodeList;
33694cb0b2SIngo Weinhold
34694cb0b2SIngo Weinhold
35694cb0b2SIngo Weinhold#endif	// PACKAGE_LEAF_NODE_H
36