Go to the source code of this file.
Functions | |
int32 | sbgVersionCompare (const SbgVersion *pVersionA, const SbgVersion *pVersionB, SbgVersionCmpThresold thresold) |
void | sbgVersionDecode (uint32 encodedVersion, SbgVersion *pVersionInfo) |
uint32 | sbgVersionEncode (const SbgVersion *pVersionInfo) |
SbgErrorCode | sbgVersionFromString (const char *pVersionStr, SbgVersion *pVersionInfo) |
SbgErrorCode | sbgVersionFromStringEncoded (const char *pVersionStr, uint32 *pVersion) |
SbgErrorCode | sbgVersionToString (const SbgVersion *pVersionInfo, char *pBuffer, uint32 sizeOfBuffer) |
SbgErrorCode | sbgVersionToStringEncoded (uint32 version, char *pBuffer, uint32 sizeOfBuffer) |
int32 sbgVersionCompare | ( | const SbgVersion * | pVersionA, |
const SbgVersion * | pVersionB, | ||
SbgVersionCmpThresold | thresold | ||
) |
Compare two version information structures and return if the version A is greater, less or equal than the version B. The computation is roughly result = version A - version B We can define how far we will check if the version A is greater than the version B. For example, we can only check the major or major and minor fields.
[in] | pVersionA | The first version to compare. |
[in] | pVersionB | The second version to compare. |
[in] | thresold | The comparaison thresold to know if we are checking the major, minor, revision, build, ... |
Definition at line 124 of file sbgVersion.c.
void sbgVersionDecode | ( | uint32 | encodedVersion, |
SbgVersion * | pVersionInfo | ||
) |
Fill a SbgVersion structure based on an uint32 that stores the 'compiled' version information.
[in] | encodedVersion | The version information stored within a uint32. |
[out] | pVersionInfo | Pointer on an allocated SbgVersion structure to fill. |
Definition at line 13 of file sbgVersion.c.
uint32 sbgVersionEncode | ( | const SbgVersion * | pVersionInfo | ) |
Construct a uint32 containing a version information based on a SbgVersion structure.
[in] | pVersionInfo | Pointer on a read only version structure to encode. |
Definition at line 70 of file sbgVersion.c.
SbgErrorCode sbgVersionFromString | ( | const char * | pVersionStr, |
SbgVersion * | pVersionInfo | ||
) |
Convert a human readable string to a version structure.
[in] | pVersionStr | The string containing the version to convert. |
[out] | pVersionInfo | Pointer to a version structure to store the parsed version info. |
Definition at line 351 of file sbgVersion.c.
SbgErrorCode sbgVersionFromStringEncoded | ( | const char * | pVersionStr, |
uint32 * | pVersion | ||
) |
Convert an encoded version number to a human readable string.
[in] | pVersionStr | The string containing the version to convert. |
[out] | pVersion | Returned encoded version value parsed from the string. |
Definition at line 472 of file sbgVersion.c.
SbgErrorCode sbgVersionToString | ( | const SbgVersion * | pVersionInfo, |
char * | pBuffer, | ||
uint32 | sizeOfBuffer | ||
) |
Convert a version information to a human readable string.
[in] | pVersionInfo | Pointer on a read only version structure to convert to a human readable string. |
[out] | pBuffer | Buffer to store the version as a human readable null terminated string. |
[in] | sizeOfBuffer | Maximum buffer size including the null terminated char. |
Definition at line 229 of file sbgVersion.c.
SbgErrorCode sbgVersionToStringEncoded | ( | uint32 | version, |
char * | pBuffer, | ||
uint32 | sizeOfBuffer | ||
) |
Convert an encoded version number to a human readable string.
[in] | version | Encoded version value to to convert to a human readable string. |
[out] | pBuffer | Buffer to store the version as a human readable null terminated string. |
[in] | sizeOfBuffer | Maximum buffer size including the null terminated char. |
Definition at line 326 of file sbgVersion.c.