mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
FreeTDM: Add span iterator
Part of my ongoing effort to split ftdm_io.c into more manageable pieces. This change (along with others in the future) allows decoupling of the span registry and its users, in preparation of moving all span related functions and data structures into ftdm_span.c. Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
@@ -1589,6 +1589,7 @@ FT_DECLARE(ftdm_status_t) ftdm_usrmsg_set_raw_data(ftdm_usrmsg_t *usrmsg, void *
|
||||
|
||||
/*! \brief Get iterator current value (depends on the iterator type)
|
||||
* \note Channel iterators return a pointer to ftdm_channel_t
|
||||
* Span iterators return a pointer to ftdm_span_t
|
||||
* Variable iterators return a pointer to the variable name (not the variable value)
|
||||
*/
|
||||
FT_DECLARE(void *) ftdm_iterator_current(ftdm_iterator_t *iter);
|
||||
@@ -1725,6 +1726,11 @@ FT_DECLARE(const char *) ftdm_span_get_name(const ftdm_span_t *span);
|
||||
*/
|
||||
FT_DECLARE(ftdm_iterator_t *) ftdm_span_get_chan_iterator(const ftdm_span_t *span, ftdm_iterator_t *iter);
|
||||
|
||||
/*! \brief Get iterator for spans
|
||||
* \param iter Optional iterator. You can reuse an old iterator (not previously freed) to avoid the extra allocation of a new iterator.
|
||||
*/
|
||||
FT_DECLARE(ftdm_iterator_t *) ftdm_get_span_iterator(ftdm_iterator_t *iter);
|
||||
|
||||
/*!
|
||||
* \brief Execute a text command. The text command output will be returned and must be free'd
|
||||
*
|
||||
|
@@ -360,6 +360,7 @@ typedef ftdm_status_t (*ftdm_channel_sig_dtmf_t)(ftdm_channel_t *ftdmchan, const
|
||||
typedef enum {
|
||||
FTDM_ITERATOR_VARS = 1,
|
||||
FTDM_ITERATOR_CHANS,
|
||||
FTDM_ITERATOR_SPANS,
|
||||
} ftdm_iterator_type_t;
|
||||
|
||||
struct ftdm_iterator {
|
||||
|
Reference in New Issue
Block a user