#ifndef _FS_COMPLIANCECOMMON_C_H_
#define _FS_COMPLIANCECOMMON_C_H_

#ifdef __cplusplus
extern "C" {
#endif



typedef enum _FSViewOrPrintCondition {
e_FSViewOrPrintConditionAuto = 0,
e_FSViewOrPrintConditionCoatedGRACoL2006 = 1,
e_FSViewOrPrintConditionISOCoatedv2ECI = 2,
e_FSViewOrPrintConditionJapanColor2001Coated = 3,
e_FSViewOrPrintConditionPSOCoatedv3ECI = 4,
}FSViewOrPrintCondition;


FSErrorCode FSDK_ComplianceEngine_Initialize(const wchar_t* compliance_resource_folder_path, const char* compliance_engine_unlockcode);
FSErrorCode FSDK_ComplianceEngine_Release();
FSErrorCode FSDK_ComplianceEngine_SetTempFolderPath(const wchar_t* temp_folder_path);
FSErrorCode FSDK_ComplianceEngine_EnableHandleTransparency(FS_BOOL enable_handle_transparency);
FSErrorCode FSDK_ComplianceEngine_SetLanguage(const char* language);
typedef struct _FSProgressCallback {
  void* user_data;
  void (*Release)(void* user_data);
  void (*UpdateCurrentStateData)(void* user_data, int current_rate, const wchar_t*current_state_string);
  
}FSProgressCallback;


typedef enum _FSLibraryType {
e_FSLibraryTypeFoxit = 0,
e_FSLibraryTypePDFStandards = 1,
e_FSLibraryTypePrepressColorTransparency = 2,
}FSLibraryType;



typedef enum _FSOperateType {
e_FSOperateTypeProfiles = 0,
e_FSOperateTypeSingleChecks = 1,
e_FSOperateTypeSingleFixups = 2,
}FSOperateType;


typedef struct _FSPreflightSettingData {
  FS_WSTR preflight_key;
  FSOperateType operate_type;
  FS_WSTR src_pdf_path;
  FS_WSTR saved_pdf_path;
  int first_page_index;
  int last_page_index;
}FSPreflightSettingData;


typedef enum _FSReportFileFormatType {
e_FSReportFileFormatTypePdf = 0,
e_FSReportFileFormatTypeXml = 1,
e_FSReportFileFormatTypeTxt = 2,
e_FSReportFileFormatTypeHtml = 3,
}FSReportFileFormatType;



typedef enum _FSProblemsHighlightMethod {
e_FSProblemsHighlightMethodTransparentMasks = 0,
e_FSProblemsHighlightMethodLayers = 1,
}FSProblemsHighlightMethod;


typedef struct _FSPreflightReportSettingData {
  
  FSReportFileFormatType report_file_format_type;
  FS_BOOL to_generate_overview;
  FS_BOOL to_highlight_problems;
  FSProblemsHighlightMethod problems_highlight_method;
  FS_WSTR report_file_path;
}FSPreflightReportSettingData;

FSErrorCode FSDK_Preflight_Create(FS_PREFLIGHT_HANDLE* preflight_return_value);
FSErrorCode FSDK_Preflight_Release(FS_PREFLIGHT_HANDLE preflight_handle);
FSErrorCode FSDK_Preflight_IsEmpty(FS_PREFLIGHT_HANDLE preflight_handle, FS_BOOL* return_value);
FSErrorCode FSDK_Preflight_GetGroupNamesArray(FS_PREFLIGHT_HANDLE preflight_handle, const FSLibraryType library_type, const FSOperateType operate_type, FS_BSTR* return_stringarray, FS_UINT32* return_array_length);
FSErrorCode FSDK_Preflight_GetItemKeysArray(FS_PREFLIGHT_HANDLE preflight_handle, const char* group_name, FS_BSTR* return_stringarray, FS_UINT32* return_array_length);
FSErrorCode FSDK_Preflight_Analyze(FS_PREFLIGHT_HANDLE preflight_handle, const FSPreflightSettingData preflight_setting_data, FSProgressCallback* progress_callback);
FSErrorCode FSDK_Preflight_AnalyzeAndFixup(FS_PREFLIGHT_HANDLE preflight_handle, const FSPreflightSettingData preflight_setting_data, FSProgressCallback* progress_callback);
FSErrorCode FSDK_Preflight_GenerateReport(FS_PREFLIGHT_HANDLE preflight_handle, const FSPreflightReportSettingData preflight_report_setting_data, FSProgressCallback* progress_callback, FS_BOOL* return_value);
FSErrorCode FSDK_Preflight_CanFixup(FS_PREFLIGHT_HANDLE preflight_handle, const char* item_key, FS_BOOL* return_value);

typedef enum _FSFixupState {
e_FSFixupStateSuccess = 0,
e_FSFixupStateFailure = 1,
e_FSFixupStateNotRequired = 2,
}FSFixupState;


typedef struct _FSFixupData {
  FS_UINT32 used_count;
  FSFixupState state;
  FS_WSTR name;
  FS_WSTR comment;
  FS_WSTR* reasons_array;
  FS_UINT32 reasons_array_length;
}FSFixupData;


typedef enum _FSCheckSeverity {
e_FSCheckSeverityInfo = 1,
e_FSCheckSeverityWarning = 2,
e_FSCheckSeverityError = 3,
}FSCheckSeverity;


typedef struct _FSHitData {
  FS_UINT32 triggered_count;
  FSCheckSeverity severity;
  FS_WSTR name;
  FS_WSTR comment;
  FS_WSTR* trigger_values_array;
  FS_UINT32 trigger_values_array_length;
  int page_index;
}FSHitData;

FSErrorCode FSDK_ResultInformation_Create(FS_RESULTINFORMATION_HANDLE* resultinformation_return_value);
FSErrorCode FSDK_ResultInformation_Release(FS_RESULTINFORMATION_HANDLE resultinformation_handle);
FSErrorCode FSDK_ResultInformation_IsEmpty(FS_RESULTINFORMATION_HANDLE resultinformation_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ResultInformation_GetFixupDataCount(FS_RESULTINFORMATION_HANDLE resultinformation_handle, int* return_value);
FSErrorCode FSDK_ResultInformation_GetFixupData(FS_RESULTINFORMATION_HANDLE resultinformation_handle, int index, FSFixupData* return_value);
FSErrorCode FSDK_ResultInformation_GetHitDataCount(FS_RESULTINFORMATION_HANDLE resultinformation_handle, int* return_value);
FSErrorCode FSDK_ResultInformation_GetHitData(FS_RESULTINFORMATION_HANDLE resultinformation_handle, int index, FSHitData* return_value);
#ifdef __cplusplus
}
#endif
#endif
