1/*
2 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef AUTO_PACKAGE_ATTRIBUTES_H
6#define AUTO_PACKAGE_ATTRIBUTES_H
7
8
9#include <SupportDefs.h>
10
11
12class AttributeCookie;
13class Package;
14
15
16enum AutoPackageAttribute {
17	AUTO_PACKAGE_ATTRIBUTE_ENUM_FIRST,
18	AUTO_PACKAGE_ATTRIBUTE_PACKAGE = AUTO_PACKAGE_ATTRIBUTE_ENUM_FIRST,
19
20	AUTO_PACKAGE_ATTRIBUTE_ENUM_COUNT
21};
22
23
24struct AutoPackageAttributes {
25	static	bool				AttributeForName(const char* name,
26									AutoPackageAttribute& _attribute);
27	static	const char*			NameForAttribute(
28									AutoPackageAttribute attribute);
29	static	const void*			GetAttributeValue(const Package* package,
30									AutoPackageAttribute attribute,
31									off_t& _size, uint32& _type);
32
33	static	status_t			OpenCookie(Package* package, const char* name,
34									int openMode, AttributeCookie*& _cookie);
35};
36
37
38#endif	// AUTO_PACKAGE_ATTRIBUTES_H
39