32#define INETHIST_DEF_FTP_PORT 21
33#define INETHIST_DEF_HTTP_PORT 80
34#define INETHIST_DEF_HTTPS_PORT 443
36#define INETHIST_SIZE_LIMIT 1024
37#define INETHIST_MAGIC_HEAD 0x484D4849UL
117 static sal_uInt32
crc32 (OUString
const & rData)
119 return rtl_crc32 (0, rData.getStr(), rData.getLength() *
sizeof(
sal_Unicode));
122 sal_uInt16
find (sal_uInt32 nHash)
const;
124 void move (sal_uInt16 nSI, sal_uInt16 nDI);
154 void putUrl (
const OUString &rUrl);
155 bool queryUrl (
const OUString &rUrl)
const;
168 for (
i = 0;
i <
n;
i++)
170 for (
i = 0;
i <
n;
i++)
172 for (
i = 1;
i <
n;
i++)
182 while ((l < r) && (r < c))
184 sal_uInt16
m = (l + r) / 2;
220 sal_uInt32
h =
crc32 (rUrl);
221 sal_uInt16 k =
find (
h);
242 if (nLRU !=
m_pHash[nSI].m_nLru)
254 sal_uInt16 nDI = std::min (k, sal_uInt16(
capacity() - 1));
255 if (nSI < nDI && !(
m_pHash[nDI] <
h))
268 sal_uInt32
h =
crc32 (rUrl);
269 sal_uInt16 k =
find (
h);
295 case INetProtocol::File:
303 case INetProtocol::Ftp:
308 case INetProtocol::Http:
315 case INetProtocol::Https:
lru_entry m_pList[INETHIST_SIZE_LIMIT]
void unlink(sal_uInt16 nThis)
sal_uInt16 find(sal_uInt32 nHash) const
hash_entry m_pHash[INETHIST_SIZE_LIMIT]
void move(sal_uInt16 nSI, sal_uInt16 nDI)
static sal_uInt16 capacity()
static sal_uInt32 crc32(OUString const &rData)
INetURLHistory_Impl & operator=(const INetURLHistory_Impl &)=delete
INetURLHistory_Impl(const INetURLHistory_Impl &)=delete
head_entry m_aHead
Representation.
void putUrl(const OUString &rUrl)
putUrl/queryUrl.
void initialize()
Initialization.
void backlink(sal_uInt16 nThis, sal_uInt16 nTail)
bool queryUrl(const OUString &rUrl) const
static SAL_DLLPRIVATE void NormalizeUrl_Impl(INetURLObject &rUrl)
Implementation.
SAL_DLLPRIVATE INetURLHistory()
Construction/Destruction.
static INetURLHistory * GetOrCreate()
GetOrCreate.
virtual SAL_DLLPRIVATE ~INetURLHistory() override
void PutUrl_Impl(const INetURLObject &rUrl)
bool QueryProtocol(INetProtocol eProto) const
QueryProtocol.
std::unique_ptr< INetURLHistory_Impl > m_pImpl
Representation.
bool QueryUrl(const INetURLObject &rUrl) const
QueryUrl.
bool QueryUrl_Impl(INetURLObject rUrl) const
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool SetPort(sal_uInt32 nThePort)
OUString GetURLNoMark(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static INetProtocol CompareProtocolScheme(std::u16string_view aTheAbsURIRef)
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static bool IsCaseSensitive()
bool SetURLPath(std::u16string_view rThePath, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
INetProtocol GetProtocol() const
bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
void Broadcast(const SfxHint &rHint)
#define DBG_ASSERT(sCon, aError)
#define INETHIST_DEF_FTP_PORT
#define INETHIST_DEF_HTTPS_PORT
#define INETHIST_SIZE_LIMIT
#define INETHIST_MAGIC_HEAD
#define INETHIST_DEF_HTTP_PORT
sal_uInt32 m_nHash
Representation.
bool operator<(sal_uInt32 nHash) const
bool operator==(sal_uInt32 nHash) const
Comparison.
void initialize(sal_uInt16 nLru)
Initialization.
sal_uInt32 m_nMagic
Representation.
void initialize()
Initialization.
void initialize(sal_uInt16 nThis)
Initialization.
sal_uInt32 m_nHash
Representation.