mirror of
https://review.haiku-os.org/haiku
synced 2025-01-23 23:04:48 +01:00
0d6b3b20e1
* added class BPackageInfo, which contains packaging attributes of a package (the values relevant for package management) * implemented parser (mostly) for reading a BPackageInfo from a config file (.PackageInfo) in order to pass them on to the PackageWriter when creating a package * pulled hpkg-related stuff from bin/package into the package kit * adjusted packagefs-Volume to skip .PackageInfo files when populating the mountpoint, as those files shouldn't appear as part of an activated package git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40301 a95241bf-73f2-0310-859d-f6bbb57e9c96
50 lines
816 B
C++
50 lines
816 B
C++
/*
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef DATA_OUTPUT_H
|
|
#define DATA_OUTPUT_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
namespace BPackageKit {
|
|
|
|
namespace BHaikuPackage {
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
class DataOutput {
|
|
public:
|
|
virtual ~DataOutput();
|
|
|
|
virtual status_t WriteData(const void* buffer, size_t size) = 0;
|
|
};
|
|
|
|
|
|
class BufferDataOutput : public DataOutput {
|
|
public:
|
|
BufferDataOutput(void* buffer, size_t size);
|
|
|
|
size_t BytesWritten() const { return fBytesWritten; }
|
|
|
|
virtual status_t WriteData(const void* buffer, size_t size);
|
|
|
|
private:
|
|
void* fBuffer;
|
|
size_t fSize;
|
|
size_t fBytesWritten;
|
|
};
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
} // namespace BHaikuPackage
|
|
|
|
} // namespace BPackageKit
|
|
|
|
|
|
#endif // DATA_OUTPUT_H
|