src/lib/lightmediascanner_charset_conv.c File Reference

#include "lightmediascanner_charset_conv.h"
#include <iconv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

Include dependency graph for lightmediascanner_charset_conv.c:

Go to the source code of this file.

Functions

lms_charset_conv_tlms_charset_conv_new (void)
void lms_charset_conv_free (lms_charset_conv_t *lcc)
int lms_charset_conv_add (lms_charset_conv_t *lcc, const char *charset)
int lms_charset_conv_del (lms_charset_conv_t *lcc, const char *charset)
int lms_charset_conv (lms_charset_conv_t *lcc, char **p_str, unsigned int *p_len)
int lms_charset_conv_check (lms_charset_conv_t *lcc, const char *str, unsigned int len)


Function Documentation

int lms_charset_conv ( lms_charset_conv_t lcc,
char **  p_str,
unsigned int *  p_len 
)

If required, do charset conversion to UTF-8.

Parameters:
lcc existing Light Media Scanner charset conversion.
p_str string to be converted.
p_len string size.
Returns:
On success 0 is returned.

Definition at line 266 of file lightmediascanner_charset_conv.c.

int lms_charset_conv_add ( lms_charset_conv_t lcc,
const char *  charset 
)

Register new charset to conversion tool.

Parameters:
lcc existing Light Media Scanner charset conversion.
charset charset name as understood by iconv_open(3).
Returns:
On success 0 is returned.

Definition at line 98 of file lightmediascanner_charset_conv.c.

Referenced by lms_charset_add().

int lms_charset_conv_check ( lms_charset_conv_t lcc,
const char *  str,
unsigned int  len 
)

Check if strings is not UTF-8 and conversion is required.

Parameters:
lcc existing Light Media Scanner charset conversion.
str string to be analysed.
len string size.
Returns:
0 if string is already UTF-8.

Definition at line 317 of file lightmediascanner_charset_conv.c.

int lms_charset_conv_del ( lms_charset_conv_t lcc,
const char *  charset 
)

Forget about previously registered charset in conversion tool.

Parameters:
lcc existing Light Media Scanner charset conversion.
charset charset name.
Returns:
On success 0 is returned.

Definition at line 164 of file lightmediascanner_charset_conv.c.

Referenced by lms_charset_del().


Generated on Thu Dec 13 02:04:03 2007 for Light Media Scanner by  doxygen 1.5.2