Make attribute settings work again in edit mode
[numtypysics.git] / ZipFile.h
blob54385835bf07fc08de51c90399946b70dc2c5944
1 /*
2 * This file is part of NumptyPhysics
3 * Copyright (C) 2008 Tim Edmonds
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
16 #ifndef ZIPFILE_H
17 #define ZIPFILE_H
19 #include <string>
21 struct zip_eoc;
22 struct zip_cd;
23 struct zip_lfh;
25 class ZipFile
27 public:
28 ZipFile(const std::string& fn);
29 ~ZipFile();
30 int numEntries() { return m_entries; }
31 std::string entryName( int n );
32 unsigned char* extract( int n, int *l );
34 private:
35 int m_fd;
36 int m_dataLen;
37 unsigned char* m_data;
38 zip_eoc* m_eoc;
39 zip_cd* m_firstcd;
40 int m_entries;
41 unsigned char*m_temp;
45 #endif //ZIPFILE_H