/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
EnsureInitialized();
MOZ_ASSERT(mURLEnumerator, "Should have instanced an IE History URLEnumerator"); if (!mURLEnumerator) return NS_OK;
STATURL statURL;
ULONG fetched;
// First argument is not implemented, so doesn't matter what we pass.
HRESULT hr = mURLEnumerator->Next(1, &statURL, &fetched); if (FAILED(hr) || fetched != 1UL) { // Reached the last entry. return NS_OK;
}
nsCOMPtr<nsIURI> uri; if (statURL.pwcsUrl) {
nsDependentString url(statURL.pwcsUrl);
nsresult rv = NS_NewURI(getter_AddRefs(uri), url);
::CoTaskMemFree(statURL.pwcsUrl); if (NS_FAILED(rv)) { // Got a corrupt or invalid URI, continue to the next entry. return HasMoreElements(_retval);
}
}
mCachedNextEntry = do_CreateInstance("@mozilla.org/hash-property-bag;1");
MOZ_ASSERT(mCachedNextEntry, "Should have instanced a new property bag"); if (mCachedNextEntry) {
mCachedNextEntry->SetPropertyAsInterface(u"uri"_ns, uri);
mCachedNextEntry->SetPropertyAsAString(u"title"_ns, title); if (lastVisitTimeIsValid) {
mCachedNextEntry->SetPropertyAsInt64(u"time"_ns, lastVisited);
}
*_retval = true;
}
if (statURL.pwcsTitle) ::CoTaskMemFree(statURL.pwcsTitle);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.