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