intl/uconv/src/nsReplacementToUnicode.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/uconv/src/nsReplacementToUnicode.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef nsReplacementToUnicode_h_
     1.9 +#define nsReplacementToUnicode_h_
    1.10 +
    1.11 +#include "nsUCSupport.h"
    1.12 +
    1.13 +#define NS_REPLACEMENTTOUNICODE_CID \
    1.14 +  { 0xd24b24da, 0xc607, 0x489a, \
    1.15 +    { 0xb5, 0xf0, 0x67, 0x91, 0xf4, 0x45, 0x45, 0x6d } }
    1.16 +
    1.17 +#define NS_REPLACEMENTTOUNICODE_CONTRACTID \
    1.18 +  "@mozilla.org/intl/unicode/decoder;1?charset=replacement"
    1.19 +
    1.20 +class nsReplacementToUnicode : public nsBasicDecoderSupport
    1.21 +{
    1.22 +public:
    1.23 +  nsReplacementToUnicode();
    1.24 +
    1.25 +  NS_IMETHOD Convert(const char* aSrc,
    1.26 +                     int32_t* aSrcLength,
    1.27 +                     char16_t* aDest,
    1.28 +                     int32_t* aDestLength);
    1.29 +
    1.30 +  NS_IMETHOD GetMaxLength(const char* aSrc,
    1.31 +                          int32_t aSrcLength,
    1.32 +                          int32_t* aDestLength);
    1.33 +
    1.34 +  NS_IMETHOD Reset();
    1.35 +
    1.36 +private:
    1.37 +  bool mSeenByte;
    1.38 +};
    1.39 +
    1.40 +#endif // nsReplacementToUnicode_h_

mercurial