1 /*
2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7 #include <package/hpkg/v1/PackageContentHandler.h>
8
9
10 namespace BPackageKit {
11
12 namespace BHPKG {
13
14 namespace V1 {
15
16
17 // #pragma mark - BLowLevelPackageContentHandler
18
19
20 static const char* kAttributeNames[B_HPKG_ATTRIBUTE_ID_ENUM_COUNT + 1] = {
21 "dir:entry",
22 "file:type",
23 "file:permissions",
24 "file:user",
25 "file:group",
26 "file:atime",
27 "file:mtime",
28 "file:crtime",
29 "file:atime:nanos",
30 "file:mtime:nanos",
31 "file:crtime:nanos",
32 "file:attribute",
33 "file:attribute:type",
34 "data",
35 "data:compression",
36 "data:size",
37 "data:chunk_size",
38 "symlink:path",
39 "package:name",
40 "package:summary",
41 "package:description",
42 "package:vendor",
43 "package:packager",
44 "package:flags",
45 "package:architecture",
46 "package:version.major",
47 "package:version.minor",
48 "package:version.micro",
49 "package:version.revision",
50 "package:copyright",
51 "package:license",
52 "package:provides",
53 "package:provides.type",
54 "package:requires",
55 "package:supplements",
56 "package:conflicts",
57 "package:freshens",
58 "package:replaces",
59 "package:resolvable.operator",
60 "package:checksum",
61 "package:version.prerelease",
62 "package:provides.compatible",
63 "package:url",
64 "package:source-url",
65 "package:install-path",
66 NULL
67 };
68
69
~BLowLevelPackageContentHandler()70 BLowLevelPackageContentHandler::~BLowLevelPackageContentHandler()
71 {
72 }
73
74
75 /*static*/ const char*
AttributeNameForID(uint8 id)76 BLowLevelPackageContentHandler::AttributeNameForID(uint8 id)
77 {
78 if (id >= B_HPKG_ATTRIBUTE_ID_ENUM_COUNT)
79 return NULL;
80
81 return kAttributeNames[id];
82 }
83
84
85 // #pragma mark - BPackageContentHandler
86
87
~BPackageContentHandler()88 BPackageContentHandler::~BPackageContentHandler()
89 {
90 }
91
92
93 } // namespace V1
94
95 } // namespace BHPKG
96
97 } // namespace BPackageKit
98