19#ifndef INCLUDED_TOOLS_INETMIME_HXX
20#define INCLUDED_TOOLS_INETMIME_HXX
23#include <rtl/character.hxx>
24#include <rtl/string.hxx>
25#include <rtl/ustring.hxx>
28#include <unordered_map>
73typedef std::unordered_map<OString, INetContentTypeParameter>
87 static inline bool isVisible(sal_uInt32 nChar);
97 static bool isAtomChar(sal_uInt32 nChar);
108 static bool isIMAPAtomChar(sal_uInt32 nChar);
118 static inline int getWeight(sal_uInt32 nChar);
128 static inline int getHexWeight(sal_uInt32 nChar);
144 static bool equalIgnoreCase(
const sal_Unicode * pBegin1,
146 const char * pString2);
148 static bool scanUnsigned(
const sal_Unicode *& rBegin,
150 sal_uInt32 & rValue);
183 std::u16string_view rStr,
184 OUString * pType =
nullptr, OUString * pSubType =
nullptr,
187 static OUString decodeHeaderFieldBody(
const OString& rBody);
202 static inline sal_uInt32 getUTF32Character(
const sal_Unicode *& rBegin,
209 return nChar >=
'!' && nChar <=
'~';
215 return rtl::isAsciiDigit(nChar) ?
int(nChar -
'0') : -1;
221 return rtl::isAsciiDigit(nChar) ?
int(nChar -
'0') :
222 nChar >=
'A' && nChar <=
'F' ?
int(nChar -
'A' + 10) :
223 nChar >=
'a' && nChar <=
'f' ?
int(nChar -
'a' + 10) : -1;
230 assert(rBegin && rBegin < pEnd &&
231 "INetMIME::getUTF32Character(): Bad sequence");
232 sal_uInt32 nUTF32 = *rBegin++;
233 if (rBegin < pEnd && rtl::isHighSurrogate(nUTF32) && rtl::isLowSurrogate(rBegin[0]))
234 nUTF32 = rtl::combineSurrogates(nUTF32, *rBegin++);
static bool isVisible(sal_uInt32 nChar)
Check for US-ASCII visible character.
static sal_uInt32 getUTF32Character(const sal_Unicode *&rBegin, const sal_Unicode *pEnd)
Get the UTF-32 character at the head of a UTF-16 encoded string.
static int getHexWeight(sal_uInt32 nChar)
Get the hexadecimal digit weight of a US-ASCII character.
static int getWeight(sal_uInt32 nChar)
Get the digit weight of a US-ASCII character.
std::unordered_map< OString, INetContentTypeParameter > INetContentTypeParameterList
The key is the name of the attribute, in US-ASCII encoding and converted to lower case.
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
bool m_bConverted
This is true if the value is successfully converted to Unicode, and false if the value is a special m...
OString m_sLanguage
The optional language specification (see RFC 2231), in US-ASCII encoding and converted to lower case.
OString m_sCharset
The optional character set specification (see RFC 2231), in US-ASCII encoding and converted to lower ...
OUString m_sValue
The attribute value.