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 #include <string> 13 #include <vector> 14 15 #include <Entry.h> 16 17 18 class BMimeType; 19 class BVolume; 20 21 using std::string; 22 using std::vector; 23 24 struct FileInfo { 25 FileInfo(); 26 ~FileInfo(); 27 28 void GetPath(std::string& path) const; 29 FileInfo* FindChild(const char* name) const; 30 BMimeType* Type() const; 31 32 bool pseudo; 33 entry_ref ref; 34 off_t size; 35 int count; 36 FileInfo* parent; 37 std::vector<FileInfo*> children; 38 }; 39 40 41 struct VolumeSnapshot { 42 VolumeSnapshot(const BVolume* volume); 43 ~VolumeSnapshot(); 44 45 std::string name; 46 off_t capacity; 47 off_t freeBytes; 48 FileInfo* rootDir; 49 FileInfo* freeSpace; 50 FileInfo* currentDir; 51 }; 52 53 #endif // SNAPSHOT_H 54 55