BPicture: Fix archive constructor.
[haiku.git] / src / kits / package / hpkg / RepositoryReader.cpp
blob02a964e7b45d4865cb60a0eeadeee001fe5ee2dd
1 /*
2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
3 * Distributed under the terms of the MIT License.
4 */
7 #include <package/hpkg/RepositoryReader.h>
9 #include <new>
11 #include <package/hpkg/ErrorOutput.h>
12 #include <package/hpkg/RepositoryContentHandler.h>
13 #include <package/hpkg/RepositoryReaderImpl.h>
16 namespace BPackageKit {
18 namespace BHPKG {
21 BRepositoryReader::BRepositoryReader(BErrorOutput* errorOutput)
23 fImpl(new (std::nothrow) RepositoryReaderImpl(errorOutput))
28 BRepositoryReader::~BRepositoryReader()
30 delete fImpl;
34 status_t
35 BRepositoryReader::Init(const char* fileName)
37 if (fImpl == NULL)
38 return B_NO_INIT;
40 return fImpl->Init(fileName);
44 status_t
45 BRepositoryReader::ParseContent(BRepositoryContentHandler* contentHandler)
47 if (fImpl == NULL)
48 return B_NO_INIT;
50 return fImpl->ParseContent(contentHandler);
54 } // namespace BHPKG
56 } // namespace BPackageKit