initial doxygen. Much, much more to go.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@251 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2006-01-01 15:23:12 +00:00
parent d5945f8174
commit f78b600507
19 changed files with 364 additions and 1 deletions
+45
View File
@@ -29,6 +29,10 @@
* switch_buffer.h -- Data Buffering Code
*
*/
/*! \file switch_buffer.h
\brief Data Buffering Code
*/
#ifndef SWITCH_BUFFER_H
#define SWITCH_BUFFER_H
@@ -40,12 +44,53 @@ extern "C" {
struct switch_buffer;
/*! \brief Allocate a new switch_buffer
* \param pool Pool to allocate the buffer from
* \param buffer returned pointer to the new buffer
* \param max_len length required by the buffer
* \return status
*/
SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool *pool, switch_buffer **buffer, size_t max_len);
/*! \brief Get the length of a switch_buffer
* \param buffer any buffer of type switch_buffer
* \return int size of the buffer.
*/
SWITCH_DECLARE(int) switch_buffer_len(switch_buffer *buffer);
/*! \brief Get the freespace of a switch_buffer
* \param buffer any buffer of type switch_buffer
* \return int freespace in the buffer.
*/
SWITCH_DECLARE(int) switch_buffer_freespace(switch_buffer *buffer);
/*! \brief Get the in use amount of a switch_buffer
* \param buffer any buffer of type switch_buffer
* \return int size of buffer curently in use
*/
SWITCH_DECLARE(int) switch_buffer_inuse(switch_buffer *buffer);
/*! \brief Read data from a switch_buffer up to the ammount of datalen if it is available. Remove read data from buffer.
* \param buffer any buffer of type switch_buffer
* \param data pointer to the read data to be returned
* \param datalen amount of data to be returned
* \return int ammount of data actually read
*/
SWITCH_DECLARE(int) switch_buffer_read(switch_buffer *buffer, void *data, size_t datalen);
/*! \brief Write data into a switch_buffer up to the length of datalen
* \param buffer any buffer of type switch_buffer
* \param data pointer to the data to be written
* \param datalen amount of data to be written
* \return int ammount of buffer used after the write, or 0 if no space available
*/
SWITCH_DECLARE(int) switch_buffer_write(switch_buffer *buffer, void *data, size_t datalen);
/*! \brief Remove data from the buffer
* \param buffer any buffer of type switch_buffer
* \param datalen amount of data to be returned
* \return int ammount of buffer used after the toss, or 0 if unable to toss that much data
*/
SWITCH_DECLARE(int) switch_buffer_toss(switch_buffer *buffer, size_t datalen);