Libcroco
cr-enc-handler.h
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 
3 /*
4  * This file is part of The Croco Library
5  *
6  * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of version 2.1 of the GNU Lesser General Public
10  * License as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  */
22 
23 /*
24  *$Id$
25  */
26 
27 /**
28  *@file:
29  *The declaration of the #CREncHandler class.
30  *
31  */
32 
33 #ifndef __CR_ENC_HANDLER_H__
34 #define __CR_ENC_HANDLER_H__
35 
36 #include "cr-utils.h"
37 
38 G_BEGIN_DECLS
39 
40 
41 typedef struct _CREncHandler CREncHandler ;
42 
43 typedef enum CRStatus (*CREncInputFunc) (const guchar * a_in,
44  gulong *a_in_len,
45  guchar *a_out,
46  gulong *a_out_len) ;
47 
48 typedef enum CRStatus (*CREncOutputFunc) (const guchar * a_in,
49  gulong *a_in_len,
50  guchar *a_out,
51  gulong *a_out_len) ;
52 
53 typedef enum CRStatus (*CREncInputStrLenAsUtf8Func)
54 (const guchar *a_in_start,
55  const guchar *a_in_end,
56  gulong *a_in_size);
57 
59 (const guchar *a_in_start,
60  const guchar *a_in_end,
61  gulong *a_in_size) ;
62 
63 /**
64  *This class is responsible of the
65  *the encoding conversions stuffs in
66  *libcroco.
67  */
68 
70 {
76 } ;
77 
80 
81 enum CRStatus
82 cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name,
83  enum CREncoding *a_enc) ;
84 
85 enum CRStatus
87  const guchar *a_in,
88  gulong *a_in_len,
89  guchar **a_out,
90  gulong *a_out_len) ;
91 
92 G_END_DECLS
93 
94 #endif /*__CR_ENC_HANDLER_H__*/
CREncInputStrLenAsUtf8Func
enum CRStatus(* CREncInputStrLenAsUtf8Func)(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)
Definition: cr-enc-handler.h:54
_CREncHandler::encoding
enum CREncoding encoding
Definition: cr-enc-handler.h:71
cr_enc_handler_resolve_enc_alias
enum CRStatus cr_enc_handler_resolve_enc_alias(const guchar *a_alias_name, enum CREncoding *a_enc)
cr_enc_handler_resolve_enc_alias: @a_alias_name: the encoding name.
Definition: cr-enc-handler.c:111
CREncInputFunc
enum CRStatus(* CREncInputFunc)(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
Definition: cr-enc-handler.h:43
CREncOutputFunc
enum CRStatus(* CREncOutputFunc)(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
Definition: cr-enc-handler.h:48
cr_enc_handler_get_instance
CREncHandler * cr_enc_handler_get_instance(enum CREncoding a_enc)
cr_enc_handler_get_instance: @a_enc: the encoding of the Handler.
Definition: cr-enc-handler.c:86
_CREncHandler::utf8_str_len_as_enc
CREncUtf8StrLenAsOutputFunc utf8_str_len_as_enc
Definition: cr-enc-handler.h:75
cr_enc_handler_convert_input
enum CRStatus cr_enc_handler_convert_input(CREncHandler *a_this, const guchar *a_in, gulong *a_in_len, guchar **a_out, gulong *a_out_len)
cr_enc_handler_convert_input: @a_this: the current instance of CREncHandler.
Definition: cr-enc-handler.c:149
_CREncHandler::encode_output
CREncInputFunc encode_output
Definition: cr-enc-handler.h:73
_CREncHandler::decode_input
CREncInputFunc decode_input
Definition: cr-enc-handler.h:72
_CREncHandler
This class is responsible of the the encoding conversions stuffs in libcroco.
Definition: cr-enc-handler.h:69
_CREncHandler::enc_str_len_as_utf8
CREncInputStrLenAsUtf8Func enc_str_len_as_utf8
Definition: cr-enc-handler.h:74
CREncUtf8StrLenAsOutputFunc
enum CRStatus(* CREncUtf8StrLenAsOutputFunc)(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)
Definition: cr-enc-handler.h:59
CREncHandler
typedefG_BEGIN_DECLS struct _CREncHandler CREncHandler
Definition: cr-enc-handler.h:41
CREncoding
CREncoding
Encoding values.
Definition: cr-utils.h:84
CRStatus
CRStatus
The status type returned by the methods of the croco library.
Definition: cr-utils.h:43
cr-utils.h