michael@0: /* -*- Mode: C; tab-width: 4; 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: #ifndef nsUnicodeEncodeHelper_h__ michael@0: #define nsUnicodeEncodeHelper_h__ michael@0: michael@0: #include "nsError.h" michael@0: #include "uconvutil.h" michael@0: //---------------------------------------------------------------------- michael@0: // Class nsUnicodeEncodeHelper [declaration] michael@0: michael@0: /** michael@0: * michael@0: * @created 22/Nov/1998 michael@0: * @author Catalin Rotaru [CATA] michael@0: */ michael@0: class nsUnicodeEncodeHelper michael@0: { michael@0: michael@0: public: michael@0: //-------------------------------------------------------------------- michael@0: michael@0: /** michael@0: * Converts data using a lookup table and optional shift table. michael@0: */ michael@0: static nsresult ConvertByTable(const char16_t * aSrc, int32_t * aSrcLength, michael@0: char * aDest, int32_t * aDestLength, uScanClassID aScanClass, michael@0: uShiftOutTable * aShiftOutTable, uMappingTable * aMappingTable); michael@0: michael@0: /** michael@0: * Converts data using a set of lookup tables and optional shift tables. michael@0: */ michael@0: static nsresult ConvertByMultiTable(const char16_t * aSrc, int32_t * aSrcLength, michael@0: char * aDest, int32_t * aDestLength, int32_t aTableCount, michael@0: uScanClassID * aScanClassArray, michael@0: uShiftOutTable ** aShiftOutTable, uMappingTable ** aMappingTable); michael@0: }; michael@0: michael@0: #endif // nsUnicodeEncodeHelper_h__ michael@0: michael@0: