Apache Portable Runtime Utility Library
include/apr_xlate.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_XLATE_H
00018 #define APR_XLATE_H
00019 
00020 #include "apu.h"
00021 #include "apr_pools.h"
00022 #include "apr_errno.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif /* __cplusplus */
00027 
00039 typedef struct apr_xlate_t            apr_xlate_t;
00040 
00066 APU_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset, 
00067                                          const char *topage, 
00068                                          const char *frompage, 
00069                                          apr_pool_t *pool);
00070 
00078 #define APR_DEFAULT_CHARSET (const char *)0
00079 
00082 #define APR_LOCALE_CHARSET (const char *)1
00083 
00093 APU_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff);
00094 
00117 APU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset, 
00118                                                 const char *inbuf, 
00119                                                 apr_size_t *inbytes_left, 
00120                                                 char *outbuf,
00121                                                 apr_size_t *outbytes_left);
00122 
00123 /* @see apr_file_io.h the comment in apr_file_io.h about this hack */
00124 #ifdef APR_NOT_DONE_YET
00125 
00134 APU_DECLARE(apr_status_t) apr_xlate_conv_char(apr_xlate_t *convset, 
00135                                               char inchar, char outchar);
00136 #endif
00137 
00146 APU_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset, 
00147                                              unsigned char inchar);
00148 
00156 APU_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset);
00157 
00159 #ifdef __cplusplus
00160 }
00161 #endif
00162 
00163 #endif  /* ! APR_XLATE_H */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines