mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-26 22:54:19 +01:00
a498d9def8
* adding stuff for writing a supercluster with updates information, using correct rotation * fixed a few more bugs in this class forgot about * move the "fakesign checker" stuff to a more appropriate place * add a couple small functions to TMD, ticket, shardeMap * add a new "demo" program/project nandBinCheck. it does lots of useful integrety checks on a nand.bin that will be needed when starting to actually write these things git-svn-id: http://wiiqt.googlecode.com/svn/trunk@23 389f4c8b-5dfe-645f-db0e-df882bc27289
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef SHAREDCONTENTMAP_H
|
|
#define SHAREDCONTENTMAP_H
|
|
|
|
#include "includes.h"
|
|
|
|
//class for handling a content.map from a wii nand
|
|
class SharedContentMap
|
|
{
|
|
public:
|
|
SharedContentMap( QByteArray old = QByteArray() );
|
|
|
|
//checks that the content map is sane
|
|
//size should be correct, contents should be in numerical order
|
|
//if a path is given, it will check that the hashes in the map match up with the contents in the folder
|
|
bool Check( const QString &path = QString() );
|
|
|
|
//gets a string containing the 8 letter app that matches the given hash.
|
|
//returns an empty string if the hash is not found in the map
|
|
QString GetAppFromHash( QByteArray hash );
|
|
|
|
//gets the first available u32 that is not already in the map and returns it as a string
|
|
QString GetNextEmptyCid();
|
|
|
|
//adds an entry to the end of the map
|
|
//! this function doesnt check if the entry already exists
|
|
void AddEntry( const QString &app, const QByteArray &hash );
|
|
|
|
//get the entire data ready for writing to a wii nand
|
|
const QByteArray Data(){ return data; }
|
|
|
|
const QByteArray Hash( quint16 i );
|
|
const QString Cid( quint16 i );
|
|
quint16 Count();
|
|
|
|
private:
|
|
QByteArray data;
|
|
};
|
|
|
|
#endif // SHAREDCONTENTMAP_H
|