Athena IO Library
WiiSaveWriter.hpp
1 #ifndef WIISAVEWRITER_HPP
2 #define WIISAVEWRITER_HPP
3 
4 #include "athena/MemoryWriter.hpp"
5 
6 namespace athena
7 {
8 class WiiSave;
9 class WiiBanner;
10 class WiiFile;
11 class WiiImage;
12 
13 namespace io
14 {
15 
24 {
25  MEMORYCOPYWRITER_BASE();
26 public:
31  WiiSaveWriter(const std::string&);
32 
44  bool writeSave(WiiSave* save, atUint8* macAddress, atUint32 ngId, atUint8* ngPriv, atUint8* ngSig, atUint32 ngKeyId, const std::string& filepath = "");
45 
46 private:
47  void writeBanner(WiiBanner* banner);
48  atUint32 writeFile(WiiFile* file);
49  void writeImage(WiiImage* image);
50  void writeCerts(atUint32 filesSize, atUint32 ngId, atUint8* ngPriv, atUint8* ngSig, atUint32 ngKeyId);
51 };
52 
53 } // io
54 } // zelda
55 #endif // WIISAVEWRITER_HPP
The WiiImage class.
Definition: WiiImage.hpp:13
std::string filepath() const
Returns the target file.
bool writeSave(WiiSave *save, atUint8 *macAddress, atUint32 ngId, atUint8 *ngPriv, atUint8 *ngSig, atUint32 ngKeyId, const std::string &filepath="")
writeSave
Wii file container class.
Definition: WiiFile.hpp:20
Wii banner container class.
Definition: WiiBanner.hpp:16
Wii data.bin container class.
Definition: WiiSave.hpp:22
Wii data.bin writer class.
WiiSaveWriter(const std::string &)
This constructor creates an instance from a file on disk.
void save(const std::string &filename="")
Saves the file to the specified file.