1 // Copyright 2008 Brian Caine
3 // This file is part of Potpourri.
5 // Potpourri is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // Potpourri is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTIBILITY of FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Potpourri. If not, see <http://www.gnu.org/licenses/>.
20 // This is my oop wrapper around libzip
21 // this is just for reading, just so you don't get the wrong idea
34 #include "../../include/plugins/media/Archive.h"
35 #include "../../include/core/common.h"
39 const std::string temp
= "temp";
42 const int seed
= time(0);
50 class Zip
: public Archive
53 Zip(std::string data
);
54 Zip(ZipWrap
* zip_datad
);
57 void setArchiveFuncs(std::map
<std::string
, archive_function
> funcs
);
59 std::string
getFile(std::string source
);
60 std::vector
<std::string
> getListing(std::string folder
);
61 Directory
* getDirectory(std::vector
<std::string
> path
);
64 std::string
fetchData(std::string filename
);
66 std::string temp_filename
;
71 std::map
<std::string
, archive_function
> functions
;