Mercurial > trustbridge
diff common/binverify.h @ 586:ecfd77751daf
Disambiguate enumerator values and add portable wrapper.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 27 May 2014 16:30:58 +0000 |
parents | f4ce4eef3b38 |
children | facb13c578f1 |
line wrap: on
line diff
--- a/common/binverify.h Tue May 27 10:46:02 2014 +0000 +++ b/common/binverify.h Tue May 27 16:30:58 2014 +0000 @@ -23,13 +23,12 @@ * @brief Result of a verification */ typedef enum { - Valid = 100, /*! Could be read and signature matched */ - UnknownError = 1, /*! The expected unexpected */ - InvalidSignature = 4, /*! Signature was invalid */ - ReadFailed = 6, /*! File exists but could not read the file */ + VerifyValid = 100, /*! Could be read and signature matched */ + VerifyUnknownError = 1, /*! The expected unexpected */ + VerifyInvalidSignature = 4, /*! Signature was invalid */ + VerifyReadFailed = 6, /*! File exists but could not read the file */ } bin_verify_result; -#ifdef WIN32 /** * @brief verify a binary * @@ -48,6 +47,12 @@ * * @returns the verification result. */ +bin_verify_result verify_binary(const char *filename, size_t name_len); + +#ifdef WIN32 +/** + * @brief windows implementation of verify_binary + */ bin_verify_result verify_binary_win(const char *filename, size_t name_len); #endif /* WIN32 */