|
PebbleOS
|
Callbacks implementing a send queue job. More...
#include <session_send_queue.h>
Data Fields | |
| size_t(* | get_length )(const SessionSendQueueJob *send_job) |
| Get the remaining length of the job. | |
| size_t(* | copy )(const SessionSendQueueJob *send_job, int start_offset, size_t length, uint8_t *data_out) |
| Copy message data out of the job. | |
| size_t(* | get_read_pointer )(const SessionSendQueueJob *send_job, const uint8_t **data_out) |
| Get a pointer to the next contiguous chunk of data. | |
| void(* | consume )(const SessionSendQueueJob *send_job, size_t length) |
| Mark data as sent by the transport. | |
| void(* | free )(SessionSendQueueJob *send_job) |
| Release the job. | |
Callbacks implementing a send queue job.
All callbacks are called with bt_lock() held.
| void(* SessionSendJobImpl::consume) (const SessionSendQueueJob *send_job, size_t length) |
Mark data as sent by the transport.
| send_job | The job. |
| length | Number of bytes consumed. |
| size_t(* SessionSendJobImpl::copy) (const SessionSendQueueJob *send_job, int start_offset, size_t length, uint8_t *data_out) |
Copy message data out of the job.
The caller ensures enough data is available.
| send_job | The job. | |
| start_offset | Offset into the unconsumed data. | |
| length | Number of bytes to copy. | |
| [out] | data_out | Destination buffer. |
| void(* SessionSendJobImpl::free) (SessionSendQueueJob *send_job) |
Release the job.
Called when the job has been fully consumed or the session is closed.
| send_job | The job. |
| size_t(* SessionSendJobImpl::get_length) (const SessionSendQueueJob *send_job) |
Get the remaining length of the job.
| send_job | The job. |
| size_t(* SessionSendJobImpl::get_read_pointer) (const SessionSendQueueJob *send_job, const uint8_t **data_out) |
Get a pointer to the next contiguous chunk of data.
The data may be non-contiguous: call this and consume() repeatedly until it returns 0 to access all of it.
| send_job | The job. | |
| [out] | data_out | Read pointer. |
data_out.