equal
deleted
inserted
replaced
|
1 /* $Id$ */ |
|
2 |
|
3 #ifndef TAR_TYPE_H |
|
4 #define TAR_TYPE_H |
|
5 |
|
6 /** @file tar_type.h Structs, typedefs and macros used for TAR file handling. */ |
|
7 |
|
8 #include <map> |
|
9 #include <string> |
|
10 |
|
11 /** The define of a TarList. */ |
|
12 struct TarListEntry { |
|
13 const char *filename; |
|
14 const char *dirname; |
|
15 }; |
|
16 |
|
17 struct TarFileListEntry { |
|
18 TarListEntry *tar; |
|
19 size_t size; |
|
20 size_t position; |
|
21 }; |
|
22 |
|
23 typedef std::map<std::string, TarListEntry *> TarList; |
|
24 typedef std::map<std::string, TarFileListEntry> TarFileList; |
|
25 extern TarList _tar_list; |
|
26 extern TarFileList _tar_filelist; |
|
27 |
|
28 #define FOR_ALL_TARS(tar) for (tar = _tar_filelist.begin(); tar != _tar_filelist.end(); tar++) |
|
29 |
|
30 typedef bool FioTarFileListCallback(const char *filename, int size, void *userdata); |
|
31 FILE *FioTarFileList(const char *tar, const char *mode, size_t *filesize, FioTarFileListCallback *callback, void *userdata); |
|
32 |
|
33 #endif /* TAR_TYPE_H */ |