1 | /* |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
3 | * contributor license agreements. See the NOTICE file distributed with |
---|
4 | * this work for additional information regarding copyright ownership. |
---|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
6 | * (the "License"); you may not use this file except in compliance with |
---|
7 | * the License. You may obtain a copy of the License at |
---|
8 | * |
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | * |
---|
11 | * Unless required by applicable law or agreed to in writing, software |
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | * See the License for the specific language governing permissions and |
---|
15 | * limitations under the License. |
---|
16 | */ |
---|
17 | |
---|
18 | /* |
---|
19 | * $Id: uniconv.h 568078 2007-08-21 11:43:25Z amassari $ |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef UNICONV_HPP |
---|
23 | #define UNICONV_HPP |
---|
24 | |
---|
25 | #include <xercesc/util/XercesDefs.hpp> |
---|
26 | |
---|
27 | XERCES_CPP_NAMESPACE_BEGIN |
---|
28 | |
---|
29 | // This is the type for the returned handles |
---|
30 | typedef void * uniconv_t; |
---|
31 | #define UNICONV_ERROR (uniconv_t)-1 |
---|
32 | #define UNICONV_NOHANDLE (uniconv_t)0 |
---|
33 | |
---|
34 | // These are the character conversion services APIs. They are modeled |
---|
35 | // after the iconv() APIs. |
---|
36 | uniconv_t uniconv_open(const char *,const char *); |
---|
37 | int uniconv_close(uniconv_t); |
---|
38 | int uniconv(uniconv_t cd, char **inbuf, size_t *inbytesleft, |
---|
39 | char **outbuf, size_t *outbytesleft); |
---|
40 | |
---|
41 | // These are the case conversion APIs. They use the same handle type as the |
---|
42 | // conversion APIs above. |
---|
43 | typedef unsigned short unichar_t; |
---|
44 | uniconv_t uniconv_toupper_open(); |
---|
45 | uniconv_t uniconv_tolower_open(); |
---|
46 | #define uniconv_toupper_close(_a) _uniconv_case_close(_a) |
---|
47 | #define uniconv_tolower_close(_a) _uniconv_case_close(_a) |
---|
48 | int _uniconv_case_close(uniconv_t handle_area); |
---|
49 | unichar_t uniconv_caseit(uniconv_t cd, unichar_t inchar); |
---|
50 | |
---|
51 | XERCES_CPP_NAMESPACE_END |
---|
52 | |
---|
53 | #endif |
---|