Improvements for BOA

- Allowed write buffers to become very large in asynnet. Thus in order to allow for the transfer
  of large images. tested ub to 2kx2k, 16MB
- Handle lack of space in the write buffer more gracefully: just skip the image
This commit is contained in:
2014-08-27 16:24:39 +02:00
parent 9e898d1476
commit 8f704ebab9
5 changed files with 116 additions and 4 deletions

View File

@ -16,6 +16,13 @@ typedef struct __RWBuffer *prwBuffer;
* \return NULL on success, else a pointer to t a new rwPuffer
*/
prwBuffer MakeRWPuffer(int size);
/**
* \brief create a RW buffer which can grow.
* \param size The size of the buffer.
* \param maxSize The maximum size of the buffer.
* \return NULL on success, else a pointer to t a new rwPuffer
*/
prwBuffer MakeBigRWPuffer(int size, int maxSize);
/**
* \brief delete a rw buffer.
* \param self The rwPuffer to delete.
@ -29,6 +36,14 @@ void KillRWBuffer(prwBuffer self);
* \return 1 on success, 0 on failure
*/
int StoreRWBuffer(prwBuffer self, void *data, int count);
/**
* \brief Test if the data can be stored in the rwBuffer
* \param self The rw buffer to store the data in
* \param data pointer to the data to store
* \param count The number of bytes to store
* \return 1 when OK, 0 when buffer full
*/
int CanStoreRWBuffer(prwBuffer self, void *data, int count);
/**
* \brief Get a pointer to the current buffer data
* \param self the buffer to get the data from