' URL encode/decode helper declarations.
#IF NOT %DEF(PBX_URLENCODE_PBI)
#DEFINE PBX_URLENCODE_PBI
CONST URLENCODE_SPACE_PERCENT20 = 0
CONST URLENCODE_SPACE_PLUS = 1
CONST URLENCODE_QUERY_COMPONENT = &H00000001
CONST URLENCODE_PATH_COMPONENT = &H00000002
DECLARE FUNCTION PBXUrl_EncodeUtf8 LIB "pbxapi64.dll" ALIAS "PBXUrl_EncodeUtf8" (BYVAL pText AS QUAD, BYVAL cbText AS QUAD, BYVAL flags AS DWORD, BYVAL ppOut AS QUAD, BYVAL pcbOut AS QUAD) AS LONG
DECLARE FUNCTION PBXUrl_DecodeUtf8 LIB "pbxapi64.dll" ALIAS "PBXUrl_DecodeUtf8" (BYVAL pText AS QUAD, BYVAL cbText AS QUAD, BYVAL flags AS DWORD, BYVAL ppOut AS QUAD, BYVAL pcbOut AS QUAD) AS LONG
DECLARE FUNCTION UrlEscapeA LIB "shlwapi.dll" ALIAS "UrlEscapeA" (BYVAL pszUrl AS ASCIIZ PTR, BYVAL pszEscaped AS QUAD, BYVAL pcchEscaped AS QUAD, BYVAL dwFlags AS DWORD) AS LONG
DECLARE FUNCTION UrlEscapeW LIB "shlwapi.dll" ALIAS "UrlEscapeW" (BYVAL pszUrl AS WSTRING, BYVAL pszEscaped AS QUAD, BYVAL pcchEscaped AS QUAD, BYVAL dwFlags AS DWORD) AS LONG
DECLARE FUNCTION UrlUnescapeA LIB "shlwapi.dll" ALIAS "UrlUnescapeA" (BYVAL pszUrl AS ASCIIZ PTR, BYVAL pszUnescaped AS QUAD, BYVAL pcchUnescaped AS QUAD, BYVAL dwFlags AS DWORD) AS LONG
DECLARE FUNCTION UrlUnescapeW LIB "shlwapi.dll" ALIAS "UrlUnescapeW" (BYVAL pszUrl AS WSTRING, BYVAL pszUnescaped AS QUAD, BYVAL pcchUnescaped AS QUAD, BYVAL dwFlags AS DWORD) AS LONG
#ENDIF
