-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#pragma once | ||
|
||
#include <interface.h> | ||
#include <stdint.h> | ||
|
||
enum class UtilAssetsIntegrityCheckReason | ||
{ | ||
OK = 0, | ||
Unknown, | ||
InvalidFormat, | ||
SizeTooLarge, | ||
SizeTooSmall, | ||
BogusHeader, | ||
VersionMismatch, | ||
OutOfBound, | ||
}; | ||
|
||
class UtilAssetsIntegrityCheckResult | ||
{ | ||
public: | ||
UtilAssetsIntegrityCheckResult() | ||
{ | ||
ReasonStr[0] = 0; | ||
} | ||
public: | ||
char ReasonStr[256]; | ||
}; | ||
|
||
class UtilAssetsIntegrityCheckResult_StudioModel : public UtilAssetsIntegrityCheckResult | ||
{ | ||
public: | ||
|
||
}; | ||
|
||
class UtilAssetsIntegrityCheckResult_BMP : public UtilAssetsIntegrityCheckResult | ||
{ | ||
public: | ||
UtilAssetsIntegrityCheckResult_BMP() : UtilAssetsIntegrityCheckResult() | ||
{ | ||
MaxWidth = 0; | ||
MaxHeight = 0; | ||
MaxSize = 0; | ||
} | ||
public: | ||
|
||
|
||
size_t MaxWidth; | ||
size_t MaxHeight; | ||
size_t MaxSize; | ||
}; | ||
|
||
class IUtilAssetsIntegrity : public IBaseInterface | ||
{ | ||
public: | ||
virtual UtilAssetsIntegrityCheckReason CheckStudioModel(const void *buf, size_t bufSize, UtilAssetsIntegrityCheckResult_StudioModel *checkResult) = 0; | ||
virtual UtilAssetsIntegrityCheckReason Check8bitBMP(const void* buf, size_t bufSize, UtilAssetsIntegrityCheckResult_BMP* checkResult) = 0; | ||
}; | ||
|
||
IUtilAssetsIntegrity* UtilAssetsIntegrity(); | ||
|
||
#define UTIL_ASSETS_INTEGRITY_INTERFACE_VERSION "UtilAssetsIntegrityAPI_001" |