1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/io/Base64.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_Base64_h__ 1.10 +#define mozilla_Base64_h__ 1.11 + 1.12 +#include "nsString.h" 1.13 + 1.14 +class nsIInputStream; 1.15 + 1.16 +namespace mozilla { 1.17 + 1.18 +nsresult 1.19 +Base64EncodeInputStream(nsIInputStream *aInputStream, 1.20 + nsACString &aDest, 1.21 + uint32_t aCount, 1.22 + uint32_t aOffset = 0); 1.23 +nsresult 1.24 +Base64EncodeInputStream(nsIInputStream *aInputStream, 1.25 + nsAString &aDest, 1.26 + uint32_t aCount, 1.27 + uint32_t aOffset = 0); 1.28 + 1.29 +nsresult 1.30 +Base64Encode(const nsACString &aString, nsACString &aBinary); 1.31 +nsresult 1.32 +Base64Encode(const nsAString &aString, nsAString &aBinaryData); 1.33 + 1.34 +nsresult 1.35 +Base64Decode(const nsACString &aBinaryData, nsACString &aString); 1.36 +nsresult 1.37 +Base64Decode(const nsAString &aBinaryData, nsAString &aString); 1.38 + 1.39 +} // namespace mozilla 1.40 + 1.41 +#endif