diff --git a/include/eport.h b/include/eport.h index 7754f15..e6d26f9 100644 --- a/include/eport.h +++ b/include/eport.h @@ -23,10 +23,20 @@ #include -size_t eport_read(FILE *, char *, size_t); +/* returns -1 in case of error, see errno than, or bytes ridden otherwise */ +ssize_t eport_read(FILE *, char *, size_t); -size_t eport_write(FILE *, char *, size_t); +/* returns -1 in case of error, see errno than, or bytes written otherwise */ +ssize_t eport_write(FILE *, char *, size_t); +/* returns -1 in case of error, otherwise returns a number of + * elements ridden from the message data + * message structure shall be preallocated, but pointers within it are not, + * e.g. all contents are set by this function. + * pointer is a message data content with size. + * NOTE: this function modifies the message data content, however freeing and + * allocation shall be done outside of this function. + */ int eport_ejabberd_msgread(char *, size_t, struct ejabber_msg *); #endif /* __EPORT_H__ */