' Multipart/form-data constants and optional helper declarations.
#IF NOT %DEF(PBX_MULTIPART_FORMDATA_PBI)
#DEFINE PBX_MULTIPART_FORMDATA_PBI
%EQUATE `MULTIPART_FORMDATA_MIME = "multipart/form-data"
%EQUATE `MULTIPART_BOUNDARY_PREFIX = "----PBXA64Boundary"
%EQUATE `MULTIPART_HEADER_CONTENT_DISPOSITION = "Content-Disposition"
%EQUATE `MULTIPART_HEADER_CONTENT_TYPE = "Content-Type"
%EQUATE `MULTIPART_DISPOSITION_FORM_DATA = "form-data"
%EQUATE `MULTIPART_FIELD_NAME = "name"
%EQUATE `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
