haiku/headers/private/package/hpkg/RepositoryReaderImpl.h
Ingo Weinhold e527b79631 Switch package file accessor classes to use BPositionIO
* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
  their implementation and super classes do now internally use a
  BPositionIO instead of a FD to access the package file. This provides
  more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
  BPositionIO* parameter.
2014-07-12 15:40:22 +02:00

58 lines
1.2 KiB
C++

/*
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_
#define _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_
#include <package/hpkg/ReaderImplBase.h>
#include <package/RepositoryInfo.h>
namespace BPackageKit {
namespace BHPKG {
class BRepositoryContentHandler;
namespace BPrivate {
class RepositoryReaderImpl : public ReaderImplBase {
typedef ReaderImplBase inherited;
public:
RepositoryReaderImpl(BErrorOutput* errorOutput);
~RepositoryReaderImpl();
status_t Init(const char* fileName);
status_t Init(int fd, bool keepFD);
status_t Init(BPositionIO* file, bool keepFile);
status_t GetRepositoryInfo(
BRepositoryInfo* _repositoryInfo) const;
status_t ParseContent(
BRepositoryContentHandler* contentHandler);
private:
class PackagesAttributeHandler;
class PackageContentHandlerAdapter;
private:
BRepositoryInfo fRepositoryInfo;
};
} // namespace BPrivate
} // namespace BHPKG
} // namespace BPackageKit
#endif // _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_