in source/jobs.c [749:783]
JobsStatus_t Jobs_Describe( char * buffer,
size_t length,
const char * thingName,
uint16_t thingNameLength,
const char * jobId,
uint16_t jobIdLength,
size_t * outLength )
{
JobsStatus_t ret = JobsBadParameter;
size_t start = 0U;
if( checkCommonParams() &&
( ( isNextJobId( jobId, jobIdLength ) == true ) ||
( isValidJobId( jobId, jobIdLength ) == true ) ) )
{
writePreamble( buffer, &start, length, thingName, thingNameLength );
( void ) strnAppend( buffer, &start, length,
jobId, jobIdLength );
( void ) strnAppend( buffer, &start, length,
"/", ( CONST_STRLEN( "/" ) ) );
ret = strnAppend( buffer, &start, length,
JOBS_API_DESCRIBE, JOBS_API_DESCRIBE_LENGTH );
start = ( start >= length ) ? ( length - 1U ) : start;
buffer[ start ] = '\0';
if( outLength != NULL )
{
*outLength = start;
}
}
return ret;
}