dect
/
asterisk
Archived
13
0
Fork 0

Add Doxygen documentation for API changes from 1.6.0 to 1.6.1

Copied from my review board description:
This is a continuation of the API changes documentation started for describing
changes between releases. Most of the API changes were pretty simple needing
only to be brought to attention via the new "Asterisk API Changes" list.
However, if you see anything that needs further explanation feel free to
supplement what is there. The current method of documenting is to add (in the
header file): \version <ver number> <description of changes> and then to add
the function to the change list in doxyref.h on the AstAPIChanges page. I also
made sure all the functions that were newly added were tagged with \since
1.6.1. I think this is a good habit to start both for the historical aspect as
well as for the future ability to easily add a "New Asterisk API" page.

Review: http://reviewboard.digium.com/r/190/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180719 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
jpeeler 2009-03-09 20:58:17 +00:00
parent cc6c10d7d4
commit 5a0a55b7a4
33 changed files with 778 additions and 440 deletions

View File

@ -108,6 +108,14 @@ int ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxl
/*! \brief Full version with audiofd and controlfd. NOTE: returns '2' on ctrlfd available, not '1' like other full functions */
int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd);
/*!
* \brief Set voicemail function callbacks
* \param[in] inboxcount2_func set function pointer
* \param[in] sayname_func set function pointer
* \param[in] inboxcount_func set function pointer
* \param[in] messagecount_func set function pointer
* \version 1.6.1 Added inboxcount2_func, sayname_func
*/
void ast_install_vm_functions(int (*has_voicemail_func)(const char *mailbox, const char *folder),
int (*inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
int (*inboxcount2_func)(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs),
@ -122,10 +130,25 @@ int ast_app_has_voicemail(const char *mailbox, const char *folder);
/*! \brief Determine number of new/old messages in a mailbox */
int ast_app_inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs);
/*! \brief Determine number of urgent/new/old messages in a mailbox */
/*!
* \brief Determine number of urgent/new/old messages in a mailbox
* \param[in] mailbox the mailbox context to use
* \param[out] urgentmsgs the urgent message count
* \param[out] newmsgs the new message count
* \param[out] oldmsgs the old message count
* \return Returns 0 for success, negative upon error
* \since 1.6.1
*/
int ast_app_inboxcount2(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs);
/*! Given a mailbox and context, play that mailbox owner's name to the channel specified */
/*!
* \brief Given a mailbox and context, play that mailbox owner's name to the channel specified
* \param[in] chan channel to announce name to
* \param[in] mailbox mailbox to retrieve name for
* \param[in] context context to retrieve name for
* \return Returns 0 for success, negative upon error
* \since 1.6.1
*/
int ast_app_sayname(struct ast_channel *chan, const char *mailbox, const char *context);
/*! \brief Determine number of messages in a given mailbox and folder */
@ -511,13 +534,24 @@ char *ast_get_encoded_str(const char *stream, char *result, size_t result_len);
/*! \brief Decode a stream of encoded control or extended ASCII characters */
int ast_str_get_encoded_str(struct ast_str **str, int maxlen, const char *stream);
/*! \brief Common routine for child processes, to close all fds prior to exec(2) */
/*!
* \brief Common routine for child processes, to close all fds prior to exec(2)
* \param[in] n starting file descriptor number for closing all higher file descriptors
* \since 1.6.1
*/
void ast_close_fds_above_n(int n);
/*! \brief Common routine to safely fork without a chance of a signal handler firing badly in the child */
/*!
* \brief Common routine to safely fork without a chance of a signal handler firing badly in the child
* \param[in] stop_reaper flag to determine if sigchld handler is replaced or not
* \since 1.6.1
*/
int ast_safe_fork(int stop_reaper);
/*! \brief Common routine to cleanup after fork'ed process is complete (if reaping was stopped) */
/*!
* \brief Common routine to cleanup after fork'ed process is complete (if reaping was stopped)
* \since 1.6.1
*/
void ast_safe_fork_cleanup(void);
#if defined(__cplusplus) || defined(c_plusplus)

View File

@ -485,16 +485,18 @@ int ao2_trylock(void *a);
int _ao2_trylock(void *a, const char *file, const char *func, int line, const char *var);
#endif
/*! \brief
* Return the lock address of an object
/*!
* \brief Return the lock address of an object
*
* \param a A pointer to the object we want.
* \param[in] obj A pointer to the object we want.
* \return the address of the lock, else NULL.
*
* This function comes in handy mainly for debugging locking
* situations, where the locking trace code reports the
* lock address, this allows you to correlate against
* object address, to match objects to reported locks.
*
* \since 1.6.1
*/
void *ao2_object_get_lockaddr(void *obj);

View File

@ -235,26 +235,32 @@ int ast_channel_audiohook_count_by_source_running(struct ast_channel *chan, cons
*/
#define ast_audiohook_unlock(ah) ast_mutex_unlock(&(ah)->lock)
/*! \brief Adjust the volume on frames read from or written to a channel
/*!
* \brief Adjust the volume on frames read from or written to a channel
* \param chan Channel to muck with
* \param direction Direction to set on
* \param volume Value to adjust the volume by
* \return Returns 0 on success, -1 on failure
* \since 1.6.1
*/
int ast_audiohook_volume_set(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume);
/*! \brief Retrieve the volume adjustment value on frames read from or written to a channel
/*!
* \brief Retrieve the volume adjustment value on frames read from or written to a channel
* \param chan Channel to retrieve volume adjustment from
* \param direction Direction to retrieve
* \return Returns adjustment value
* \since 1.6.1
*/
int ast_audiohook_volume_get(struct ast_channel *chan, enum ast_audiohook_direction direction);
/*! \brief Adjust the volume on frames read from or written to a channel
/*!
* \brief Adjust the volume on frames read from or written to a channel
* \param chan Channel to muck with
* \param direction Direction to increase
* \param volume Value to adjust the adjustment by
* \return Returns 0 on success, -1 on failure
* \since 1.6.1
*/
int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume);

View File

@ -174,6 +174,7 @@ int ast_callerid_generate(unsigned char *buf, const char *name, const char *numb
* -- either 0 no messages in mailbox or 1 messages in mailbox
* \param type Format of message (any of CID_MWI_TYPE_*)
* \see callerid_generate() for more info as it use the same encoding
* \version 1.6.1 changed mdmf parameter to type, added name, number and flags for caller id message generation
*/
int vmwi_generate(unsigned char *buf, int active, int type, int codec, const char *name,
const char *number, int flags);

View File

@ -654,6 +654,7 @@ enum channelreloadreason {
/*!
* \brief Create a channel data store object
* \deprecated You should use the ast_datastore_alloc() generic function instead.
* \version 1.6.1 deprecated
*/
struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
__attribute__((deprecated));
@ -661,6 +662,7 @@ struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_inf
/*!
* \brief Free a channel data store object
* \deprecated You should use the ast_datastore_free() generic function instead.
* \version 1.6.1 deprecated
*/
int ast_channel_datastore_free(struct ast_datastore *datastore)
__attribute__((deprecated));
@ -748,8 +750,10 @@ int ast_queue_hangup(struct ast_channel *chan);
* \brief Queue a hangup frame with hangupcause set
*
* \note The channel does not need to be locked before calling this function.
* \param chan channel to queue frame onto
* \param cause the hangup cause
* \param[in] chan channel to queue frame onto
* \param[in] cause the hangup cause
* \return 0 on success, -1 on error
* \since 1.6.1
*/
int ast_queue_hangup_with_cause(struct ast_channel *chan, int cause);
@ -938,18 +942,49 @@ int ast_softhangup_nolock(struct ast_channel *chan, int cause);
*/
int ast_check_hangup(struct ast_channel *chan);
/*! \brief Compare a offset with the settings of when to hang a channel up
/*!
* \brief Compare a offset with the settings of when to hang a channel up
* \param chan channel on which to check for hang up
* \param offset offset in seconds and useconds from current time
* \param offset offset in seconds from current time
* \return 1, 0, or -1
* This function compares a offset from current time with the absolute time
* out on a channel (when to hang up). If the absolute time out on a channel
* is earlier than current time plus the offset, it returns 1, if the two
* time values are equal, it return 0, otherwise, it return -1.
* \sa ast_channel_cmpwhentohangup_tv()
* \version 1.6.1 deprecated function (only had seconds precision)
*/
int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated));
/*!
* \brief Compare a offset with the settings of when to hang a channel up
* \param chan channel on which to check for hangup
* \param offset offset in seconds and microseconds from current time
* \return 1, 0, or -1
* This function compares a offset from current time with the absolute time
* out on a channel (when to hang up). If the absolute time out on a channel
* is earlier than current time plus the offset, it returns 1, if the two
* time values are equal, it return 0, otherwise, it return -1.
* \since 1.6.1
*/
int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offset);
/*! \brief Set when to hang a channel up
*
* \param chan channel on which to check for hang up
* \param offset offset in seconds relative to the current time of when to hang up
*
* This function sets the absolute time out on a channel (when to hang up).
*
* \note This function does not require that the channel is locked before
* calling it.
*
* \return Nothing
* \sa ast_channel_setwhentohangup_tv()
* \version 1.6.1 deprecated function (only had seconds precision)
*/
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated));
/*! \brief Set when to hang a channel up
*
* \param chan channel on which to check for hang up
@ -961,8 +996,8 @@ int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offs
* calling it.
*
* \return Nothing
* \since 1.6.1
*/
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated));
void ast_channel_setwhentohangup_tv(struct ast_channel *chan, struct timeval offset);
/*!
@ -1454,12 +1489,14 @@ int ast_autoservice_stop(struct ast_channel *chan);
/*!
* \brief Enable or disable timer ticks for a channel
*
* \arg rate number of timer ticks per second
* \param rate number of timer ticks per second
*
* If timers are supported, force a scheduled expiration on the
* timer fd, at which point we call the callback function / data
*
* Call this function with a rate of 0 to turn off the timer ticks
*
* \version 1.6.1 changed samples parameter to rate, accomodates new timing methods
*/
int ast_settimeout(struct ast_channel *c, unsigned int rate, int (*func)(const void *data), void *data);

View File

@ -94,7 +94,17 @@ typedef int realtime_update(const char *database, const char *table, const char
typedef int realtime_update2(const char *database, const char *table, va_list ap);
typedef int realtime_store(const char *database, const char *table, va_list ap);
typedef int realtime_destroy(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap);
/*!
* \brief Function pointer called to ensure database schema is properly configured for realtime use
* \since 1.6.1
*/
typedef int realtime_require(const char *database, const char *table, va_list ap);
/*!
* \brief Function pointer called to clear the database cache and free resources used for such
* \since 1.6.1
*/
typedef int realtime_unload(const char *database, const char *table);
/*! \brief Configuration engine structure, used to define realtime drivers */
@ -227,6 +237,7 @@ struct ast_variable *ast_load_realtime_all(const char *family, ...) attribute_se
* facility; on reload, a front end resource may request to purge that cache.
* \retval 0 If any cache was purged
* \retval -1 If no cache was found
* \since 1.6.1
*/
int ast_unload_realtime(const char *family);
@ -259,6 +270,8 @@ int ast_unload_realtime(const char *family);
*
* Note that you should use the constant SENTINEL to terminate arguments, in
* order to preserve cross-platform compatibility.
*
* \since 1.6.1
*/
int ast_realtime_require_field(const char *family, ...) attribute_sentinel;

View File

@ -61,11 +61,16 @@ struct ast_datastore {
/*!
* \brief Create a data store object
* \param[in] info information describing the data store object
* \param[in] uid unique identifer
* \version 1.6.1 moved here and renamed from ast_channel_datastore_alloc
*/
struct ast_datastore *ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid);
/*!
* \brief Free a data store object
* \param[in] datastore datastore to free
* \version 1.6.1 moved here and renamed from ast_channel_datastore_free
*/
int ast_datastore_free(struct ast_datastore *datastore);

View File

@ -65,6 +65,7 @@ typedef enum ast_device_state (*ast_devstate_prov_cb_type)(const char *data);
* \brief Convert channel state to devicestate
*
* \param chanstate Current channel state
* \since 1.6.1
*/
enum ast_device_state ast_state_chan2dev(enum ast_channel_state chanstate);
@ -153,7 +154,8 @@ int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
int ast_devstate_changed_literal(enum ast_device_state state, const char *device);
/*!
* \brief Tells Asterisk the State for Device is changed
* \brief Tells Asterisk the State for Device is changed.
* (Accept change notification, add it to change queue.)
*
* \param fmt device name like a dial string with format parameters
*
@ -164,6 +166,7 @@ int ast_devstate_changed_literal(enum ast_device_state state, const char *device
* \retval -1 on failure
*
* \note This is deprecated in favor of ast_devstate_changed()
* \version 1.6.1 deprecated
*/
int ast_device_state_changed(const char *fmt, ...)
__attribute__((deprecated,format(printf, 1, 2)));
@ -180,6 +183,7 @@ int ast_device_state_changed(const char *fmt, ...)
* \retval -1 on failure
*
* \note This is deprecated in favor of ast_devstate_changed_literal()
* \version 1.6.1 deprecated
*/
int ast_device_state_changed_literal(const char *device)
__attribute__((deprecated));
@ -213,28 +217,31 @@ struct ast_devstate_aggregate;
/*!
* \brief Initialize aggregate device state
*
* \param agg the state object
* \param[in] agg the state object
*
* \return nothing
* \since 1.6.1
*/
void ast_devstate_aggregate_init(struct ast_devstate_aggregate *agg);
/*!
* \brief Add a device state to the aggregate device state
*
* \param agg the state object
* \param state the state to add
* \param[in] agg the state object
* \param[in] state the state to add
*
* \return nothing
* \since 1.6.1
*/
void ast_devstate_aggregate_add(struct ast_devstate_aggregate *agg, enum ast_device_state state);
/*!
* \brief Get the aggregate device state result
*
* \param agg the state object
* \param[in] agg the state object
*
* \return the aggregate device state after adding some number of device states.
* \since 1.6.1
*/
enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregate *agg);

View File

@ -40,6 +40,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_DLLIST_LOCK(head) \
ast_mutex_lock(&(head)->lock)
@ -52,6 +53,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_RWDLLIST_WRLOCK(head) \
ast_rwlock_wrlock(&(head)->lock)
@ -64,6 +66,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_RWDLLIST_RDLOCK(head) \
ast_rwlock_rdlock(&(head)->lock)
@ -76,6 +79,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_DLLIST_TRYLOCK(head) \
ast_mutex_trylock(&(head)->lock)
@ -88,6 +92,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_RWDLLIST_TRYWRLOCK(head) \
ast_rwlock_trywrlock(&(head)->lock)
@ -100,6 +105,7 @@
list head structure pointed to by head.
\retval 0 on success
\retval non-zero on failure
\since 1.6.1
*/
#define AST_RWDLLIST_TRYRDLOCK(head) \
ast_rwlock_tryrdlock(&(head)->lock)
@ -111,6 +117,7 @@
This macro attempts to remove an exclusive lock from the
list head structure pointed to by head. If the list
was not locked by this thread, this macro has no effect.
\since 1.6.1
*/
#define AST_DLLIST_UNLOCK(head) \
ast_mutex_unlock(&(head)->lock)
@ -122,6 +129,7 @@
This macro attempts to remove a read or write lock from the
list head structure pointed to by head. If the list
was not locked by this thread, this macro has no effect.
\since 1.6.1
*/
#define AST_RWDLLIST_UNLOCK(head) \
ast_rwlock_unlock(&(head)->lock)
@ -144,6 +152,7 @@
This would define \c struct \c entry_list, and declare an instance of it named
\a entries, all intended to hold a list of type \c struct \c entry.
\since 1.6.1
*/
#define AST_DLLIST_HEAD(name, type) \
struct name { \
@ -170,6 +179,7 @@ struct name { \
This would define \c struct \c entry_list, and declare an instance of it named
\a entries, all intended to hold a list of type \c struct \c entry.
\since 1.6.1
*/
#define AST_RWDLLIST_HEAD(name, type) \
struct name { \
@ -196,6 +206,7 @@ struct name { \
This would define \c struct \c entry_list, and declare an instance of it named
\a entries, all intended to hold a list of type \c struct \c entry.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_NOLOCK(name, type) \
struct name { \
@ -205,6 +216,7 @@ struct name { \
/*!
\brief Defines initial values for a declaration of AST_DLLIST_HEAD
\since 1.6.1
*/
#define AST_DLLIST_HEAD_INIT_VALUE { \
.first = NULL, \
@ -214,6 +226,7 @@ struct name { \
/*!
\brief Defines initial values for a declaration of AST_RWDLLIST_HEAD
\since 1.6.1
*/
#define AST_RWDLLIST_HEAD_INIT_VALUE { \
.first = NULL, \
@ -223,6 +236,7 @@ struct name { \
/*!
\brief Defines initial values for a declaration of AST_DLLIST_HEAD_NOLOCK
\since 1.6.1
*/
#define AST_DLLIST_HEAD_NOLOCK_INIT_VALUE { \
.first = NULL, \
@ -245,6 +259,7 @@ struct name { \
This would define \c struct \c entry_list, intended to hold a list of
type \c struct \c entry.
\since 1.6.1
*/
#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
#define AST_DLLIST_HEAD_STATIC(name, type) \
@ -287,6 +302,7 @@ struct name { \
This would define \c struct \c entry_list, intended to hold a list of
type \c struct \c entry.
\since 1.6.1
*/
#ifndef AST_RWLOCK_INIT_VALUE
#define AST_RWDLLIST_HEAD_STATIC(name, type) \
@ -317,6 +333,7 @@ struct name { \
\brief Defines a structure to be used to hold a list of specified type, statically initialized.
This is the same as AST_DLLIST_HEAD_STATIC, except without the lock included.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_NOLOCK_STATIC(name, type) \
struct name { \
@ -331,6 +348,7 @@ struct name { \
This macro initializes a list head structure by setting the head
entry to the supplied value and recreating the embedded lock.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_SET(head, entry) do { \
(head)->first = (entry); \
@ -345,6 +363,7 @@ struct name { \
This macro initializes a list head structure by setting the head
entry to the supplied value and recreating the embedded lock.
\since 1.6.1
*/
#define AST_RWDLLIST_HEAD_SET(head, entry) do { \
(head)->first = (entry); \
@ -359,6 +378,7 @@ struct name { \
This macro initializes a list head structure by setting the head
entry to the supplied value.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_SET_NOLOCK(head, entry) do { \
(head)->first = (entry); \
@ -381,6 +401,7 @@ struct name { \
\endcode
The field name \a list here is arbitrary, and can be anything you wish.
\since 1.6.1
*/
#define AST_DLLIST_ENTRY(type) \
struct { \
@ -393,6 +414,7 @@ struct { \
/*!
\brief Returns the first entry contained in a list.
\param head This is a pointer to the list head structure
\since 1.6.1
*/
#define AST_DLLIST_FIRST(head) ((head)->first)
@ -401,6 +423,7 @@ struct { \
/*!
\brief Returns the last entry contained in a list.
\param head This is a pointer to the list head structure
\since 1.6.1
*/
#define AST_DLLIST_LAST(head) ((head)->last)
@ -411,6 +434,7 @@ struct { \
\param elm This is a pointer to the current entry.
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\since 1.6.1
*/
#define AST_DLLIST_NEXT(elm, field) ((elm)->field.next)
@ -421,6 +445,7 @@ struct { \
\param elm This is a pointer to the current entry.
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\since 1.6.1
*/
#define AST_DLLIST_PREV(elm, field) ((elm)->field.prev)
@ -432,6 +457,7 @@ struct { \
\return non-zero if the list has entries
\return zero if not.
\since 1.6.1
*/
#define AST_DLLIST_EMPTY(head) (AST_DLLIST_FIRST(head) == NULL)
@ -472,6 +498,7 @@ struct { \
\li AST_DLLIST_INSERT_AFTER()
\li AST_DLLIST_INSERT_HEAD()
\li AST_DLLIST_INSERT_TAIL()
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE(head,var,field) \
for((var) = (head)->first; (var); (var) = (var)->field.next)
@ -513,6 +540,7 @@ struct { \
\li AST_DLLIST_INSERT_BEFORE()
\li AST_DLLIST_INSERT_HEAD()
\li AST_DLLIST_INSERT_TAIL()
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE_BACKWARDS(head,var,field) \
for((var) = (head)->last; (var); (var) = (var)->field.prev)
@ -551,6 +579,7 @@ struct { \
It differs from AST_DLLIST_TRAVERSE() in that the code inside the loop can modify
(or even free, after calling AST_DLLIST_REMOVE_CURRENT()) the entry pointed to by
the \a current pointer without affecting the loop traversal.
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE_SAFE_BEGIN(head, var, field) { \
typeof((head)) __list_head = head; \
@ -599,6 +628,7 @@ struct { \
It differs from AST_DLLIST_TRAVERSE() in that the code inside the loop can modify
(or even free, after calling AST_DLLIST_REMOVE_CURRENT()) the entry pointed to by
the \a current pointer without affecting the loop traversal.
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(head, var, field) { \
typeof((head)) __list_head = head; \
@ -624,6 +654,7 @@ struct { \
block; it is used to unlink the current entry from the list without affecting
the list traversal (and without having to re-traverse the list to modify the
previous entry, if any).
\since 1.6.1
*/
#define AST_DLLIST_REMOVE_CURRENT(field) do { \
__new_prev->field.next = NULL; \
@ -676,6 +707,7 @@ struct { \
\note This macro can \b only be used inside an AST_DLLIST_TRAVERSE_SAFE_BEGIN()
block.
\since 1.6.1
*/
#define AST_DLLIST_INSERT_BEFORE_CURRENT(elm, field) do { \
if (__list_prev) { \
@ -706,6 +738,7 @@ struct { \
\note This macro can \b only be used inside an AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN()
block. If you use this with the AST_DLLIST_TRAVERSE_SAFE_BEGIN(), be prepared for
strange things!
\since 1.6.1
*/
#define AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS(elm, field) do { \
if (__list_next) { \
@ -725,6 +758,7 @@ struct { \
/*!
\brief Closes a safe loop traversal block.
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE_SAFE_END }
@ -732,6 +766,7 @@ struct { \
/*!
\brief Closes a safe loop traversal block.
\since 1.6.1
*/
#define AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END }
@ -743,6 +778,7 @@ struct { \
This macro initializes a list head structure by setting the head
entry to \a NULL (empty list) and recreating the embedded lock.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_INIT(head) { \
(head)->first = NULL; \
@ -756,6 +792,7 @@ struct { \
This macro initializes a list head structure by setting the head
entry to \a NULL (empty list) and recreating the embedded lock.
\since 1.6.1
*/
#define AST_RWDLLIST_HEAD_INIT(head) { \
(head)->first = NULL; \
@ -770,6 +807,7 @@ struct { \
This macro destroys a list head structure by setting the head
entry to \a NULL (empty list) and destroying the embedded lock.
It does not free the structure from memory.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_DESTROY(head) { \
(head)->first = NULL; \
@ -784,6 +822,7 @@ struct { \
This macro destroys a list head structure by setting the head
entry to \a NULL (empty list) and destroying the embedded lock.
It does not free the structure from memory.
\since 1.6.1
*/
#define AST_RWDLLIST_HEAD_DESTROY(head) { \
(head)->first = NULL; \
@ -798,6 +837,7 @@ struct { \
This macro initializes a list head structure by setting the head
entry to \a NULL (empty list). There is no embedded lock handling
with this macro.
\since 1.6.1
*/
#define AST_DLLIST_HEAD_INIT_NOLOCK(head) { \
(head)->first = NULL; \
@ -812,6 +852,7 @@ struct { \
\param elm This is a pointer to the entry to be inserted.
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\since 1.6.1
*/
#define AST_DLLIST_INSERT_AFTER(head, listelm, elm, field) do { \
(elm)->field.next = (listelm)->field.next; \
@ -833,6 +874,7 @@ struct { \
\param elm This is a pointer to the entry to be inserted.
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\since 1.6.1
*/
#define AST_DLLIST_INSERT_BEFORE(head, listelm, elm, field) do { \
(elm)->field.next = (listelm); \
@ -852,6 +894,7 @@ struct { \
\param elm This is a pointer to the entry to be inserted.
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\since 1.6.1
*/
#define AST_DLLIST_INSERT_HEAD(head, elm, field) do { \
(elm)->field.next = (head)->first; \
@ -875,6 +918,7 @@ struct { \
Note: The link field in the appended entry is \b not modified, so if it is
actually the head of a list itself, the entire list will be appended
temporarily (until the next AST_DLLIST_INSERT_TAIL is performed).
\since 1.6.1
*/
#define AST_DLLIST_INSERT_TAIL(head, elm, field) do { \
if (!(head)->first) { \
@ -901,6 +945,7 @@ struct { \
Note: The source list (the \a list parameter) will be empty after
calling this macro (the list entries are \b moved to the target list).
\since 1.6.1
*/
#define AST_DLLIST_APPEND_DLLIST(head, list, field) do { \
if (!(head)->first) { \
@ -925,6 +970,7 @@ struct { \
Removes the head entry from the list, and returns a pointer to it.
This macro is safe to call on an empty list.
\since 1.6.1
*/
#define AST_DLLIST_REMOVE_HEAD(head, field) ({ \
typeof((head)->first) cur = (head)->first; \
@ -948,6 +994,7 @@ struct { \
\param field This is the name of the field (declared using AST_DLLIST_ENTRY())
used to link entries of this list together.
\warning The removed entry is \b not freed nor modified in any way.
\since 1.6.1
*/
#define AST_DLLIST_REMOVE(head, elm, field) ({ \
__typeof(elm) __res = (elm); \

View File

@ -50,6 +50,7 @@ struct ast_dnsmgr_entry;
* is already known.
*
* \return a DNS manager entry
* \version 1.6.1 result changed from struct in_addr to struct sockaddr_in to store port number
*/
struct ast_dnsmgr_entry *ast_dnsmgr_get(const char *name, struct sockaddr_in *result, const char *service);
@ -75,6 +76,7 @@ void ast_dnsmgr_release(struct ast_dnsmgr_entry *entry);
*
* \retval 0 success
* \retval non-zero failure
* \version 1.6.1 result changed from struct in_addr to struct aockaddr_in to store port number
*/
int ast_dnsmgr_lookup(const char *name, struct sockaddr_in *result, struct ast_dnsmgr_entry **dnsmgr, const char *service);

View File

@ -38,6 +38,7 @@
*
* \section apisandinterfaces Asterisk APIs and Interfaces
* \arg \ref AstAPI
* \arg \ref AstAPIChanges
* \arg \ref Def_Channel : What's a channel, anyway?
* \arg \ref channel_drivers : Existing channel drivers
* \arg \ref AstAMI : The Call management socket API
@ -444,6 +445,33 @@
* \arg See \ref Def_Channel
*/
/*! \page AstAPIChanges Asterisk API Changes
* \section Changes161 Version 1.6.1
* \li ast_install_vm_functions()
* \li vmwi_generate()
* \li ast_channel_datastore_alloc()
* \li ast_channel_datastore_free()
* \li ast_channel_cmpwhentohangup()
* \li ast_channel_setwhentohangup()
* \li ast_settimeout()
* \li ast_datastore_alloc()
* \li ast_datastore_free()
* \li ast_device_state_changed()
* \li ast_device_state_changed_literal()
* \li ast_dnsmgr_get()
* \li ast_dnsmgr_lookup()
* \li ast_dsp_set_digitmode()
* \li ast_get_txt()
* \li ast_event_unsubscribe()
* \li localized_context_find_or_create()
* \li localized_merge_contexts_and_delete()
* \li ast_console_puts_mutable()
* \li ast_rtp_get_quality()
* \li ast_tcptls_client_start()
* \li ast_tcptls_server_start()
* \li ast_tcptls_server_stop()
*/
/*!
* \page AstDebug Debugging
* \section debug Debugging

View File

@ -92,8 +92,11 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
number of seconds of silence */
int ast_dsp_silence(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence);
/*! \brief Return non-zero if this is noise. Updates "totalnoise" with the total
number of seconds of noise */
/*!
* \brief Return non-zero if this is noise. Updates "totalnoise" with the total
* number of seconds of noise
* \since 1.6.1
*/
int ast_dsp_noise(struct ast_dsp *dsp, struct ast_frame *f, int *totalnoise);
/*! \brief Return non-zero if historically this should be a busy, request that
@ -115,14 +118,19 @@ void ast_dsp_set_features(struct ast_dsp *dsp, int features);
/*! \brief Get pending DTMF/MF digits */
int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
/*! \brief Set digit mode */
/*! \brief Set digit mode
* \version 1.6.1 renamed from ast_dsp_digitmode to ast_dsp_set_digitmode
*/
int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode);
/*! \brief Set fax mode */
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
/*! \brief Returns true if DSP code was muting any fragment of the last processed frame.
Muting (squelching) happens when DSP code removes DTMF/MF/generic tones from the audio */
/*!
* \brief Returns true if DSP code was muting any fragment of the last processed frame.
* Muting (squelching) happens when DSP code removes DTMF/MF/generic tones from the audio
* \since 1.6.1
*/
int ast_dsp_was_muted(struct ast_dsp *dsp);
/*! \brief Get tstate (Tone State) */
@ -131,12 +139,22 @@ int ast_dsp_get_tstate(struct ast_dsp *dsp);
/*! \brief Get tcount (Threshold counter) */
int ast_dsp_get_tcount(struct ast_dsp *dsp);
/*! \brief Get silence threshold from dsp.conf*/
/*!
* \brief Get silence threshold from dsp.conf
* \since 1.6.1
*/
int ast_dsp_get_threshold_from_settings(enum threshold which);
/* \brief Reloads dsp settings from dsp.conf*/
/*!
* \brief Reloads dsp settings from dsp.conf
* \since 1.6.1
*/
int ast_dsp_reload(void);
/*!
* \brief Load dsp settings from dsp.conf
* \since 1.6.1
*/
int ast_dsp_init(void);
/*!

View File

@ -79,12 +79,21 @@ struct enum_context {
int ast_get_enum(struct ast_channel *chan, const char *number, char *location, int maxloc, char *technology,
int maxtech, char* suffix, char* options, unsigned int record, struct enum_context **argcontext);
/*! \brief Lookup DNS TXT record (used by app TXTCIDnum
\param chan Channel
\param number E164 number with or without the leading +
\param txt Text string (return value)
\param maxtxt Max length of "txt"
\param suffix Zone suffix
/*! \brief Lookup DNS TXT record (used by app TXTCIDnum)
*
* Really has nothing to do with enum, but anyway...
* Actually, there is now an internet-draft which describes how callerID should
* be stored in ENUM domains: draft-ietf-enum-cnam-04.txt
* The algorithm implemented here will thus be obsolete soon.
*
* \param chan Channel
* \param number E164 number with or without the leading +
* \param txt Text string (return value)
* \param maxtxt Max length of "txt"
* \param suffix Zone suffix
* \version 1.6.1 new suffix parameter to take into account caller ids that aren't in e164.arpa
* \version 1.6.1 removed parameters location, maxloc, technology, maxtech as all the information
* is stored the txt string
*/
int ast_get_txt(struct ast_channel *chan, const char *number, char *txt, int maxtxt, char *suffix);

View File

@ -116,14 +116,15 @@ struct ast_event_sub *ast_event_subscribe(enum ast_event_type event_type,
/*!
* \brief Allocate a subscription, but do not activate it
*
* \arg type the event type to subscribe to
* \arg cb the function to call when an event matches this subscription
* \arg userdata data to pass to the provided callback
* \param type the event type to subscribe to
* \param cb the function to call when an event matches this subscription
* \param userdata data to pass to the provided callback
*
* This function should be used when you want to dynamically build a
* subscription.
*
* \return the allocated subscription, or NULL on failure
* \since 1.6.1
*/
struct ast_event_sub *ast_event_subscribe_new(enum ast_event_type type,
ast_event_cb_t cb, void *userdata);
@ -131,24 +132,26 @@ struct ast_event_sub *ast_event_subscribe_new(enum ast_event_type type,
/*!
* \brief Destroy an allocated subscription
*
* \arg sub the subscription to destroy
* \param sub the subscription to destroy
*
* This function should be used when a subscription is allocated with
* ast_event_subscribe_new(), but for some reason, you want to destroy it
* instead of activating it. This could be because of an error when
* reading in the configuration for the dynamically built subscription.
* \since 1.6.1
*/
void ast_event_sub_destroy(struct ast_event_sub *sub);
/*!
* \brief Append a uint parameter to a subscription
*
* \arg sub the dynamic subscription allocated with ast_event_subscribe_new()
* \arg ie_type the information element type for the parameter
* \arg uint the value that must be present in the event to match this subscription
* \param sub the dynamic subscription allocated with ast_event_subscribe_new()
* \param ie_type the information element type for the parameter
* \param uint the value that must be present in the event to match this subscription
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_sub_append_ie_uint(struct ast_event_sub *sub,
enum ast_event_ie_type ie_type, uint32_t uint);
@ -156,12 +159,13 @@ int ast_event_sub_append_ie_uint(struct ast_event_sub *sub,
/*!
* \brief Append a string parameter to a subscription
*
* \arg sub the dynamic subscription allocated with ast_event_subscribe_new()
* \arg ie_type the information element type for the parameter
* \arg str the string that must be present in the event to match this subscription
* \param sub the dynamic subscription allocated with ast_event_subscribe_new()
* \param ie_type the information element type for the parameter
* \param str the string that must be present in the event to match this subscription
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_sub_append_ie_str(struct ast_event_sub *sub,
enum ast_event_ie_type ie_type, const char *str);
@ -169,12 +173,13 @@ int ast_event_sub_append_ie_str(struct ast_event_sub *sub,
/*!
* \brief Append a raw parameter to a subscription
*
* \arg sub the dynamic subscription allocated with ast_event_subscribe_new()
* \arg ie_type the information element type for the parameter
* \arg raw the data that must be present in the event to match this subscription
* \param sub the dynamic subscription allocated with ast_event_subscribe_new()
* \param ie_type the information element type for the parameter
* \param raw the data that must be present in the event to match this subscription
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_sub_append_ie_raw(struct ast_event_sub *sub,
enum ast_event_ie_type ie_type, void *data, size_t raw_datalen);
@ -182,12 +187,13 @@ int ast_event_sub_append_ie_raw(struct ast_event_sub *sub,
/*!
* \brief Append an 'exists' parameter to a subscription
*
* \arg sub the dynamic subscription allocated with ast_event_subscribe_new()
* \arg ie_type the information element type that must be present in the event
* \param sub the dynamic subscription allocated with ast_event_subscribe_new()
* \param ie_type the information element type that must be present in the event
* for it to match this subscription.
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_sub_append_ie_exists(struct ast_event_sub *sub,
enum ast_event_ie_type ie_type);
@ -195,7 +201,7 @@ int ast_event_sub_append_ie_exists(struct ast_event_sub *sub,
/*!
* \brief Activate a dynamically built subscription
*
* \arg sub the subscription to activate that was allocated using
* \param sub the subscription to activate that was allocated using
* ast_event_subscribe_new()
*
* Once a dynamically built subscription has had all of the parameters added
@ -203,6 +209,7 @@ int ast_event_sub_append_ie_exists(struct ast_event_sub *sub,
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_sub_activate(struct ast_event_sub *sub);
@ -216,6 +223,7 @@ int ast_event_sub_activate(struct ast_event_sub *sub);
* structures.
*
* \return NULL for convenience.
* \version 1.6.1 return changed to NULL
*/
struct ast_event_sub *ast_event_unsubscribe(struct ast_event_sub *event_sub);
@ -274,7 +282,10 @@ enum ast_event_subscriber_res ast_event_check_subscriber(enum ast_event_type eve
*/
void ast_event_report_subs(const struct ast_event_sub *sub);
/*! \brief Dump the event cache for the subscriber */
/*!
* \brief Dump the event cache for the subscriber
* \since 1.6.1
*/
void ast_event_dump_cache(const struct ast_event_sub *event_sub);
/*!
@ -513,18 +524,20 @@ const void *ast_event_get_ie_raw(const struct ast_event *event, enum ast_event_i
/*!
* \brief Get the string representation of an information element type
*
* \arg ie_type the information element type to get the string representation of
* \param ie_type the information element type to get the string representation of
*
* \return the string representation of the information element type
* \since 1.6.1
*/
const char *ast_event_get_ie_type_name(enum ast_event_ie_type ie_type);
/*!
* \brief Get the payload type for a given information element type
*
* \arg ie_type the information element type to get the payload type of
* \param ie_type the information element type to get the payload type of
*
* \return the payload type for the provided IE type
* \since 1.6.1
*/
enum ast_event_ie_pltype ast_event_get_ie_pltype(enum ast_event_ie_type ie_type);
@ -544,28 +557,31 @@ enum ast_event_type ast_event_get_type(const struct ast_event *event);
* \arg event the event to get the type of
*
* \return the string representation of the event type of the provided event
* \since 1.6.1
*/
const char *ast_event_get_type_name(const struct ast_event *event);
/*!
* \brief Convert a string into an event type
*
* \arg str the string to convert
* \arg event_type an output parameter for the event type
* \param str the string to convert
* \param event_type an output parameter for the event type
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_str_to_event_type(const char *str, enum ast_event_type *event_type);
/*!
* \brief Convert a string to an IE type
*
* \arg str the string to convert
* \arg ie_type an output parameter for the IE type
* \param str the string to convert
* \param ie_type an output parameter for the IE type
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_event_str_to_ie_type(const char *str, enum ast_event_ie_type *ie_type);
@ -575,6 +591,7 @@ int ast_event_str_to_ie_type(const char *str, enum ast_event_ie_type *ie_type);
* \param event the event to get the size of
*
* \return the number of bytes contained in the event
* \since 1.6.1
*/
size_t ast_event_get_size(const struct ast_event *event);

View File

@ -180,6 +180,10 @@ struct ast_sw *localized_walk_context_switches(struct ast_context *con,
void localized_context_destroy(struct ast_context *con, const char *registrar);
int localized_pbx_load_module(void);
/*!
* \version 1.6.1 added tab parameter
* \version 1.6.1 renamed function from localized_context_create to localized_context_find_or_create
*/
struct ast_context *localized_context_find_or_create(struct ast_context **extcontexts, void *tab, const char *name, const char *registrar);
int localized_pbx_builtin_setvar(struct ast_channel *chan, void *data);
int localized_context_add_ignorepat2(struct ast_context *con, const char *value, const char *registrar);
@ -191,6 +195,10 @@ int localized_add_extension2(struct ast_context *con,
int replace, const char *extension, int priority, const char *label, const char *callerid,
const char *application, void *data, void (*datad)(void *),
const char *registrar);
/*!
* \version 1.6.1 added tab parameter
*/
void localized_merge_contexts_and_delete(struct ast_context **extcontexts, void *tab, const char *registrar);
int localized_context_verify_includes(struct ast_context *con);
void localized_use_conf_dir(void);

View File

@ -49,6 +49,8 @@ struct ast_heap;
*
* \note This implementation is of a max heap. However, if a min heap is
* desired, simply swap the return values of this function.
*
* \since 1.6.1
*/
typedef int (*ast_heap_cmp_fn)(void *elm1, void *elm2);
@ -93,6 +95,7 @@ typedef int (*ast_heap_cmp_fn)(void *elm1, void *elm2);
* \endcode
*
* \return An instance of a max heap
* \since 1.6.1
*/
struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
ssize_t index_offset);
@ -103,6 +106,7 @@ struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_f
* \param h the heap to destroy
*
* \return NULL for convenience
* \since 1.6.1
*/
struct ast_heap *ast_heap_destroy(struct ast_heap *h);
@ -114,6 +118,7 @@ struct ast_heap *ast_heap_destroy(struct ast_heap *h);
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_heap_push(struct ast_heap *h, void *elm);
@ -126,6 +131,7 @@ int ast_heap_push(struct ast_heap *h, void *elm);
* largest value according to the element comparison function that was
* provided when the heap was created. The element will be removed before
* being returned.
* \since 1.6.1
*/
void *ast_heap_pop(struct ast_heap *h);
@ -139,6 +145,7 @@ void *ast_heap_pop(struct ast_heap *h);
*
* \note the index_offset parameter to ast_heap_create() is required to be able
* to use this function.
* \since 1.6.1
*/
void *ast_heap_remove(struct ast_heap *h, void *elm);
@ -177,6 +184,7 @@ void *ast_heap_remove(struct ast_heap *h, void *elm);
* ast_heap_unlock(h);
*
* \endcode
* \since 1.6.1
*/
void *ast_heap_peek(struct ast_heap *h, unsigned int index);
@ -186,41 +194,45 @@ void *ast_heap_peek(struct ast_heap *h, unsigned int index);
* \param h the heap
*
* \return the number of elements currently in the heap
* \since 1.6.1
*/
size_t ast_heap_size(struct ast_heap *h);
/*!
* \brief Write-Lock a heap
*
* \arg h the heap
* \param h the heap
*
* A lock is provided for convenience. It can be assumed that none of the
* ast_heap API calls are thread safe. This lock does not have to be used
* if another one is already available to protect the heap.
*
* \return see the documentation for pthread_rwlock_wrlock()
* \since 1.6.1
*/
int ast_heap_wrlock(struct ast_heap *h);
/*!
* \brief Read-Lock a heap
*
* \arg h the heap
* \param h the heap
*
* A lock is provided for convenience. It can be assumed that none of the
* ast_heap API calls are thread safe. This lock does not have to be used
* if another one is already available to protect the heap.
*
* \return see the documentation for pthread_rwlock_rdlock()
* \since 1.6.1
*/
int ast_heap_rdlock(struct ast_heap *h);
/*!
* \brief Unlock a heap
*
* \arg h the heap
* \param h the heap
*
* \return see the documentation for pthread_rwlock_unlock()
* \since 1.6.1
*/
int ast_heap_unlock(struct ast_heap *h);
@ -234,6 +246,7 @@ int ast_heap_unlock(struct ast_heap *h);
*
* \note This function is mostly for debugging purposes. It traverses an existing
* heap and verifies that every node is properly placed relative to its children.
* \since 1.6.1
*/
int ast_heap_verify(struct ast_heap *h);

View File

@ -109,7 +109,12 @@ void ast_http_uri_unlink_all_with_key(const char *key);
/*! \brief Return an ast_str malloc()'d string containing an HTTP error message */
struct ast_str *ast_http_error(int status, const char *title, const char *extra_header, const char *text);
/*! \brief Return the current prefix */
/*!
* \brief Return the current prefix
* \param buf[out] destination buffer for previous
* \param len[in] length of prefix to copy
* \since 1.6.1
*/
void ast_http_prefix(char *buf, int len);
#endif /* _ASTERISK_SRV_H */

View File

@ -701,6 +701,7 @@ struct { \
* \param elm Pointer to the entry to be inserted
* \param field Name of the list entry field (declared using AST_LIST_ENTRY())
* \param sortfield Name of the field on which the list is sorted
* \since 1.6.1
*/
#define AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) do { \
if (!(head)->first) { \

View File

@ -240,6 +240,8 @@ static inline void __dump_backtrace(struct ast_bt *bt, int canlog)
* that is unexpectedly but momentarily locked, and you wonder who
* are fighting with for the lock, this routine could be called, IF
* you have the thread debugging stuff turned on.
* \param this_lock_addr lock address to return lock information
* \since 1.6.1
*/
void log_show_lock(void *this_lock_addr);
@ -963,7 +965,18 @@ struct ast_rwlock_info {
typedef struct ast_rwlock_info ast_rwlock_t;
/*!
* \brief wrapper for rwlock with tracking enabled
* \return 0 on success, non zero for error
* \since 1.6.1
*/
#define ast_rwlock_init(rwlock) __ast_rwlock_init(1, __FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)
/*!
* \brief wrapper for ast_rwlock_init with tracking disabled
* \return 0 on success, non zero for error
* \since 1.6.1
*/
#define ast_rwlock_init_notracking(rwlock) __ast_rwlock_init(0, __FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)
#define ast_rwlock_destroy(rwlock) __ast_rwlock_destroy(__FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)

View File

@ -89,9 +89,18 @@ int ast_unregister_verbose(void (*verboser)(const char *string)) attribute_warn_
void ast_console_puts(const char *string);
/*!
* \brief log the string to the console, and all attached
* console clients
* \version 1.6.1 added level parameter
*/
void ast_console_puts_mutable(const char *string, int level);
void ast_console_toggle_mute(int fd, int silent);
void ast_console_toggle_loglevel(int fd, int leve, int state);
/*!
* \since 1.6.1
*/
void ast_console_toggle_loglevel(int fd, int level, int state);
/* Note: The AST_LOG_* macros below are the same as
* the LOG_* macros and are intended to eventually replace
@ -245,6 +254,7 @@ struct ast_bt {
* Allocates memory for an ast_bt and stores addresses and symbols.
*
* \return Returns NULL on failure, or the allocated ast_bt on success
* \since 1.6.1
*/
struct ast_bt *ast_bt_create(void);
@ -253,6 +263,7 @@ struct ast_bt *ast_bt_create(void);
*
* \retval 0 Success
* \retval -1 Failure
* \since 1.6.1
*/
int ast_bt_get_addresses(struct ast_bt *bt);
@ -261,6 +272,7 @@ int ast_bt_get_addresses(struct ast_bt *bt);
* Free dynamically allocated portions of an ast_bt
*
* \retval NULL.
* \since 1.6.1
*/
void *ast_bt_destroy(struct ast_bt *bt);

View File

@ -219,6 +219,7 @@ int reload_manager(void);
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int astman_datastore_add(struct mansession *s, struct ast_datastore *datastore);
@ -228,6 +229,7 @@ int astman_datastore_add(struct mansession *s, struct ast_datastore *datastore);
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int astman_datastore_remove(struct mansession *s, struct ast_datastore *datastore);
@ -236,6 +238,7 @@ int astman_datastore_remove(struct mansession *s, struct ast_datastore *datastor
*
* \retval pointer to the datastore if found
* \retval NULL if not found
* \since 1.6.1
*/
struct ast_datastore *astman_datastore_find(struct mansession *s, const struct ast_datastore_info *info, const char *uid);

View File

@ -952,7 +952,9 @@ int pbx_set_extenpatternmatchnew(int newval);
/*! Set "overrideswitch" field. If set and of nonzero length, all contexts
* will be tried directly through the named switch prior to any other
* matching within that context. */
* matching within that context.
* \since 1.6.1
*/
void pbx_set_overrideswitch(const char *newval);
/*!

View File

@ -184,6 +184,7 @@ SQLHSTMT ast_odbc_prepare_and_execute(struct odbc_obj *obj, SQLHSTMT (*prepare_c
* \retval A structure describing the table layout, or NULL, if the table is not found or another error occurs.
* When a structure is returned, the contained columns list will be
* rdlock'ed, to ensure that it will be retained in memory.
* \since 1.6.1
*/
struct odbc_cache_tables *ast_odbc_find_table(const char *database, const char *tablename);
@ -192,6 +193,7 @@ struct odbc_cache_tables *ast_odbc_find_table(const char *database, const char *
* \param table Cached table structure, as returned from ast_odbc_find_table()
* \param colname The column name requested
* \retval A structure describing the column type, or NULL, if the column is not found.
* \since 1.6.1
*/
struct odbc_cache_columns *ast_odbc_find_column(struct odbc_cache_tables *table, const char *colname);
@ -200,6 +202,7 @@ struct odbc_cache_columns *ast_odbc_find_column(struct odbc_cache_tables *table,
* \param database Name of an ODBC class (used to ensure like-named tables in different databases are not confused)
* \param table Tablename for which a cached record should be removed
* \retval 0 if the cache entry was removed, or -1 if no matching entry was found.
* \since 1.6.1
*/
int ast_odbc_clear_cache(const char *database, const char *tablename);

View File

@ -327,13 +327,19 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
having to send a re-invite later */
int ast_rtp_early_bridge(struct ast_channel *c0, struct ast_channel *c1);
/*! \brief Get QOS stats on a RTP channel */
/*! \brief Get QOS stats on a RTP channel
* \since 1.6.1
*/
int ast_rtp_get_qos(struct ast_rtp *rtp, const char *qos, char *buf, unsigned int buflen);
/*! \brief Return RTP and RTCP QoS values */
/*! \brief Return RTP and RTCP QoS values
* \since 1.6.1
*/
unsigned int ast_rtp_get_qosvalue(struct ast_rtp *rtp, enum ast_rtp_qos_vars value);
/*! \brief Set RTPAUDIOQOS(...) variables on a channel when it is being hung up */
/*! \brief Set RTPAUDIOQOS(...) variables on a channel when it is being hung up
* \since 1.6.1
*/
void ast_rtp_set_vars(struct ast_channel *chan, struct ast_rtp *rtp);
/*! \brief Return RTCP quality string
@ -355,6 +361,7 @@ void ast_rtp_set_vars(struct ast_channel *chan, struct ast_rtp *rtp);
* other types are RTPQOS_JITTER, RTPQOS_LOSS and
* RTPQOS_RTT which will return more specific
* statistics.
* \version 1.6.1 added qtype parameter
*/
char *ast_rtp_get_quality(struct ast_rtp *rtp, struct ast_rtp_quality *qual, enum ast_rtp_quality_type qtype);
/*! \brief Send an H.261 fast update request. Some devices need this rather than the XML message in SIP */
@ -393,12 +400,10 @@ void ast_rtp_set_rtptimers_onhold(struct ast_rtp *rtp);
* \param red_pt payloadtype for RTP packet
* \param pt payloadtype numbers for each generation including primary data
* \param num_gen number of redundant generations, primary data excluded
* \since 1.6.1
*/
int rtp_red_init(struct ast_rtp *rtp, int ti, int *pt, int num_gen);
void red_init(struct rtp_red *red, const struct ast_frame *f);
/*! \brief Buffer t.140 data */
void red_buffer_t140(struct ast_rtp *rtp, struct ast_frame *f);

View File

@ -61,6 +61,11 @@ extern "C" {
(_sched_res); \
})
/*!
* \brief schedule task to get deleted and call unref function
* \sa AST_SCHED_DEL
* \since 1.6.1
*/
#define AST_SCHED_DEL_UNREF(sched, id, refcall) \
do { \
int _count = 0; \
@ -74,6 +79,10 @@ extern "C" {
id = -1; \
} while (0);
/*!
* \brief schedule task to get deleted releasing the lock between attempts
* \since 1.6.1
*/
#define AST_SCHED_DEL_SPINLOCK(sched, id, lock) \
({ \
int _count = 0; \
@ -104,6 +113,10 @@ extern "C" {
#define AST_SCHED_REPLACE(id, sched, when, callback, data) \
AST_SCHED_REPLACE_VARIABLE(id, sched, when, callback, data, 0)
/*!
* \note Not currently used in the source?
* \since 1.6.1
*/
#define AST_SCHED_REPLACE_VARIABLE_UNREF(id, sched, when, callback, data, variable, unrefcall, addfailcall, refcall) \
do { \
int _count = 0, _res=1; \
@ -152,6 +165,14 @@ struct ast_cb_names {
char *list[10];
ast_sched_cb cblist[10];
};
/*!
* \brief Show statics on what it is in the schedule queue
* \param con Schedule context to check
* \param buf dynamic string to store report
* \param cbnames to check against
* \since 1.6.1
*/
void ast_sched_report(struct sched_context *con, struct ast_str **buf, struct ast_cb_names *cbnames);
/*! \brief Adds a scheduled event
@ -209,10 +230,12 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal
int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) attribute_warn_unused_result;
/*! \brief Find a sched structure and return the data field associated with it.
/*!
* \brief Find a sched structure and return the data field associated with it.
* \param con scheduling context in which to search fro the matching id
* \param id ID of the scheduled item to find
* \return the data field from the matching sched struct if found; else return NULL if not found.
* \since 1.6.1
*/
const void *ast_sched_find_data(struct sched_context *con, int id);

View File

@ -70,7 +70,9 @@ enum ast_tps_options {
* \param create Use 0 by default or specify TPS_REF_IF_EXISTS to return NULL if the taskprocessor does
* not already exist
* return A pointer to a reference counted taskprocessor under normal conditions, or NULL if the
* TPS_REF_IF_EXISTS reference type is specified and the taskprocessor does not exist */
* TPS_REF_IF_EXISTS reference type is specified and the taskprocessor does not exist
* \since 1.6.1
*/
struct ast_taskprocessor *ast_taskprocessor_get(char *name, enum ast_tps_options create);
/*! \brief Unreference the specified taskprocessor and its reference count will decrement.
@ -78,17 +80,23 @@ struct ast_taskprocessor *ast_taskprocessor_get(char *name, enum ast_tps_options
* Taskprocessors use astobj2 and will unlink from the taskprocessor singleton container and destroy
* themself when the taskprocessor reference count reaches zero.
* \param tps taskprocessor to unreference
* \return NULL */
* \return NULL
* \since 1.6.1
*/
void *ast_taskprocessor_unreference(struct ast_taskprocessor *tps);
/*! \brief Push a task into the specified taskprocessor queue and signal the taskprocessor thread
* \param tps The taskprocessor structure
* \param task_exe The task handling function to push into the taskprocessor queue
* \param datap The data to be used by the task handling function
* \return zero on success, -1 on failure */
* \return zero on success, -1 on failure
* \since 1.6.1
*/
int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *datap), void *datap);
/*! \brief Return the name of the taskprocessor singleton */
/*! \brief Return the name of the taskprocessor singleton
* \since 1.6.1
*/
const char *ast_taskprocessor_name(struct ast_taskprocessor *tps);
#endif

View File

@ -149,10 +149,27 @@ struct ast_tcptls_session_instance {
#define LEN_T size_t
#endif
/*!
* \brief A generic client routine for a TCP client
* and starts a thread for handling accept()
* \version 1.6.1 changed desc parameter to be of ast_tcptls_session_args type
*/
struct ast_tcptls_session_instance *ast_tcptls_client_start(struct ast_tcptls_session_args *desc);
void *ast_tcptls_server_root(void *);
/*!
* \brief This is a generic (re)start routine for a TCP server,
* which does the socket/bind/listen and starts a thread for handling
* accept().
* \version 1.6.1 changed desc parameter to be of ast_tcptls_session_args type
*/
void ast_tcptls_server_start(struct ast_tcptls_session_args *desc);
/*!
* \brief Shutdown a running server if there is one
* \version 1.6.1 changed desc parameter to be of ast_tcptls_session_args type
*/
void ast_tcptls_server_stop(struct ast_tcptls_session_args *desc);
int ast_ssl_setup(struct ast_tls_config *cfg);

View File

@ -92,6 +92,7 @@ struct ast_timing_interface {
*
* \retval NULL failure
* \retval non-Null handle to be passed to ast_unregister_timing_interface() on success
* \since 1.6.1
*/
#define ast_register_timing_interface(i) _ast_register_timing_interface(i, ast_module_info->self)
void *_ast_register_timing_interface(struct ast_timing_interface *funcs,
@ -105,6 +106,7 @@ void *_ast_register_timing_interface(struct ast_timing_interface *funcs,
*
* \retval 0 success
* \retval non-zero failure
* \since 1.6.1
*/
int ast_unregister_timing_interface(void *handle);
@ -113,6 +115,7 @@ int ast_unregister_timing_interface(void *handle);
*
* \retval -1 error, with errno set
* \retval >=0 success
* \since 1.6.1
*/
int ast_timer_open(void);
@ -122,6 +125,7 @@ int ast_timer_open(void);
* \param handle timing fd returned from timer_open()
*
* \return nothing
* \since 1.6.1
*/
void ast_timer_close(int handle);
@ -137,6 +141,7 @@ void ast_timer_close(int handle);
*
* \retval -1 error, with errno set
* \retval 0 success
* \since 1.6.1
*/
int ast_timer_set_rate(int handle, unsigned int rate);
@ -150,6 +155,7 @@ int ast_timer_set_rate(int handle, unsigned int rate);
* returned AST_TIMING_EVENT_EXPIRED.
*
* \return nothing
* \since 1.6.1
*/
void ast_timer_ack(int handle, unsigned int quantity);
@ -163,6 +169,7 @@ void ast_timer_ack(int handle, unsigned int quantity);
*
* \retval -1 failure, with errno set
* \retval 0 success
* \since 1.6.1
*/
int ast_timer_enable_continuous(int handle);
@ -173,6 +180,7 @@ int ast_timer_enable_continuous(int handle);
*
* \retval -1 failure, with errno set
* \retval 0 success
* \since 1.6.1
*/
int ast_timer_disable_continuous(int handle);
@ -185,6 +193,7 @@ int ast_timer_disable_continuous(int handle);
* be called to find out what triggered it.
*
* \return which event triggered the timing fd
* \since 1.6.1
*/
enum ast_timer_event ast_timer_get_event(int handle);
@ -194,6 +203,7 @@ enum ast_timer_event ast_timer_get_event(int handle);
* \param handle timing fd returned by timer_open()
*
* \return maximum rate supported for timing handle
* \since 1.6.1
*/
unsigned int ast_timer_get_max_rate(int handle);

View File

@ -118,6 +118,9 @@ void ast_udptl_stop(struct ast_udptl *udptl);
void ast_udptl_init(void);
/*!
* \version 1.6.1 return changed to int
*/
int ast_udptl_reload(void);
#if defined(__cplusplus) || defined(c_plusplus)

View File

@ -705,11 +705,13 @@ extern struct ast_eid g_eid;
/*!
* \brief Fill in an ast_eid with the default eid of this machine
* \since 1.6.1
*/
void ast_set_default_eid(struct ast_eid *eid);
/*!
* /brief Convert an EID to a string
* \since 1.6.1
*/
char *ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid);
@ -720,6 +722,7 @@ char *ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid);
* 00:11:22:33:44:55
*
* \return 0 success, non-zero failure
* \since 1.6.1
*/
int ast_str_to_eid(struct ast_eid *eid, const char *s);
@ -727,6 +730,7 @@ int ast_str_to_eid(struct ast_eid *eid, const char *s);
* \brief Compare two EIDs
*
* \return 0 if the two are the same, non-zero otherwise
* \since 1.6.1
*/
int ast_eid_cmp(const struct ast_eid *eid1, const struct ast_eid *eid2);

View File

@ -514,7 +514,6 @@ int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
return ast_devstate_changed_literal(state, buf);
}
/*! \brief Accept change notification, add it to change queue */
int ast_device_state_changed(const char *fmt, ...)
{
char buf[AST_MAX_EXTENSION];

View File

@ -915,14 +915,6 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
return ret;
}
/*!\brief Get TXT record from DNS.
* Really has nothing to do with enum, but anyway...
*
* Actually, there is now an internet-draft which describes how callerID should
* be stored in ENUM domains: draft-ietf-enum-cnam-04.txt
*
* The algorithm implemented here will thus be obsolete soon.
*/
int ast_get_txt(struct ast_channel *chan, const char *number, char *txt, int txtlen, char *suffix)
{
struct txt_context context;

View File

@ -326,9 +326,6 @@ int ast_ssl_setup(struct ast_tls_config *cfg)
return __ssl_setup(cfg, 0);
}
/*! \brief A generic client routine for a TCP client
* and starts a thread for handling accept()
*/
struct ast_tcptls_session_instance *ast_tcptls_client_start(struct ast_tcptls_session_args *desc)
{
int flags;
@ -408,11 +405,6 @@ error:
return NULL;
}
/*! \brief
* This is a generic (re)start routine for a TCP server,
* which does the socket/bind/listen and starts a thread for handling
* accept().
*/
void ast_tcptls_server_start(struct ast_tcptls_session_args *desc)
{
int flags;
@ -476,7 +468,6 @@ error:
desc->accept_fd = -1;
}
/*! \brief Shutdown a running server if there is one */
void ast_tcptls_server_stop(struct ast_tcptls_session_args *desc)
{
if (desc->master != AST_PTHREADT_NULL) {