mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 16:56:40 +08:00
Compelete comments on intercaface.
This commit is contained in:
parent
3601900164
commit
9be8afdfb9
BIN
.sconsign.dblite
BIN
.sconsign.dblite
Binary file not shown.
@ -81,11 +81,10 @@ void uchardet_delete(uchardet_t ud)
|
|||||||
delete reinterpret_cast<DllDetector*>(ud);
|
delete reinterpret_cast<DllDetector*>(ud);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uchardet_handle_data(uchardet_t ud, const char * data, size_t len)
|
int uchardet_handle_data(uchardet_t ud, const char * data, size_t len)
|
||||||
{
|
{
|
||||||
nsresult ret = reinterpret_cast<DllDetector*>(ud)->HandleData(data, (PRUint32)len);
|
nsresult ret = reinterpret_cast<DllDetector*>(ud)->HandleData(data, (PRUint32)len);
|
||||||
if (ret != NS_OK)
|
return (ret != NS_OK);
|
||||||
; //TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void uchardet_data_end(uchardet_t ud)
|
void uchardet_data_end(uchardet_t ud)
|
||||||
|
|||||||
@ -77,35 +77,46 @@ extern "C" {
|
|||||||
|
|
||||||
typedef void * uchardet_t;
|
typedef void * uchardet_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an encoding detector.
|
||||||
|
* @return a handle of a instance of uchardet
|
||||||
|
*/
|
||||||
uchardet_t uchardet_new();
|
uchardet_t uchardet_new();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete an encoding detector.
|
||||||
|
* @param ud [in] handle of a instance of uchardet
|
||||||
|
*/
|
||||||
void uchardet_delete(uchardet_t ud);
|
void uchardet_delete(uchardet_t ud);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Feed data to an encoding detector.
|
* Feed data to an encoding detector.
|
||||||
|
* @param ud [in] handle of a instance of uchardet
|
||||||
* @param data [in] data
|
* @param data [in] data
|
||||||
|
* @param len [in] number of byte of data
|
||||||
|
* @return non-zero number on failure.
|
||||||
*/
|
*/
|
||||||
void uchardet_handle_data(uchardet_t ud, const char * data, size_t len);
|
int uchardet_handle_data(uchardet_t ud, const char * data, size_t len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify an end of data to an encoding detctor.
|
* Notify an end of data to an encoding detctor.
|
||||||
|
* @param ud [in] handle of a instance of uchardet
|
||||||
*/
|
*/
|
||||||
void uchardet_data_end(uchardet_t ud);
|
void uchardet_data_end(uchardet_t ud);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset an encoding detector.
|
* Reset an encoding detector.
|
||||||
|
* @param ud [in] handle of a instance of uchardet
|
||||||
*/
|
*/
|
||||||
void uchardet_reset(uchardet_t ud);
|
void uchardet_reset(uchardet_t ud);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name of encoding that was detected.
|
* Get the name of encoding that was detected.
|
||||||
|
* @param ud [in] handle of a instance of uchardet
|
||||||
* @return name of charset
|
* @return name of charset
|
||||||
*/
|
*/
|
||||||
const char * uchardet_get_charset(uchardet_t ud);
|
const char * uchardet_get_charset(uchardet_t ud);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user