xref: /trunk/main/sal/textenc/convertbig5hkscs.h (revision 9eab2a37)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_RTL_TEXTENC_CONVERTBIG5HKSCS_H
25 #define INCLUDED_RTL_TEXTENC_CONVERTBIG5HKSCS_H
26 
27 #include "tenchelp.h"
28 #include "sal/types.h"
29 
30 #if defined __cplusplus
31 extern "C" {
32 #endif /* __cpluscplus */
33 
34 typedef struct
35 {
36     sal_uInt16 const * m_pBig5Hkscs2001ToUnicodeData;
37     sal_Int32 const * m_pBig5Hkscs2001ToUnicodeRowOffsets;
38     ImplDBCSToUniLeadTab const * m_pBig5ToUnicodeData;
39     sal_uInt16 const * m_pUnicodeToBig5Hkscs2001Data;
40     sal_Int32 const * m_pUnicodeToBig5Hkscs2001PageOffsets;
41     sal_Int32 const * m_pUnicodeToBig5Hkscs2001PlaneOffsets;
42     ImplUniToDBCSHighTab const * m_pUnicodeToBig5Data;
43     ImplDBCSEUDCData const * m_pEudcData;
44     int m_nEudcCount;
45 } ImplBig5HkscsConverterData;
46 
47 void * ImplCreateBig5HkscsToUnicodeContext(void) SAL_THROW_EXTERN_C();
48 
49 void ImplResetBig5HkscsToUnicodeContext(void * pContext) SAL_THROW_EXTERN_C();
50 
51 sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
52                                        void * pContext,
53                                        sal_Char const * pSrcBuf,
54                                        sal_Size nSrcBytes,
55                                        sal_Unicode * pDestBuf,
56                                        sal_Size nDestChars,
57                                        sal_uInt32 nFlags,
58                                        sal_uInt32 * pInfo,
59                                        sal_Size * pSrcCvtBytes)
60     SAL_THROW_EXTERN_C();
61 
62 sal_Size ImplConvertUnicodeToBig5Hkscs(ImplTextConverterData const * pData,
63                                        void * pContext,
64                                        sal_Unicode const * pSrcBuf,
65                                        sal_Size nSrcChars,
66                                        sal_Char * pDestBuf,
67                                        sal_Size nDestBytes,
68                                        sal_uInt32 nFlags,
69                                        sal_uInt32 * pInfo,
70                                        sal_Size * pSrcCvtChars)
71     SAL_THROW_EXTERN_C();
72 
73 #if defined __cplusplus
74 }
75 #endif /* __cpluscplus */
76 
77 #endif /* INCLUDED_RTL_TEXTENC_CONVERTBIG5HKSCS_H */
78