2001-09-26 04:40:45 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2001-08-02 02:36:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __nsScriptableUConv_h_
|
|
|
|
#define __nsScriptableUConv_h_
|
|
|
|
|
|
|
|
#include "nsIScriptableUConv.h"
|
2014-05-08 13:32:00 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2017-04-27 13:27:03 +03:00
|
|
|
#include "mozilla/Encoding.h"
|
2001-08-02 02:36:54 +04:00
|
|
|
|
|
|
|
class nsScriptableUnicodeConverter : public nsIScriptableUnicodeConverter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISCRIPTABLEUNICODECONVERTER
|
|
|
|
|
|
|
|
nsScriptableUnicodeConverter();
|
|
|
|
|
|
|
|
protected:
|
2014-06-24 02:40:02 +04:00
|
|
|
virtual ~nsScriptableUnicodeConverter();
|
|
|
|
|
2017-04-27 13:27:03 +03:00
|
|
|
mozilla::UniquePtr<mozilla::Encoder> mEncoder;
|
|
|
|
mozilla::UniquePtr<mozilla::Decoder> mDecoder;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mIsInternal;
|
2001-08-02 02:36:54 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
nsresult FinishWithLength(char **_retval, int32_t* aLength);
|
2005-04-06 05:37:24 +04:00
|
|
|
nsresult ConvertFromUnicodeWithLength(const nsAString& aSrc,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t* aOutLen,
|
2004-11-17 02:45:34 +03:00
|
|
|
char **_retval);
|
|
|
|
|
2017-04-27 13:27:03 +03:00
|
|
|
nsresult InitConverter(const nsACString& aCharset);
|
2001-08-02 02:36:54 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|