2011-01-21 22:18:58 +00:00
|
|
|
/*
|
2011-01-24 20:48:03 +00:00
|
|
|
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
|
2011-01-21 22:18:58 +00:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-24 20:48:03 +00:00
|
|
|
#ifndef _HAIKU__PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|
|
|
|
#define _HAIKU__PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|
2011-01-21 22:18:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include <Directory.h>
|
|
|
|
#include <Entry.h>
|
|
|
|
#include <String.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Haiku {
|
|
|
|
|
|
|
|
namespace Package {
|
|
|
|
|
2011-01-24 20:48:03 +00:00
|
|
|
namespace Private {
|
2011-01-21 22:18:58 +00:00
|
|
|
|
2011-01-24 20:48:03 +00:00
|
|
|
|
|
|
|
class TempfileManager {
|
2011-01-21 22:18:58 +00:00
|
|
|
public:
|
2011-01-24 20:48:03 +00:00
|
|
|
TempfileManager();
|
|
|
|
~TempfileManager();
|
2011-01-21 22:18:58 +00:00
|
|
|
|
|
|
|
void SetBaseDirectory(const BDirectory& baseDir);
|
|
|
|
|
|
|
|
BEntry Create(const BString& baseName = kDefaultName);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static const BString kDefaultName;
|
|
|
|
|
|
|
|
private:
|
|
|
|
BDirectory fBaseDirectory;
|
|
|
|
vint32 fNextNumber;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-01-24 20:48:03 +00:00
|
|
|
} // namespace Private
|
|
|
|
|
2011-01-21 22:18:58 +00:00
|
|
|
} // namespace Package
|
|
|
|
|
|
|
|
} // namespace Haiku
|
|
|
|
|
|
|
|
|
2011-01-24 20:48:03 +00:00
|
|
|
#endif // _HAIKU__PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|