2011-02-12 22:21:37 +03:00
|
|
|
/*
|
|
|
|
* 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_
|
|
|
|
|
|
|
|
|
2011-02-14 23:25:10 +03:00
|
|
|
#include <package/hpkg/ReaderImplBase.h>
|
2011-02-12 22:21:37 +03:00
|
|
|
|
2011-02-14 23:25:10 +03:00
|
|
|
#include <package/RepositoryInfo.h>
|
2011-02-12 22:21:37 +03:00
|
|
|
|
|
|
|
|
|
|
|
namespace BPackageKit {
|
|
|
|
|
|
|
|
namespace BHPKG {
|
|
|
|
|
|
|
|
|
2011-02-15 15:48:02 +03:00
|
|
|
class BRepositoryContentHandler;
|
|
|
|
|
|
|
|
|
2011-02-12 22:21:37 +03:00
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
|
2011-02-14 23:25:10 +03:00
|
|
|
class RepositoryReaderImpl : public ReaderImplBase {
|
|
|
|
typedef ReaderImplBase inherited;
|
2011-02-12 22:21:37 +03:00
|
|
|
public:
|
2013-05-18 06:11:01 +04:00
|
|
|
RepositoryReaderImpl(BErrorOutput* errorOutput);
|
2011-02-14 23:25:10 +03:00
|
|
|
~RepositoryReaderImpl();
|
2011-02-12 22:21:37 +03:00
|
|
|
|
|
|
|
status_t Init(const char* fileName);
|
|
|
|
status_t Init(int fd, bool keepFD);
|
2011-02-14 23:25:10 +03:00
|
|
|
|
|
|
|
status_t GetRepositoryInfo(
|
|
|
|
BRepositoryInfo* _repositoryInfo) const;
|
|
|
|
|
2011-02-12 22:21:37 +03:00
|
|
|
status_t ParseContent(
|
2011-02-15 15:48:02 +03:00
|
|
|
BRepositoryContentHandler* contentHandler);
|
2011-02-12 22:21:37 +03:00
|
|
|
|
|
|
|
private:
|
2013-07-04 21:20:14 +04:00
|
|
|
class PackagesAttributeHandler;
|
|
|
|
class PackageContentHandlerAdapter;
|
2011-02-12 22:21:37 +03:00
|
|
|
|
|
|
|
private:
|
2011-02-14 23:25:10 +03:00
|
|
|
BRepositoryInfo fRepositoryInfo;
|
2011-02-12 22:21:37 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
} // namespace BHPKG
|
|
|
|
|
|
|
|
} // namespace BPackageKit
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _PACKAGE__HPKG__PRIVATE__REPOSITORY_READER_IMPL_H_
|