C++ source code

This is a listing of the sample source file ClientComplianceMain.cpp that demonstrates the correct use of the Client API.

// COMPLIANCE Function definitions
// **************************************************

CLIENTCOMPLIANCEDLL_API int COMPLIANCE_Open( 	
	const char *siteurl,
	const char *complianceDocument,
	unsigned int flag // COMPLIANCE_FLAG_*
);
// return value < 0 is COMPLIANCE_ERROR_*
// return value == 0 if Open successfully talks to client
// Make sure to call COMPLIANCE_Close if this succeeds


// **************************************************
CLIENTCOMPLIANCEDLL_API int COMPLIANCE_Close();
// return value < 0 is COMPLIANCE_ERROR_*
// return value = 0 is success


// **************************************************
CLIENTCOMPLIANCEDLL_API int COMPLIANCE_Progress(	
	unsigned int* progressPercent,
	unsigned int* error
);
// return value of COMPLIANCE_PROGRESS_COMPLETE
// return value of COMPLIANCE_PROGRESS_BUSY; progressPercent set
// return value of COMPLIANCE_PROGRESS_ERROR; error set
// After this returns COMPLIANCE_PROGRESS_COMPLETE
// use COMPLIANCE_ResultCount and
// COMPLIANCE_IndexedValue to look at results


//COMPLIANCE response accessors
// **************************************************
CLIENTCOMPLIANCEDLL_API int COMPLIANCE_ResultCount();
// return value is the number of all values
// return value is COMPLIANCE_ERROR_*


// **************************************************
CLIENTCOMPLIANCEDLL_API int COMPLIANCE_IndexedValue (
	unsigned int index,  // value to retrieve (starts at 0)
	const char **designator, // designator of value found
	const char **result,  // result of evaluating relevance
	const char **description, // description accompanying designator
	const char **comment  // comment accompanying designator
);
// return value is 0 on success, otherwise COMPLIANCE_ERROR_*