Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / os / package / hpkg / PackageReader.h
blobdec10d1e031e2b87ce1c8bafee140ec92b8450a6
1 /*
2 * Copyright 2009,2011, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _PACKAGE__HPKG__PACKAGE_READER_H_
6 #define _PACKAGE__HPKG__PACKAGE_READER_H_
9 #include <SupportDefs.h>
12 class BPositionIO;
15 namespace BPackageKit {
17 namespace BHPKG {
20 namespace BPrivate {
21 class PackageReaderImpl;
23 using BPrivate::PackageReaderImpl;
26 class BAbstractBufferedDataReader;
27 class BErrorOutput;
28 class BLowLevelPackageContentHandler;
29 class BPackageContentHandler;
30 class BPackageWriter;
33 class BPackageReader {
34 public:
35 BPackageReader(BErrorOutput* errorOutput);
36 ~BPackageReader();
38 status_t Init(const char* fileName, uint32 flags = 0);
39 status_t Init(int fd, bool keepFD, uint32 flags = 0);
40 status_t Init(BPositionIO* file, bool keepFile,
41 uint32 flags = 0);
42 status_t ParseContent(
43 BPackageContentHandler* contentHandler);
44 status_t ParseContent(BLowLevelPackageContentHandler*
45 contentHandler);
47 BPositionIO* PackageFile() const;
49 BAbstractBufferedDataReader* HeapReader() const;
50 // Only valid as long as the reader lives.
52 private:
53 friend class BPackageWriter;
55 private:
56 PackageReaderImpl* fImpl;
60 } // namespace BHPKG
62 } // namespace BPackageKit
65 #endif // _PACKAGE__HPKG__PACKAGE_READER_H_