michael@0: /* -*- Mode: C++; tab-width: 4; 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 "nsScriptableBase64Encoder.h" michael@0: #include "mozilla/Base64.h" michael@0: michael@0: using namespace mozilla; michael@0: michael@0: NS_IMPL_ISUPPORTS(nsScriptableBase64Encoder, nsIScriptableBase64Encoder) michael@0: michael@0: /* ACString encodeToCString (in nsIInputStream stream, in unsigned long length); */ michael@0: NS_IMETHODIMP michael@0: nsScriptableBase64Encoder::EncodeToCString(nsIInputStream *aStream, michael@0: uint32_t aLength, michael@0: nsACString & _retval) michael@0: { michael@0: Base64EncodeInputStream(aStream, _retval, aLength); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /* AString encodeToString (in nsIInputStream stream, in unsigned long length); */ michael@0: NS_IMETHODIMP michael@0: nsScriptableBase64Encoder::EncodeToString(nsIInputStream *aStream, michael@0: uint32_t aLength, michael@0: nsAString & _retval) michael@0: { michael@0: Base64EncodeInputStream(aStream, _retval, aLength); michael@0: return NS_OK; michael@0: }