nsSaveAsCharset.h 938 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nsSaveAsCharset_h_
  6. #define nsSaveAsCharset_h_
  7. #include "nsStringFwd.h"
  8. #include "nsISaveAsCharset.h"
  9. #include "nsAutoPtr.h"
  10. #include "nsNCRFallbackEncoderWrapper.h"
  11. #include "nsString.h"
  12. class nsSaveAsCharset : public nsISaveAsCharset
  13. {
  14. public:
  15. nsSaveAsCharset();
  16. NS_DECL_ISUPPORTS
  17. NS_IMETHOD Init(const nsACString& aCharset, uint32_t aIgnored, uint32_t aAlsoIgnored) override;
  18. NS_IMETHOD Convert(const nsAString& ain, nsACString& aOut) override;
  19. NS_IMETHOD GetCharset(nsACString& aCharset) override;
  20. private:
  21. virtual ~nsSaveAsCharset();
  22. nsAutoPtr<nsNCRFallbackEncoderWrapper> mEncoder;
  23. nsCString mCharset;
  24. };
  25. #endif