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: michael@0: #ifndef __nsScriptableUConv_h_ michael@0: #define __nsScriptableUConv_h_ michael@0: michael@0: #include "nsIScriptableUConv.h" michael@0: michael@0: class nsScriptableUnicodeConverter : public nsIScriptableUnicodeConverter michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSISCRIPTABLEUNICODECONVERTER michael@0: michael@0: nsScriptableUnicodeConverter(); michael@0: virtual ~nsScriptableUnicodeConverter(); michael@0: michael@0: protected: michael@0: nsCString mCharset; michael@0: nsCOMPtr mEncoder; michael@0: nsCOMPtr mDecoder; michael@0: bool mIsInternal; michael@0: michael@0: nsresult FinishWithLength(char **_retval, int32_t* aLength); michael@0: nsresult ConvertFromUnicodeWithLength(const nsAString& aSrc, michael@0: int32_t* aOutLen, michael@0: char **_retval); michael@0: michael@0: michael@0: nsresult InitConverter(); michael@0: }; michael@0: michael@0: #endif