xref: /haiku/src/tests/apps/installer/CopyEngine.h (revision 2c09e0dc7f7c8401c3ee131f65147b2ddb4b8279)
1 /*
2  * Copyright 2005, Jérôme DUVAL. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #ifndef _CopyEngine_h
7 #define _CopyEngine_h
8 
9 #include <Directory.h>
10 #include <Looper.h>
11 #include <Menu.h>
12 #include <Messenger.h>
13 #include <Path.h>
14 
15 class InstallerWindow;
16 
17 const uint32 ENGINE_START = 'eSRT';
18 
19 class CopyEngine : public BLooper {
20 public:
21 	CopyEngine(InstallerWindow *window);
22 	void MessageReceived(BMessage *msg);
23 	void SetStatusMessage(char *status);
24 	void Start(BMenu *srcMenu, BMenu *targetMenu);
25 	void ScanDisksPartitions(BMenu *srcMenu, BMenu *targetMenu);
26 	void SetPackagesList(BList *list);
SetSpaceRequired(off_t bytes)27 	void SetSpaceRequired(off_t bytes) { fSpaceRequired = bytes; };
28 private:
29 	void CopyFolder(BDirectory &srcDir, BDirectory &targetDir);
30 
31 	InstallerWindow *fWindow;
32 	BList *fPackages;
33 	off_t fSpaceRequired;
34 };
35 
36 #endif /* _CopyEngine_h */
37