1 /* 2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de> 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_ 6 #define _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_ 7 8 9 #include <Directory.h> 10 #include <Entry.h> 11 #include <String.h> 12 #include <SupportDefs.h> 13 14 15 namespace BPackageKit { 16 17 namespace BPrivate { 18 19 20 class TempfileManager { 21 public: 22 TempfileManager(); 23 ~TempfileManager(); 24 25 void SetBaseDirectory(const BDirectory& baseDir); 26 27 BEntry Create(const BString& baseName = kDefaultName); 28 29 private: 30 static const BString kDefaultName; 31 32 private: 33 BDirectory fBaseDirectory; 34 vint32 fNextNumber; 35 }; 36 37 38 } // namespace BPrivate 39 40 } // namespace BPackageKit 41 42 43 #endif // _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_ 44