cr-enc-handler.h File Reference

The declaration of the CREncHandler class. More...

#include "cr-utils.h"

Go to the source code of this file.

Data Structures

struct  _CREncHandler
 This class is responsible of the the encoding conversions stuffs in libcroco. More...

Typedefs

typedef typedefG_BEGIN_DECLS
struct _CREncHandler 
CREncHandler

Functions

CREncHandlercr_enc_handler_get_instance (enum CREncoding a_enc)
 cr_enc_handler_get_instance: : the encoding of the Handler.
enum CRStatus cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name, enum CREncoding *a_enc)
 cr_enc_handler_resolve_enc_alias: : the encoding name.
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: : the current instance of CREncHandler.

Variables

enum CRStatus(* CREncInputFunc )(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
enum CRStatus(* CREncOutputFunc )(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)
enum CRStatus(* CREncInputStrLenAsUtf8Func )(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)
enum CRStatus(* CREncUtf8StrLenAsOutputFunc )(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)


Detailed Description

The declaration of the CREncHandler class.

Definition in file cr-enc-handler.h.


Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _CREncHandler CREncHandler

Definition at line 41 of file cr-enc-handler.h.


Function Documentation

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: : the current instance of CREncHandler.

: the input buffer to convert. : in/out parameter. The len of the input buffer to convert. After return, contains the number of bytes actually consumed. : output parameter. The converted output buffer. Must be freed by the buffer. : output parameter. The length of the output buffer.

Converts a raw input buffer into an utf8 buffer.

Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 151 of file cr-enc-handler.c.

References CR_BAD_PARAM_ERROR, and CR_OK.

Referenced by cr_input_new_from_buf().

CREncHandler* cr_enc_handler_get_instance ( enum CREncoding  a_enc  ) 

cr_enc_handler_get_instance: : the encoding of the Handler.

Gets the instance of encoding handler. This function implements a singleton pattern.

Returns the instance of CREncHandler.

Definition at line 86 of file cr-enc-handler.c.

References CREncAlias::encoding.

Referenced by cr_input_new_from_buf().

enum CRStatus cr_enc_handler_resolve_enc_alias ( const guchar *  a_alias_name,
enum CREncoding a_enc 
)

cr_enc_handler_resolve_enc_alias: : the encoding name.

: output param. The returned encoding type or 0 if the alias is not supported.

Given an encoding name (called an alias name) the function returns the matching encoding type.

Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 112 of file cr-enc-handler.c.

References CR_BAD_PARAM_ERROR, CR_ENCODING_NOT_FOUND_ERROR, CR_OK, CREncAlias::encoding, and CREncAlias::name.


Variable Documentation

enum CRStatus(* CREncInputFunc)(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)

enum CRStatus(* CREncInputStrLenAsUtf8Func)(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)

enum CRStatus(* CREncOutputFunc)(const guchar *a_in, gulong *a_in_len, guchar *a_out, gulong *a_out_len)

enum CRStatus(* CREncUtf8StrLenAsOutputFunc)(const guchar *a_in_start, const guchar *a_in_end, gulong *a_in_size)


Generated on Wed Jul 8 15:11:39 2009 for Libcroco by  doxygen 1.5.7.1