Adding casio_seven_set_disp to be able to change/setup display callback and cookie
This commit is contained in:
parent
1264ebdf76
commit
0056ab3296
|
@ -492,6 +492,12 @@ CASIO_EXTERN int CASIO_EXPORT casio_open_seven_mcs
|
|||
CASIO_EXTERN int CASIO_EXPORT casio_open_seven_fs
|
||||
OF((casio_fs_t **casio__filesystem, casio_link_t *casio__link));
|
||||
|
||||
/* Set display callback and cookie */
|
||||
|
||||
CASIO_EXTERN int CASIO_EXPORT casio_seven_set_disp
|
||||
OF((casio_stream_t *casio__stream, casio_link_progress_t *casio__disp,
|
||||
void *casio__dcookie));
|
||||
|
||||
CASIO_END_DECLS
|
||||
CASIO_END_NAMESPACE
|
||||
#endif /* LIBCASIO_PROTOCOL_SEVEN_H */
|
||||
|
|
|
@ -366,3 +366,24 @@ int CASIO_EXPORT casio_seven_open_data_stream(casio_stream_t **stream,
|
|||
/* initialize the stream */
|
||||
return (casio_open_stream(stream, mode, cookie, &seven_data_callbacks, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* casio_seven_set_disp:
|
||||
* Set display callback and cookie.
|
||||
*
|
||||
* @arg stream the stream to make.
|
||||
* @arg disp the display callback.
|
||||
* @arg dcookie the display callback cookie.
|
||||
* @return the error (0 if ok).
|
||||
*/
|
||||
|
||||
int CASIO_EXPORT casio_seven_set_disp(casio_stream_t *stream,
|
||||
casio_link_progress_t *disp, void *dcookie)
|
||||
{
|
||||
seven_data_cookie_t *cookie = casio_get_cookie(stream);
|
||||
|
||||
cookie->_disp = disp;
|
||||
cookie->_disp_cookie = dcookie;
|
||||
|
||||
return (0);
|
||||
}
|
Loading…
Reference in New Issue