' Multipart/form-data constants and optional helper declarations.
#IF NOT %DEF(PBX_MULTIPART_FORMDATA_PBI)
#DEFINE PBX_MULTIPART_FORMDATA_PBI
CONST MULTIPART_FORMDATA_MIME = "multipart/form-data"
CONST MULTIPART_BOUNDARY_PREFIX = "----PBXB64Boundary"
CONST MULTIPART_HEADER_CONTENT_DISPOSITION = "Content-Disposition"
CONST MULTIPART_HEADER_CONTENT_TYPE = "Content-Type"
CONST MULTIPART_DISPOSITION_FORM_DATA = "form-data"
CONST MULTIPART_FIELD_NAME = "name"
CONST MULTIPART_FIELD_FILENAME = "filename"
DECLARE FUNCTION PBXMultipart_Create LIB "pbxapi64.dll" ALIAS "PBXMultipart_Create" (BYVAL pBoundary AS QUAD, BYVAL cbBoundary AS QUAD, BYVAL phBuilder AS QUAD) AS LONG
DECLARE FUNCTION PBXMultipart_AddField LIB "pbxapi64.dll" ALIAS "PBXMultipart_AddField" (BYVAL hBuilder AS QUAD, BYVAL pName AS QUAD, BYVAL cbName AS QUAD, BYVAL pValue AS QUAD, BYVAL cbValue AS QUAD) AS LONG
DECLARE FUNCTION PBXMultipart_AddFile LIB "pbxapi64.dll" ALIAS "PBXMultipart_AddFile" (BYVAL hBuilder AS QUAD, BYVAL pName AS QUAD, BYVAL cbName AS QUAD, BYVAL pFileName AS QUAD, BYVAL cbFileName AS QUAD, BYVAL pMime AS QUAD, BYVAL cbMime AS QUAD, BYVAL pData AS QUAD, BYVAL cbData AS QUAD) AS LONG
DECLARE FUNCTION PBXMultipart_Finish LIB "pbxapi64.dll" ALIAS "PBXMultipart_Finish" (BYVAL hBuilder AS QUAD, BYVAL ppData AS QUAD, BYVAL pcbData AS QUAD) AS LONG
DECLARE FUNCTION PBXMultipart_Free LIB "pbxapi64.dll" ALIAS "PBXMultipart_Free" (BYVAL hBuilder AS QUAD) AS LONG
#ENDIF
