btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / package / hpkg / RepositoryReaderImpl.h
blob335dcab705351cd5bbde71866f6816f632681281
1 /*
2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_
6 #define _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_
9 #include <package/hpkg/ReaderImplBase.h>
11 #include <package/RepositoryInfo.h>
14 namespace BPackageKit {
16 namespace BHPKG {
19 class BRepositoryContentHandler;
22 namespace BPrivate {
25 class RepositoryReaderImpl : public ReaderImplBase {
26 typedef ReaderImplBase inherited;
27 public:
28 RepositoryReaderImpl(BErrorOutput* errorOutput);
29 ~RepositoryReaderImpl();
31 status_t Init(const char* fileName);
32 status_t Init(int fd, bool keepFD);
33 status_t Init(BPositionIO* file, bool keepFile);
35 status_t GetRepositoryInfo(
36 BRepositoryInfo* _repositoryInfo) const;
38 status_t ParseContent(
39 BRepositoryContentHandler* contentHandler);
41 private:
42 class PackagesAttributeHandler;
43 class PackageContentHandlerAdapter;
45 private:
46 BRepositoryInfo fRepositoryInfo;
50 } // namespace BPrivate
52 } // namespace BHPKG
54 } // namespace BPackageKit
57 #endif // _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_