misc/quazip/quaadler32.h
author sheepluva
Tue, 04 Sep 2012 13:18:26 +0200
changeset 7669 a85e1c167b69
parent 5752 ea95ee97c805
permissions -rw-r--r--
I didn't want to do this since it seems less clean, but... moving the stats-fix into CheckForWin, since that function is the one sending the damage stats (whyyyy?) therefore it's not sufficient to update stats after calling it, some of the stats won't be transfered to frontend then
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5752
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     1
#ifndef QUAADLER32_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     2
#define QUAADLER32_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     3
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     4
#include <QByteArray>
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     5
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     6
#include "quachecksum32.h"
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     7
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     8
/// Adler32 checksum
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     9
/** \class QuaAdler32 quaadler32.h <quazip/quaadler32.h>
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    10
 * This class wrappers the adler32 function with the QuaChecksum32 interface.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    11
 * See QuaChecksum32 for more info.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    12
 */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    13
class QuaAdler32 : public QuaChecksum32
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    14
{
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    15
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    16
public:
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    17
	QuaAdler32();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    18
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    19
	quint32 calculate(const QByteArray &data);
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    20
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    21
	void reset();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    22
	void update(const QByteArray &buf);
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    23
	quint32 value();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    24
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    25
private:
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    26
	quint32 checksum;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    27
};
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    28
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    29
#endif //QUAADLER32_H