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);
|
||||
}
|
||||
|
||||
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);
|
||||
if (ret != NS_OK)
|
||||
; //TODO
|
||||
return (ret != NS_OK);
|
||||
}
|
||||
|
||||
void uchardet_data_end(uchardet_t ud)
|
||||
|
||||
@ -77,35 +77,46 @@ extern "C" {
|
||||
|
||||
typedef void * uchardet_t;
|
||||
|
||||
/**
|
||||
* Create an encoding detector.
|
||||
* @return a handle of a instance of uchardet
|
||||
*/
|
||||
uchardet_t uchardet_new();
|
||||
|
||||
/**
|
||||
* Delete an encoding detector.
|
||||
* @param ud [in] handle of a instance of uchardet
|
||||
*/
|
||||
void uchardet_delete(uchardet_t ud);
|
||||
|
||||
|
||||
/**
|
||||
* Feed data to an encoding detector.
|
||||
* @param ud [in] handle of a instance of uchardet
|
||||
* @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.
|
||||
* @param ud [in] handle of a instance of uchardet
|
||||
*/
|
||||
void uchardet_data_end(uchardet_t ud);
|
||||
|
||||
/**
|
||||
* Reset an encoding detector.
|
||||
* @param ud [in] handle of a instance of uchardet
|
||||
*/
|
||||
void uchardet_reset(uchardet_t ud);
|
||||
|
||||
/**
|
||||
* Get the name of encoding that was detected.
|
||||
* @param ud [in] handle of a instance of uchardet
|
||||
* @return name of charset
|
||||
*/
|
||||
const char * uchardet_get_charset(uchardet_t ud);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user