1/*
2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3 * Distributed under the terms of the MIT/X11 license.
4 *
5 * Copyright (c) 1999 Mike Steed. You are free to use and distribute this software
6 * as long as it is accompanied by it's documentation and this copyright notice.
7 * The software comes with no warranty, etc.
8 */
9#ifndef SNAPSHOT_H
10#define SNAPSHOT_H
11
12
13#include <string>
14#include <vector>
15
16#include <Entry.h>
17
18
19class BMimeType;
20class BVolume;
21
22using std::string;
23using std::vector;
24
25
26struct FileInfo {
27								FileInfo();
28								~FileInfo();
29
30			void				GetPath(std::string& path) const;
31			FileInfo*			FindChild(const char* name) const;
32			BMimeType*			Type() const;
33
34			bool				pseudo;
35			entry_ref			ref;
36			off_t				size;
37			int					count;
38			FileInfo*			parent;
39			std::vector<FileInfo*>	children;
40
41			int					color;
42};
43
44
45struct VolumeSnapshot {
46								VolumeSnapshot(const BVolume* volume);
47								~VolumeSnapshot();
48
49			std::string			name;
50			off_t				capacity;
51			off_t				freeBytes;
52			FileInfo*			rootDir;
53			FileInfo*			freeSpace;
54			FileInfo*			currentDir;
55};
56
57#endif // SNAPSHOT_H
58