CSndHandler.h 746 B

12345678910111213141516171819202122232425262728
  1. #ifndef CSNDHANDLER_H
  2. #define CSNDHANDLER_H
  3. #include <vector>
  4. #include <fstream>
  5. class CSndHandler
  6. {
  7. protected:
  8. const int CHUNK;
  9. struct Entry
  10. {
  11. std::string name;
  12. int size, offset;
  13. };
  14. std::ifstream file;
  15. int readNormalNr (int pos, int bytCon);
  16. bool opened;
  17. public:
  18. std::vector<Entry> entries;
  19. ~CSndHandler();
  20. CSndHandler(std::string fname);
  21. void extract(std::string srcfile, std::string dstfile, bool caseSens=true); //saves selected file
  22. unsigned char * extract (std::string srcfile, int & size); //return selecte file
  23. void extract(int index, std::string dstfile); //saves selected file
  24. unsigned char * extract (int index, int & size); //return selecte file - NIE TESTOWANE
  25. };
  26. #endif //CSNDHANDLER_H