/* -*- 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/. */
/** * Given a buffer, create a new IStream object. * @param aBuf Buffer containing data to initialize the stream. This parameter * may be nullptr, causing the stream to be created with aBufLen * bytes of uninitialized data. * @param aBufLen Length of data in aBuf, or desired stream size if aBuf is * nullptr. * @param aOutStream Outparam to receive the newly created stream. * @return HRESULT error code.
*/ long CreateStream(const uint8_t* aBuf, const uint32_t aBufLen,
IStream** aOutStream);
/** * Length of a stringified GUID as formatted for the registry, i.e. including * curly-braces and dashes.
*/
constexpr size_t kGuidRegFormatCharLenInclNul = 39;
/** * Converts an IID to a human-readable string for the purposes of diagnostic * tools such as the profiler. For some special cases, we output a friendly * string that describes the purpose of the interface. If no such description * exists, we simply fall back to outputting the IID as a string formatted by * GUIDToString().
*/ void DiagnosticNameForIID(REFIID aIid, nsACString& aOutString); #else void GUIDToString(REFGUID aGuid, wchar_t (&aOutBuf)[kGuidRegFormatCharLenInclNul]); #endif// defined(MOZILLA_INTERNAL_API)
/** * Execute cleanup code when going out of scope if a condition is met. * This is useful when, for example, particular cleanup needs to be performed * whenever a call returns a failure HRESULT. * Both the condition and cleanup code are provided as functions (usually * lambdas).
*/ template <typename CondFnT, typename ExeFnT> class MOZ_RAII ExecuteWhen final { public:
ExecuteWhen(CondFnT& aCondFn, ExeFnT& aExeFn)
: mCondFn(aCondFn), mExeFn(aExeFn) {}
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.