#ifndef _FS_BASICTYPES_C_H_
#define _FS_BASICTYPES_C_H_

#ifdef __cplusplus
extern "C" {
#endif


#include <string.h>

typedef char FS_INT8;

typedef unsigned char FS_UINT8;

typedef int FS_BOOL;

typedef unsigned int FS_UINT32;

typedef FS_UINT32 FSDK_ARGB;

typedef FS_UINT32 FS_RGB;

typedef int FS_INT32;

typedef short FS_INT16;

typedef unsigned short FS_UINT16;

typedef unsigned char FS_BYTE;

#ifdef _MSC_VER

typedef __int64             FS_INT64;

typedef unsigned __int64    FS_UINT64;

#else

typedef long long int       FS_INT64;

typedef unsigned long long  FS_UINT64;

#endif

typedef void* FS_HWND_;

typedef void* FS_POSITION;

typedef void* FS_HANDLE;

typedef FS_HANDLE FS_RANGE_HANDLE;

typedef FS_HANDLE FS_PROGRESSIVE_HANDLE;

typedef FS_HANDLE FS_PATH_HANDLE;

typedef FS_HANDLE FS_RENDERER_HANDLE;

typedef FS_HANDLE FS_DOCUMENTSSOURCE_HANDLE;

typedef FS_HANDLE FS_FULLTEXTSEARCH_HANDLE;

typedef FS_HANDLE FS_FILESPEC_HANDLE;

typedef FS_HANDLE FS_BITMAP_HANDLE;

typedef FS_HANDLE FS_IMAGE_HANDLE;

typedef FS_HANDLE FS_FONT_HANDLE;

typedef FS_HANDLE FS_PDFDOC_HANDLE;

typedef FS_HANDLE FS_BOOKMARK_HANDLE;

typedef FS_HANDLE FS_PDFPAGE_HANDLE;

typedef FS_HANDLE FS_SIGNATURE_HANDLE;

typedef FS_HANDLE FS_PDFOBJECT_HANDLE;

typedef FS_HANDLE FS_PDFARRAY_HANDLE;

typedef FS_HANDLE FS_PDFDICTIONARY_HANDLE;

typedef FS_HANDLE FS_PDFSTREAM_HANDLE;

typedef FS_HANDLE FS_DESTINATION_HANDLE;

typedef FS_HANDLE FS_HEADERFOOTERCONTENTGENERATOR_HANDLE;

typedef FS_HANDLE FS_FORM_HANDLE;

typedef FS_HANDLE FS_FIELD_HANDLE;

typedef FS_HANDLE FS_CONTROL_HANDLE;

typedef FS_HANDLE FS_FILLER_HANDLE;

typedef FS_HANDLE FS_RENDITION_HANDLE;

typedef FS_HANDLE FS_SCREENANNOT_HANDLE;

typedef FS_HANDLE FS_WARTERMARK_HANDLE;

typedef FS_HANDLE FS_ACTION_HANDLE;

typedef FS_HANDLE FS_GOTOACTION_HANDLE;

typedef FS_HANDLE FS_URIACTION_HANDLE;

typedef FS_HANDLE FS_JAVASCRIPTACTION_HANDLE;

typedef FS_HANDLE FS_NAMEDACTION_HANDLE;

typedef FS_HANDLE FS_SUBMITFORMACTION_HANDLE;

typedef FS_HANDLE FS_RESETFORMACTION_HANDLE;

typedef FS_HANDLE FS_IMPORTDATAACTION_HANDLE;

typedef FS_HANDLE FS_HIDEACTION_HANDLE;

typedef FS_HANDLE FS_LAUNCHACTION_HANDLE;

typedef FS_HANDLE FS_REMOTEGOTOACTION_HANDLE;

typedef FS_HANDLE FS_EMBEDDEDGOTOACTION_HANDLE;

typedef FS_HANDLE FS_RENDITIONACTION_HANDLE;

typedef FS_HANDLE FS_ADDITIONALACTION_HANDLE;

typedef FS_HANDLE FS_EMBEDDEDGOTOTARGET_HANDLE;

typedef FS_HANDLE FS_ANNOT_HANDLE;

typedef FS_HANDLE FS_MARKUPANNOT_HANDLE;

typedef FS_HANDLE FS_POPUPANNOT_HANDLE;

typedef FS_HANDLE FS_CARETANNOT_HANDLE;

typedef FS_HANDLE FS_FILEATTACHMENTANNOT_HANDLE;

typedef FS_HANDLE FS_PSINKANNOT_HANDLE;

typedef FS_HANDLE FS_SQUAREANNOT_HANDLE;

typedef FS_HANDLE FS_TEXTMARKUPANNOT_HANDLE;

typedef FS_HANDLE FS_SQUIGGLYANNOT_HANDLE;

typedef FS_HANDLE FS_UNDERLINEANNOT_HANDLE;

typedef FS_HANDLE FS_HIGHLIGHTANNOT_HANDLE;

typedef FS_HANDLE FS_STRIKEOUTANNOT_HANDLE;

typedef FS_HANDLE FS_CIRCLEANNOT_HANDLE;

typedef FS_HANDLE FS_FREETEXTANNOT_HANDLE;

typedef FS_HANDLE FS_POLYGONANNOT_HANDLE;

typedef FS_HANDLE FS_POLYLINEANNOT_HANDLE;

typedef FS_HANDLE FS_NOTEANNOT_HANDLE;

typedef FS_HANDLE FS_LINEANNOT_HANDLE;

typedef FS_HANDLE FS_INKANNOT_HANDLE;

typedef FS_HANDLE FS_LINKANNOT_HANDLE;

typedef FS_HANDLE FS_SOUNDANNOT_HANDLE;

typedef FS_HANDLE FS_REDACTANNOT_HANDLE;

typedef FS_HANDLE FS_WIDGETANNOT_HANDLE;

typedef FS_HANDLE FS_STAMPANNOT_HANDLE;

typedef FS_HANDLE FS_COLORSPACE_HANDLE;

typedef FS_HANDLE FS_COLOR_HANDLE;

typedef FS_HANDLE FS_COMPARISON_HANDLE;

typedef FS_HANDLE FS_RESULTINFORMATION_HANDLE;

typedef FS_HANDLE FS_FDFDOC_HANDLE;

typedef FS_HANDLE FS_FILLSIGN_HANDLE;

typedef FS_HANDLE FS_FILLSIGNOBJECT_HANDLE;

typedef FS_HANDLE FS_TEXTFILLSIGNOBJECT_HANDLE;

typedef FS_HANDLE FS_SIGNATUREFILLSIGNOBJECT_HANDLE;

typedef FS_HANDLE FS_LTVVERIFIER_HANDLE;

typedef FS_HANDLE FS_BARCODE_HANDLE;

typedef FS_HANDLE FS_SIGNATUREVERIFYRESULT_HANDLE;

typedef FS_HANDLE FS_OCR_HANDLE;

typedef FS_HANDLE FS_FXOCR_HANDLE;

typedef FS_HANDLE FS_OPTIMIZERSETTINGS_HANDLE;

typedef FS_HANDLE FS_OPTIMIZESCANNEDPDFSETTINGS_HANDLE;

typedef FS_HANDLE FS_IMAGESETTINGS_HANDLE;

typedef FS_HANDLE FS_MONOIMAGESETTINGS_HANDLE;

typedef FS_HANDLE FS_UNEMBEDDEDFONTSETTINGS_HANDLE;

typedef FS_HANDLE FS_TAGGEDPDF_HANDLE;

typedef FS_HANDLE FS_PDFACOMPLIANCE_HANDLE;

typedef FS_HANDLE FS_PREFLIGHT_HANDLE;

typedef FS_HANDLE FS_PDFXCOMPLIANCE_HANDLE;

typedef FS_HANDLE FS_PDFECOMPLIANCE_HANDLE;

typedef FS_HANDLE FS_ASSOCIATEDFILES_HANDLE;

typedef FS_HANDLE FS_GRAPHICSOBJECT_HANDLE;

typedef FS_HANDLE FS_IMAGEOBJECT_HANDLE;

typedef FS_HANDLE FS_FORMXOBJECT_HANDLE;

typedef FS_HANDLE FS_ATTACHMENTS_HANDLE;

typedef FS_HANDLE FS_PDFNAMETREE_HANDLE;

typedef FS_HANDLE FS_PDFCOMPLIANCE_HANDLE;

typedef FS_HANDLE FS_READINGBOOKMARK_HANDLE;

typedef FS_HANDLE FS_SECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_STDSECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_CERTIFICATESECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_DRMSECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_DOCVIEWERPREFS_HANDLE;

typedef FS_HANDLE FS_LAYERTREE_HANDLE;

typedef FS_HANDLE FS_LAYERNODE_HANDLE;

typedef FS_HANDLE FS_LAYERCONTEXT_HANDLE;

typedef FS_HANDLE FS_METADATA_HANDLE;

typedef FS_HANDLE FS_PDFNUMBERTREE_HANDLE;

typedef FS_HANDLE FS_GRAPHICSOBJECTS_HANDLE;

typedef FS_HANDLE FS_PAGELABELS_HANDLE;

typedef FS_HANDLE FS_PSI_HANDLE;

typedef FS_HANDLE FS_REDACTION_HANDLE;

typedef FS_HANDLE FS_REFLOWPAGE_HANDLE;

typedef FS_HANDLE FS_XFADOC_HANDLE;

typedef FS_HANDLE FS_XFAPAGE_HANDLE;

typedef FS_HANDLE FS_XFAWIDGET_HANDLE;

typedef FS_HANDLE FS_MEDIAPLAYER_HANDLE;

typedef FS_HANDLE FS_TEXTPAGE_HANDLE;

typedef FS_HANDLE FS_TEXTSEARCH_HANDLE;

typedef FS_HANDLE FS_TEXTLINK_HANDLE;

typedef FS_HANDLE FS_PAGETEXTLINKS_HANDLE;

typedef FS_HANDLE FS_CUSTOMSECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_RMSSECURITYHANDLER_HANDLE;

typedef FS_HANDLE FS_TIMESTAMPSERVER_HANDLE;

typedef FS_HANDLE FS_TABORDERMGR_HANDLE;

typedef FS_HANDLE FS_WATERMARK_HANDLE;

typedef FS_HANDLE FS_WIDGETMENU_HANDLE;

typedef FS_HANDLE FS_COLORSTATE_HANDLE;

typedef FS_HANDLE FS_MARKEDCONTENT_HANDLE;

typedef FS_HANDLE FS_COLORSTATE_HANDLE;

typedef FS_HANDLE FS_TEXTOBJECT_HANDLE;

typedef FS_HANDLE FS_PATHOBJECT_HANDLE;

typedef FS_HANDLE FS_SHADINGOBJECT_HANDLE;

typedef FS_HANDLE FS_COMBINEDOCUMENTINFO_HANDLE;

typedef FS_HANDLE FS_OUTPUTPREVIEW_HANDLE;

typedef FS_HANDLE FS_LRELEMENT_HANDLE;

typedef FS_HANDLE FS_LRSTRUCTUREELEMENT_HANDLE;

typedef FS_HANDLE FS_LRGRAPHICSOBJECTELEMENT_HANDLE;

typedef FS_HANDLE FS_LRCONTENTELEMENT_HANDLE;

typedef FS_HANDLE FS_LRCONTEXT_HANDLE;

typedef FS_HANDLE FS_ANNOTATIONSUMMARYSETTINGS_HANDLE;

typedef FS_HANDLE FS_ANNOTATIONSUMMARY_HANDLE;

typedef FS_HANDLE FS_PORTFOLIO_HANDLE;

typedef FS_HANDLE FS_SCHEMAFIELD_HANDLE;

typedef FS_HANDLE FS_PORTFOLIONODE_HANDLE;

typedef FS_HANDLE FS_PORTFOLIOFOLDERNODE_HANDLE;

typedef FS_HANDLE FS_PORTFOLIOFILENODE_HANDLE;

typedef FS_HANDLE FS_FORMFILEINFO_HANDLE;

typedef FS_HANDLE FS_SNAPPEDPOINT_HANDLE;

typedef FS_HANDLE FS_SNAPPOINTMGR_HANDLE;

typedef FS_HANDLE FS_PAGINGSEALSIGNATURE_HANDLE;

typedef FS_HANDLE FS_PAGINGSEALANNOT_HANDLE;

typedef FS_HANDLE FS_TEXTSEARCHREPLACE_HANDLE;

typedef FS_HANDLE FS_PDF2OFFICE_HANDLE;

typedef FS_HANDLE FS_STRUCTTREEENTITY_HANDLE;

typedef FS_HANDLE FS_STRUCTELEMENT_HANDLE;

typedef FS_HANDLE FS_STRUCTMARKEDCONTENT_HANDLE;

typedef FS_HANDLE FS_STRUCTOBJECTCONTENT_HANDLE;

typedef FS_HANDLE FS_PDFSTRUCTTREE_HANDLE;

typedef FS_HANDLE FS_OFDDOC_HANDLE;

typedef FS_HANDLE FS_OFDPAGE_HANDLE;

typedef FS_HANDLE FS_OFDRENDERER_HANDLE;

typedef FS_HANDLE FS_PARAGRAPHEDITINGUNDOITEM_HANDLE;

typedef FS_HANDLE FS_PARAGRAPHEDITING_HANDLE;

typedef FS_HANDLE FS_JOINSPLIT_HANDLE;

typedef FS_HANDLE FS_PARAGRAPHEDITINGMGR_HANDLE;

typedef FS_HANDLE FS_PDF3DCONTEXT_HANDLE;

typedef FS_HANDLE FS_PDF3DANNOTINSTANCE_HANDLE;

typedef FS_HANDLE FS_SPLITDOCUMENTINFO_HANDLE;

typedef FS_HANDLE FS_OFFICE2PDF_HANDLE;

typedef FS_HANDLE FS_HIDDENINFOSETTING_HANDLE;

typedef FS_HANDLE FS_SETOCGSTATEACTION_HANDLE;

typedef FS_HANDLE FS_MODELNODE_HANDLE;

typedef FS_HANDLE FS_PDF3DANNOT_HANDLE;

typedef FS_HANDLE FS_XFAWIDGETMODIFYINFO_HANDLE;

typedef struct _FS_WSTR {

wchar_t* str;

FS_UINT32 len;

} FS_WSTR;

typedef struct _FS_BSTR {

char* str;

FS_UINT32 len;

} FS_BSTR;

typedef struct _RECTF {

float left;

float top;

float right;

float bottom;

} FSRectF;

typedef struct _RECTI {

int left;

int top;

int right;

int bottom;

} FSRectI;

typedef struct _PointF {

float x;

float y;

} FSPointF;

typedef FSPointF FSOffset;

typedef struct _Matrix {

float a;

float b;

float c;

float d;

float e;

float f;

} FSMatrix;


typedef enum _FSErrorCode {
e_FSErrSuccess = 0,
e_FSErrFile = 1,
e_FSErrFormat = 2,
e_FSErrPassword = 3,
e_FSErrHandle = 4,
e_FSErrCertificate = 5,
e_FSErrorCodeErrUnknown = 6,
e_FSErrInvalidLicense = 7,
e_FSErrParam = 8,
e_FSErrUnsupported = 9,
e_FSErrOutOfMemory = 10,
e_FSErrSecurityHandler = 11,
e_FSErrNotParsed = 12,
e_FSErrNotFound = 13,
e_FSErrInvalidType = 14,
e_FSErrConflict = 15,
e_FSErrorCodeErrUnknownState = 16,
e_FSErrDataNotReady = 17,
e_FSErrInvalidData = 18,
e_FSErrXFALoadError = 19,
e_FSErrNotLoaded = 20,
e_FSErrInvalidState = 21,
e_FSErrNotCDRM = 22,
e_FSErrCanNotConnectToServer = 23,
e_FSErrInvalidUserToken = 24,
e_FSErrNoRights = 25,
e_FSErrRightsExpired = 26,
e_FSErrDeviceLimitation = 27,
e_FSErrCanNotRemoveSecurityFromServer = 28,
e_FSErrCanNotGetACL = 29,
e_FSErrCanNotSetACL = 30,
e_FSErrIsAlreadyCPDF = 31,
e_FSErrIsAlreadyCDRM = 32,
e_FSErrCanNotUploadDocInfo = 33,
e_FSErrCanNotUploadCDRMInfo = 34,
e_FSErrInvalidWrapper = 35,
e_FSErrCanNotGetClientID = 36,
e_FSErrCanNotGetUserToken = 37,
e_FSErrInvalidACL = 38,
e_FSErrInvalidClientID = 39,
e_FSErrOCREngineNotInit = 40,
e_FSErrDiskFull = 41,
e_FSErrOCRTrialIsEnd = 42,
e_FSErrFilePathNotExist = 43,
e_FSErrComplianceEngineNotInit = 44,
e_FSErrComplianceEngineInvalidUnlockCode = 45,
e_FSErrComplianceEngineInitFailed = 46,
e_FSErrTimeStampServerMgrNotInit = 47,
e_FSErrLTVVerifyModeNotSet = 48,
e_FSErrLTVRevocationCallbackNotSet = 49,
e_FSErrLTVCannotSwitchVersion = 50,
e_FSErrLTVCannotCheckDTS = 51,
e_FSErrLTVCannotLoadDSS = 52,
e_FSErrLTVCannotLoadDTS = 53,
e_FSErrNeedSigned = 54,
e_FSErrComplianceResourceFile = 55,
e_FSErrTimeStampServerMgrNoDefaltServer = 56,
e_FSErrDefaultTimeStampServer = 57,
e_FSErrNoConnectedPDFModuleRight = 58,
e_FSErrNoXFAModuleRight = 59,
e_FSErrNoRedactionModuleRight = 60,
e_FSErrNoRMSModuleRight = 61,
e_FSErrNoOCRModuleRight = 62,
e_FSErrNoComparisonModuleRight = 63,
e_FSErrNoComplianceModuleRight = 64,
e_FSErrNoOptimizerModuleRight = 65,
e_FSErrNoConversionModuleRight = 66,
e_FSErrOfficeComNotInit = 67,
e_FSErrNoMicroOfficeInstalled = 68,
e_FSErrExcelHasNoContent = 69,
e_FSErrNoLayoutRecognitionModuleRight = 70,
e_FSErrWPSEngineNotFound = 71,
e_FSErrLibreofficeEngineNotFound = 72,
e_FSErrNoAccessibilityModuleRight = 73,
e_FSErrODAEngineNotFound = 74,
e_FSErrNoTableMakerModuleRight = 75,
e_FSErrNoDWG2PDFModuleRight = 76,
e_FSErrNoAdvEditModuleRight = 77,
e_FSErrNoPDF2OfficeModuleRight = 78,
e_FSErrURLInBlackList = 79,
e_FSErrOFDEngineNotInit = 80,
e_FSErrNoOFDModuleRight = 81,
e_FSErrNo3DModuleRight = 82,
e_FSErrInvalidRegex = 83,
e_FSErrNoDocumentPermission = 84,
e_FSErrNoOffice2PDFModuleRight = 85,
e_FSErrMIPUPEEngineInitFailed = 86,
e_FSErrMIPProtectionEngineInitFailed = 87,
e_FSErrMIPCreateProtectionHandlerFailed = 88,
e_FSErrMIPGetExtendedLabelInfoByIdFailed = 89,
e_FSErrNoPrint2PDFModuleRight = 90,
e_FSErrResponseDataError = 91,
e_FSErrTimeout = 92,
e_FSErrNoImageObject = 93,
e_FSErrFXOCREngineNotInit = 94,
}FSErrorCode;


typedef struct _FSDateTime {
  FS_UINT16 year;
  FS_UINT16 month;
  FS_UINT16 day;
  FS_UINT16 hour;
  FS_UINT16 minute;
  FS_UINT16 second;
  FS_UINT16 milliseconds;
  FS_INT16 utc_hour_offset;
  
  FS_UINT16 utc_minute_offset;
} FSDateTime;
FSErrorCode FSDK_DateTime_ToLocalTime(const FSDateTime* datetime, FSDateTime* local_datetime);
FSErrorCode FSDK_DateTime_ToUTCTime(const FSDateTime* datetime, FSDateTime* utc_datetime);
FSErrorCode FSDK_DateTime_GetLocalTime(FSDateTime* local_datetime);
FSErrorCode FSDK_DateTime_GetUTCTime(FSDateTime* utc_datetime);
#ifdef __cplusplus
}
#endif
#endif
