Commit cee094ee203fb16abd46e6bf3a238487dde0101d
- Diff rendering mode:
- inline
- side by side
gchardet.cpp
(5 / 0)
|   | |||
| 46 | 46 | const gchar *buf, | |
| 47 | 47 | guint32 len) | |
| 48 | 48 | { | |
| 49 | g_return_val_if_fail (cd != NULL, 0); | ||
| 49 | 50 | CharsetDetector *impl = reinterpret_cast <CharsetDetector*> (cd); | |
| 50 | 51 | return impl -> HandleData (buf, len); | |
| 51 | 52 | } | |
| … | … | ||
| 55 | 55 | void | |
| 56 | 56 | g_chardet_free (g_chardet_t cd) | |
| 57 | 57 | { | |
| 58 | g_return_if_fail (cd != NULL); | ||
| 58 | 59 | CharsetDetector *impl = reinterpret_cast <CharsetDetector*> (cd); | |
| 59 | 60 | delete impl; | |
| 60 | 61 | } | |
| … | … | ||
| 63 | 63 | const gchar* | |
| 64 | 64 | g_chardet_charset (g_chardet_t cd) | |
| 65 | 65 | { | |
| 66 | g_return_val_if_fail (cd != NULL, NULL); | ||
| 66 | 67 | CharsetDetector *impl = reinterpret_cast <CharsetDetector*> (cd); | |
| 67 | 68 | return (impl -> mCharsetFound) ? impl -> GetCharset() : NULL; | |
| 68 | 69 | } | |
| … | … | ||
| 72 | 72 | gboolean | |
| 73 | 73 | g_chardet_found (g_chardet_t cd) | |
| 74 | 74 | { | |
| 75 | g_return_val_if_fail (cd != NULL, FALSE); | ||
| 75 | 76 | CharsetDetector *impl = reinterpret_cast <CharsetDetector*> (cd); | |
| 76 | 77 | return impl -> mCharsetFound; | |
| 77 | 78 | } | |
| … | … | ||
| 80 | 80 | void | |
| 81 | 81 | g_chardet_finish (g_chardet_t cd) | |
| 82 | 82 | { | |
| 83 | g_return_if_fail (cd != NULL); | ||
| 83 | 84 | CharsetDetector *impl = reinterpret_cast <CharsetDetector*> (cd); | |
| 84 | 85 | impl -> DataEnd (); | |
| 85 | 86 | } |

