2011-01-22 01:18:58 +03:00
|
|
|
/*
|
2011-01-24 23:48:03 +03:00
|
|
|
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
|
2011-01-22 01:18:58 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-25 20:07:27 +03:00
|
|
|
#ifndef _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|
|
|
|
#define _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
|
|
|
#include <Directory.h>
|
|
|
|
#include <Entry.h>
|
|
|
|
#include <String.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPackageKit {
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPrivate {
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
class TempfileManager {
|
2011-01-22 01:18:58 +03:00
|
|
|
public:
|
2011-01-24 23:48:03 +03:00
|
|
|
TempfileManager();
|
|
|
|
~TempfileManager();
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
void SetBaseDirectory(const BDirectory& baseDir);
|
|
|
|
|
|
|
|
BEntry Create(const BString& baseName = kDefaultName);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static const BString kDefaultName;
|
|
|
|
|
|
|
|
private:
|
|
|
|
BDirectory fBaseDirectory;
|
2013-11-06 01:32:59 +04:00
|
|
|
int32 fNextNumber;
|
2011-01-22 01:18:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
} // namespace BPrivate
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
} // namespace BPackageKit
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
#endif // _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
|