xref: /aoo41x/main/sal/textenc/converter.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_CONVERTER_H
25 #define INCLUDED_RTL_TEXTENC_CONVERTER_H
26 
27 #include "sal/types.h"
28 
29 #if defined __cplusplus
30 extern "C" {
31 #endif /* __cpluscplus */
32 
33 typedef enum
34 {
35     IMPL_BAD_INPUT_STOP,
36     IMPL_BAD_INPUT_CONTINUE,
37     IMPL_BAD_INPUT_NO_OUTPUT
38 } ImplBadInputConversionAction;
39 
40 ImplBadInputConversionAction
41 ImplHandleBadInputTextToUnicodeConversion(
42     sal_Bool bUndefined, sal_Bool bMultiByte, sal_Char cByte, sal_uInt32 nFlags,
43     sal_Unicode ** pDestBufPtr, sal_Unicode * pDestBufEnd, sal_uInt32 * pInfo)
44     SAL_THROW_EXTERN_C();
45 
46 ImplBadInputConversionAction
47 ImplHandleBadInputUnicodeToTextConversion(sal_Bool bUndefined,
48                                           sal_uInt32 nUtf32,
49                                           sal_uInt32 nFlags,
50                                           sal_Char ** pDestBufPtr,
51                                           sal_Char * pDestBufEnd,
52                                           sal_uInt32 * pInfo,
53                                           sal_Char const * pPrefix,
54                                           sal_Size nPrefixLen,
55                                           sal_Bool * pPrefixWritten)
56     SAL_THROW_EXTERN_C();
57 
58 #if defined __cplusplus
59 }
60 #endif /* __cpluscplus */
61 
62 #endif /* INCLUDED_RTL_TEXTENC_CONVERTER_H */
63