michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIOUtil.h" michael@0: #include "nsIInputStream.h" michael@0: #include "nsIOutputStream.h" michael@0: #include "nsStreamUtils.h" michael@0: michael@0: NS_IMPL_ISUPPORTS(nsIOUtil, nsIIOUtil) michael@0: michael@0: NS_IMETHODIMP michael@0: nsIOUtil::InputStreamIsBuffered(nsIInputStream* aStream, bool* _retval) michael@0: { michael@0: if (NS_WARN_IF(!aStream)) michael@0: return NS_ERROR_INVALID_ARG; michael@0: *_retval = NS_InputStreamIsBuffered(aStream); michael@0: return NS_OK; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: nsIOUtil::OutputStreamIsBuffered(nsIOutputStream* aStream, bool* _retval) michael@0: { michael@0: if (NS_WARN_IF(!aStream)) michael@0: return NS_ERROR_INVALID_ARG; michael@0: *_retval = NS_OutputStreamIsBuffered(aStream); michael@0: return NS_OK; michael@0: }