/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
// If we're querying dynamic flags, we'll need to fetch the actual xpcom // component in order to check them. if (HasDynamicFlags()) {
nsCOMPtr<nsIProtocolHandler> handler = Handler(); if (nsCOMPtr<nsIProtocolHandlerWithDynamicFlags> dynamic =
do_QueryInterface(handler)) {
nsresult rv = dynamic->GetFlagsForURI(aURI, aFlags);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_DIAGNOSTIC_ASSERT(
(StaticProtocolFlags() & ~nsIProtocolHandler::DYNAMIC_URI_FLAGS) ==
(*aFlags & ~nsIProtocolHandler::DYNAMIC_URI_FLAGS), "only DYNAMIC_URI_FLAGS may be changed by a " "nsIProtocolHandlerWithDynamicFlags implementation"); return NS_OK;
}
}
// Otherwise, just check against static flags.
*aFlags = StaticProtocolFlags(); return NS_OK;
}
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.