Function
IbisMessageparse
since: 0.1
Declaration [src]
IbisMessage*
ibis_message_parse (
const char* buffer,
GError** error
)
Description [src]
Attempts to parse a raw IRC message from buffer
.
buffer
should not have the trailing \r\n
.
This will call g_utf8_make_valid()
on buffer
. If any invalid
characters are found they will be converted into the
Unicode Replacement Character
(0xEF 0xBF 0xBD in UTF-8). The replacement characters can end up in any
property of the return message and it is up to the caller to determine what
to do with the replacement characters.
Available since: 0.1
Parameters
buffer
-
Type:
const char*
The raw IRC message.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the function if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: IbisMessage
The new message if one was parsed, otherwise NULL
with error
set.
The caller of the function takes ownership of the data, and is responsible for freeing it. |