xref: /aoo41x/main/sal/textenc/convertiso2022cn.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_CONVERTISO2022CN_H
25 #define INCLUDED_RTL_TEXTENC_CONVERTISO2022CN_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     ImplDBCSToUniLeadTab const * m_pGb2312ToUnicodeData;
37     sal_uInt16 const * m_pCns116431992ToUnicodeData;
38     sal_Int32 const * m_pCns116431992ToUnicodeRowOffsets;
39     sal_Int32 const * m_pCns116431992ToUnicodePlaneOffsets;
40     ImplUniToDBCSHighTab const * m_pUnicodeToGb2312Data;
41     sal_uInt8 const * m_pUnicodeToCns116431992Data;
42     sal_Int32 const * m_pUnicodeToCns116431992PageOffsets;
43     sal_Int32 const * m_pUnicodeToCns116431992PlaneOffsets;
44 } ImplIso2022CnConverterData;
45 
46 void * ImplCreateIso2022CnToUnicodeContext(void) SAL_THROW_EXTERN_C();
47 
48 void ImplResetIso2022CnToUnicodeContext(void * pContext) SAL_THROW_EXTERN_C();
49 
50 sal_Size ImplConvertIso2022CnToUnicode(ImplTextConverterData const * pData,
51                                        void * pContext,
52                                        sal_Char const * pSrcBuf,
53                                        sal_Size nSrcBytes,
54                                        sal_Unicode * pDestBuf,
55                                        sal_Size nDestChars,
56                                        sal_uInt32 nFlags,
57                                        sal_uInt32 * pInfo,
58                                        sal_Size * pSrcCvtBytes)
59     SAL_THROW_EXTERN_C();
60 
61 void * ImplCreateUnicodeToIso2022CnContext(void) SAL_THROW_EXTERN_C();
62 
63 void ImplResetUnicodeToIso2022CnContext(void * pContext) SAL_THROW_EXTERN_C();
64 
65 sal_Size ImplConvertUnicodeToIso2022Cn(ImplTextConverterData const * pData,
66                                        void * pContext,
67                                        sal_Unicode const * pSrcBuf,
68                                        sal_Size nSrcChars,
69                                        sal_Char * pDestBuf,
70                                        sal_Size nDestBytes,
71                                        sal_uInt32 nFlags,
72                                        sal_uInt32 * pInfo,
73                                        sal_Size * pSrcCvtChars)
74     SAL_THROW_EXTERN_C();
75 
76 #if defined __cplusplus
77 }
78 #endif /* __cpluscplus */
79 
80 #endif /* INCLUDED_RTL_TEXTENC_CONVERTISO2022CN_H */
81