2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
3 * Distributed under the terms of the MIT License.
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
{
19 class BRepositoryContentHandler
;
25 class RepositoryReaderImpl
: public ReaderImplBase
{
26 typedef ReaderImplBase inherited
;
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
);
42 class PackagesAttributeHandler
;
43 class PackageContentHandlerAdapter
;
46 BRepositoryInfo fRepositoryInfo
;
50 } // namespace BPrivate
54 } // namespace BPackageKit
57 #endif // _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_