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