vfs: check userland buffers before reading them.
[haiku.git] / headers / os / package / PackageInfoContentHandler.h
blobb186a0f94a9badf38e6e3da16bdc39d51b27cdec
1 /*
2 * Copyright 2011, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _PACKAGE__PACKAGE_INFO_CONTENT_HANDLER_H_
6 #define _PACKAGE__PACKAGE_INFO_CONTENT_HANDLER_H_
9 #include <package/hpkg/PackageContentHandler.h>
12 namespace BPackageKit {
15 class BPackageInfo;
18 namespace BHPKG {
19 class BErrorOutput;
23 class BPackageInfoContentHandler : public BHPKG::BPackageContentHandler {
24 public:
25 BPackageInfoContentHandler(
26 BPackageInfo& packageInfo,
27 BHPKG::BErrorOutput* errorOutput = NULL);
28 virtual ~BPackageInfoContentHandler();
30 virtual status_t HandleEntry(BHPKG::BPackageEntry* entry);
31 virtual status_t HandleEntryAttribute(
32 BHPKG::BPackageEntry* entry,
33 BHPKG::BPackageEntryAttribute* attribute);
34 virtual status_t HandleEntryDone(BHPKG::BPackageEntry* entry);
36 virtual status_t HandlePackageAttribute(
37 const BHPKG::BPackageInfoAttributeValue&
38 value);
40 virtual void HandleErrorOccurred();
42 protected:
43 BPackageInfo& fPackageInfo;
44 BHPKG::BErrorOutput* fErrorOutput;
48 } // namespace BPackageKit
51 #endif // _PACKAGE__PACKAGE_INFO_CONTENT_HANDLER_H_