xref: /aoo42x/main/sal/textenc/converteuctw.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_CONVERTEUCTW_H
25 #define INCLUDED_RTL_TEXTENC_CONVERTEUCTW_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_pCns116431992ToUnicodeData;
37     sal_Int32 const * m_pCns116431992ToUnicodeRowOffsets;
38     sal_Int32 const * m_pCns116431992ToUnicodePlaneOffsets;
39     sal_uInt8 const * m_pUnicodeToCns116431992Data;
40     sal_Int32 const * m_pUnicodeToCns116431992PageOffsets;
41     sal_Int32 const * m_pUnicodeToCns116431992PlaneOffsets;
42 } ImplEucTwConverterData;
43 
44 void * ImplCreateEucTwToUnicodeContext(void) SAL_THROW_EXTERN_C();
45 
46 void ImplResetEucTwToUnicodeContext(void * pContext) SAL_THROW_EXTERN_C();
47 
48 sal_Size ImplConvertEucTwToUnicode(ImplTextConverterData const * pData,
49                                    void * pContext,
50                                    sal_Char const * pSrcBuf,
51                                    sal_Size nSrcBytes,
52                                    sal_Unicode * pDestBuf,
53                                    sal_Size nDestChars,
54                                    sal_uInt32 nFlags,
55                                    sal_uInt32 * pInfo,
56                                    sal_Size * pSrcCvtBytes)
57     SAL_THROW_EXTERN_C();
58 
59 sal_Size ImplConvertUnicodeToEucTw(ImplTextConverterData const * pData,
60                                    void * pContext,
61                                    sal_Unicode const * pSrcBuf,
62                                    sal_Size nSrcChars,
63                                    sal_Char * pDestBuf,
64                                    sal_Size nDestBytes,
65                                    sal_uInt32 nFlags,
66                                    sal_uInt32 * pInfo,
67                                    sal_Size * pSrcCvtChars)
68     SAL_THROW_EXTERN_C();
69 
70 #if defined __cplusplus
71 }
72 #endif /* __cpluscplus */
73 
74 #endif /* INCLUDED_RTL_TEXTENC_CONVERTEUCTW_H */
75