xref: /aoo42x/main/sal/textenc/convertiso2022jp.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_CONVERTISO2022JP_H
25 #define INCLUDED_RTL_TEXTENC_CONVERTISO2022JP_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_pJisX0208ToUnicodeData;
37     ImplUniToDBCSHighTab const * m_pUnicodeToJisX0208Data;
38 } ImplIso2022JpConverterData;
39 
40 void * ImplCreateIso2022JpToUnicodeContext(void) SAL_THROW_EXTERN_C();
41 
42 void ImplResetIso2022JpToUnicodeContext(void * pContext) SAL_THROW_EXTERN_C();
43 
44 sal_Size ImplConvertIso2022JpToUnicode(ImplTextConverterData const * pData,
45                                        void * pContext,
46                                        sal_Char const * pSrcBuf,
47                                        sal_Size nSrcBytes,
48                                        sal_Unicode * pDestBuf,
49                                        sal_Size nDestChars,
50                                        sal_uInt32 nFlags,
51                                        sal_uInt32 * pInfo,
52                                        sal_Size * pSrcCvtBytes)
53     SAL_THROW_EXTERN_C();
54 
55 void * ImplCreateUnicodeToIso2022JpContext(void) SAL_THROW_EXTERN_C();
56 
57 void ImplResetUnicodeToIso2022JpContext(void * pContext) SAL_THROW_EXTERN_C();
58 
59 sal_Size ImplConvertUnicodeToIso2022Jp(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_CONVERTISO2022JP_H */
75