}
/*!
- * \internal \brief Determine if a queue member is available
+ * \internal
+ * \brief Determine if a queue member is available
* \retval 1 if the member is available
* \retval 0 if the member is not available
*/
return res;
}
-/*! \internal \brief Create and initialize UDPTL for the specified dialog
+/*!
+ * \internal
+ * \brief Create and initialize UDPTL for the specified dialog
+ *
* \param p SIP private structure to create UDPTL object for
* \pre p is locked
* \pre p->owner is locked
return 0;
}
-/*! \internal \brief Find the channel that is causing the RINGING update, ref'd */
+/*!
+ * \internal
+ * \brief Find the channel that is causing the RINGING update, ref'd
+ */
static struct ast_channel *find_ringing_channel(struct ao2_container *device_state_info, struct sip_pvt *p)
{
struct ao2_iterator citer;
}
}
-/*! \internal \brief Create a new route
+/*!
+ * \internal
+ * \brief Create a new route
+ *
* \retval NULL on error
* \retval sip_route on success
*/
return route;
}
-/*! \internal \brief copy route-set
+/*!
+ * \internal
+ * \brief copy route-set
+ *
* \retval non-zero on failure
* \retval 0 on success
*/
ast_sockaddr_split_hostport(*hostport, hostport, &dont_care, PARSE_PORT_IGNORE);
}
-/*! \internal \brief Helper function to update a peer's lastmsgssent value
+/*!
+ * \internal
+ * \brief Helper function to update a peer's lastmsgssent value
*/
static void update_peer_lastmsgssent(struct sip_peer *peer, int value, int locked)
{
}
-/*! \brief Verify registration of user
- - Registration is done in several steps, first a REGISTER without auth
- to get a challenge (nonce) then a second one with auth
- - Registration requests are only matched with peers that are marked as "dynamic"
+/*!
+ * \brief Verify registration of user
+ *
+ * \details
+ * - Registration is done in several steps, first a REGISTER without auth
+ * to get a challenge (nonce) then a second one with auth
+ * - Registration requests are only matched with peers that are marked as "dynamic"
*/
static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sockaddr *addr,
- struct sip_request *req, const char *uri)
+ struct sip_request *req, const char *uri)
{
enum check_auth_result res = AUTH_NOT_FOUND;
struct sip_peer *peer;
return handler_result;
}
-/*! \internal \brief Subscribe to MWI events for the specified peer
+/*!
+ * \internal
+ * \brief Subscribe to MWI events for the specified peer
+ *
* \note The peer cannot be locked during this method. sip_send_mwi_peer will
* attempt to lock the peer after the event subscription lock is held; if the peer is locked during
* this method then we will attempt to lock the event subscription lock but after the peer, creating
ast_bridge_channel_unlock(bridge_channel);
}
-/*! \internal \brief Poke the bridge_channel thread */
+/*!
+ * \internal
+ * \brief Poke the bridge_channel thread
+ */
static void bridge_channel_poke(struct ast_bridge_channel *bridge_channel)
{
if (!pthread_equal(pthread_self(), bridge_channel->thread)) {
return ast_bridge_channel_write_control_data(bridge_channel, AST_CONTROL_UNHOLD, NULL, 0);
}
-/*! \internal \brief Helper function to kick off a PBX app on a bridge_channel */
+/*!
+ * \internal
+ * \brief Helper function to kick off a PBX app on a bridge_channel
+ */
static int run_app_helper(struct ast_channel *chan, const char *app_name, const char *app_args)
{
int res = 0;
}
}
-/*! \internal \brief Write a DTMF stream out to a channel */
+/*!
+ * \internal
+ * \brief Write a DTMF stream out to a channel
+ */
static int bridge_channel_write_dtmf_stream(struct ast_bridge_channel *bridge_channel, const char *dtmf)
{
return bridge_channel_write_action_data(bridge_channel,
}
}
-/*! \internal \brief Indicate that a bridge_channel is talking */
+/*!
+ * \internal
+ * \brief Indicate that a bridge_channel is talking
+ */
static void bridge_channel_talking(struct ast_bridge_channel *bridge_channel, int talking)
{
struct ast_bridge_features *features = bridge_channel->features;
char context[AST_MAX_CONTEXT];
};
-/*! \internal \brief Execute after bridge actions on a channel when it leaves a bridge */
+/*!
+ * \internal
+ * \brief Execute after bridge actions on a channel when it leaves a bridge
+ */
static void after_bridge_move_channel(struct ast_channel *chan_bridged, void *data)
{
RAII_VAR(struct ast_channel *, chan_target, data, ao2_cleanup);
ast_party_connected_line_free(&connected_target);
}
-/*! \internal \brief Execute logic to cleanup when after bridge fails */
+/*!
+ * \internal
+ * \brief Execute logic to cleanup when after bridge fails
+ */
static void after_bridge_move_channel_fail(enum ast_bridge_after_cb_reason reason, void *data)
{
RAII_VAR(struct ast_channel *, chan_target, data, ao2_cleanup);
ast_softhangup(chan_target, AST_SOFTHANGUP_DEV);
}
-/*! \internal \brief Perform a blind transfer on a channel in a bridge */
+/*!
+ * \internal
+ * \brief Perform a blind transfer on a channel in a bridge
+ */
static void bridge_channel_blind_transfer(struct ast_bridge_channel *bridge_channel,
struct blind_transfer_data *blind_data)
{
bridge_channel_handle_hangup(bridge_channel);
}
-/*! \internal \brief Perform an attended transfer on a channel in a bridge */
+/*!
+ * \internal
+ * \brief Perform an attended transfer on a channel in a bridge
+ */
static void bridge_channel_attended_transfer(struct ast_bridge_channel *bridge_channel,
const char *target_chan_name)
{
return 1;
}
-/*! \internal \brief Convert a dial status to a CDR disposition */
+/*!
+ * \internal
+ * \brief Convert a dial status to a CDR disposition
+ */
static enum ast_cdr_disposition dial_status_to_disposition(const char *dial_status)
{
RAII_VAR(struct module_config *, mod_cfg,
return 0;
}
-/*! \internal \brief Filter channel snapshots by technology */
+/*!
+ * \internal
+ * \brief Filter channel snapshots by technology
+ */
static int filter_channel_snapshot(struct ast_channel_snapshot *snapshot)
{
return snapshot->tech_properties & AST_CHAN_TP_INTERNAL;
}
-/*! \internal \brief Filter a channel cache update */
+/*!
+ * \internal
+ * \brief Filter a channel cache update
+ */
static int filter_channel_cache_message(struct ast_channel_snapshot *old_snapshot,
struct ast_channel_snapshot *new_snapshot)
{
}
/*!
- * \internal \brief Build and add bridge candidates based on a CDR
+ * \internal
+ * \brief Build and add bridge candidates based on a CDR
+ *
* \param bridge_id The ID of the bridge we need candidates for
* \param candidates The container of \ref bridge_candidate objects
* \param cdr The \ref cdr_object that is our candidate
}
/*!
- * \internal \brief Create a new CDR, append it to an existing CDR, and update its snapshots
+ * \internal
+ * \brief Create a new CDR, append it to an existing CDR, and update its snapshots
+ *
* \note The new CDR will be automatically transitioned to the bridge state
*/
static void bridge_candidate_add_to_cdr(struct cdr_object *cdr,
#endif
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void data_shutdown(void)
{
ast_manager_unregister("DataGet");
return NULL;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void astdb_atexit(void)
{
ast_cli_unregister_multiple(cli_database, ARRAY_LEN(cli_database));
return 0;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void features_shutdown(void)
{
ast_features_config_shutdown();
return 0;
}
-/*! \internal \brief Close the file stream by canceling any pending read / write callbacks */
+/*!
+ * \internal
+ * \brief Close the file stream by canceling any pending read / write callbacks
+ */
static void filestream_close(struct ast_filestream *f)
{
enum ast_format_type format_type = AST_FORMAT_GET_TYPE(f->fmt->format.id);
return 0;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void format_list_shutdown(void)
{
ast_rwlock_destroy(&format_list_array_lock);
return -1;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void format_attr_shutdown(void)
{
ast_cli_unregister_multiple(my_clis, ARRAY_LEN(my_clis));
return 0;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void indications_shutdown(void)
{
ast_cli_unregister_multiple(cli_indications, ARRAY_LEN(cli_indications));
#endif
-/*! \internal \brief Free a user record. Should already be removed from the list */
+/*!
+ * \internal
+ * \brief Free a user record. Should already be removed from the list
+ */
static void manager_free_user(struct ast_manager_user *user)
{
if (user->a1_hash) {
ast_free(user);
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void manager_shutdown(void)
{
struct ast_manager_user *user;
}
}
-/*! \internal \brief Clean up other resources on Asterisk shutdown
+/*!
+ * \internal
+ * \brief Clean up other resources on Asterisk shutdown
+ *
* \note This does not include the msg_q_tp object, which must be disposed
* of prior to Asterisk checking for channel destruction in its shutdown
- * sequence. The atexit handlers are executed after this occurs. */
+ * sequence. The atexit handlers are executed after this occurs.
+ */
static void message_shutdown(void)
{
ast_custom_function_unregister(&msg_function);
return "Unknown";
}
-/*! \internal \brief Check extension state for an extension by using hint */
+/*!
+ * \internal
+ * \brief Check extension state for an extension by using hint
+ */
static int internal_extension_state_extended(struct ast_channel *c, const char *context, const char *exten,
struct ao2_container *device_state_info)
{
}
}
-/*! \internal \brief Add watcher for extension states with destructor */
+/*!
+ * \internal
+ * \brief Add watcher for extension states with destructor
+ */
static int extension_state_add_destroy(const char *context, const char *exten,
ast_state_cb_type change_cb, ast_state_cb_destroy_type destroy_cb, void *data, int extended)
{
AST_DATA_ENTRY("asterisk/core/hints", &hints_data_provider),
};
-/*! \internal \brief Clean up resources on Asterisk shutdown.
- * \note Cleans up resources allocated in load_pbx */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown.
+ *
+ * \note Cleans up resources allocated in load_pbx
+ */
static void unload_pbx(void)
{
int x;
return res;
}
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
static void pickup_shutdown(void)
{
STASIS_MESSAGE_TYPE_CLEANUP(ast_call_pickup_type);
return 0;
}
-/*! \internal \brief \ref stasis message payload for RTCP messages */
+/*!
+ * \internal
+ * \brief \ref stasis message payload for RTCP messages
+ */
struct rtcp_message_payload {
struct ast_channel_snapshot *snapshot; /*< The channel snapshot, if available */
struct ast_rtp_rtcp_report *report; /*< The RTCP report */
return snapshot->name;
}
-/*! \internal \brief Hash function for \ref ast_channel_snapshot objects */
+/*!
+ * \internal
+ * \brief Hash function for \ref ast_channel_snapshot objects
+ */
static int channel_snapshot_hash_cb(const void *obj, const int flags)
{
const struct ast_channel_snapshot *snapshot = obj;
return ast_str_case_hash(name);
}
-/*! \internal \brief Comparison function for \ref ast_channel_snapshot objects */
+/*!
+ * \internal
+ * \brief Comparison function for \ref ast_channel_snapshot objects
+ */
static int channel_snapshot_cmp_cb(void *obj, void *arg, int flags)
{
struct ast_channel_snapshot *left = obj;
struct ast_json *blob; /*< A blob of JSON data */
};
-/*! \internal \brief Standard comparison function for \ref channel_role_snapshot objects */
+/*!
+ * \internal
+ * \brief Standard comparison function for \ref channel_role_snapshot objects
+ */
static int channel_role_single_cmp_cb(void *obj, void *arg, int flags)
{
struct channel_role_snapshot *left = obj;
return strcasecmp(left->role, match) ? 0 : (CMP_MATCH | CMP_STOP);
}
-/*! \internal \brief Multi comparison function for \ref channel_role_snapshot objects */
+/*!
+ * \internal
+ * \brief Multi comparison function for \ref channel_role_snapshot objects
+ */
static int channel_role_multi_cmp_cb(void *obj, void *arg, int flags)
{
struct channel_role_snapshot *left = obj;
return strcasecmp(left->role, match) ? 0 : (CMP_MATCH);
}
-/*! \internal \brief Hash function for \ref channel_role_snapshot objects */
+/*!
+ * \internal
+ * \brief Hash function for \ref channel_role_snapshot objects
+ */
static int channel_role_hash_cb(const void *obj, const int flags)
{
const struct channel_role_snapshot *snapshot = obj;
return ast_str_case_hash(name);
}
-/*! \internal \brief Destructor for \ref ast_multi_channel_blob objects */
+/*!
+ * \internal
+ * \brief Destructor for \ref ast_multi_channel_blob objects
+ */
static void multi_channel_blob_dtor(void *obj)
{
struct ast_multi_channel_blob *multi_blob = obj;
/*! \brief Default documentation language. */
static const char default_documentation_language[] = "en_US";
-/*! \brief Number of columns to print when showing the XML documentation with a
- * 'core show application/function *' CLI command. Used in text wrapping.*/
+/*!
+ * \brief Number of columns to print when showing the XML documentation with a
+ * 'core show application/function *' CLI command. Used in text wrapping.
+ */
static const int xmldoc_text_columns = 74;
-/*! \brief This is a value that we will use to let the wrapping mechanism move the cursor
+/*!
+ * \brief This is a value that we will use to let the wrapping mechanism move the cursor
* backward and forward xmldoc_max_diff positions before cutting the middle of a
- * word, trying to find a space or a \n. */
+ * word, trying to find a space or a \n.
+ */
static const int xmldoc_max_diff = 5;
/*! \brief XML documentation language. */
{ "warning", "<warning>WARNING!!!:</warning> ", "" }
};
-/*! \internal
- * \brief Calculate the space in bytes used by a format string
- * that will be passed to a sprintf function.
- * \param postbr The format string to use to calculate the length.
- * \retval The postbr length.
+/*!
+ * \internal
+ * \brief Calculate the space in bytes used by a format string
+ * that will be passed to a sprintf function.
+ *
+ * \param postbr The format string to use to calculate the length.
+ *
+ * \retval The postbr length.
*/
static int xmldoc_postbrlen(const char *postbr)
{
return postbrreallen;
}
-/*! \internal
- * \brief Setup postbr to be used while wrapping the text.
- * Add to postbr array all the spaces and tabs at the beginning of text.
- * \param postbr output array.
- * \param len text array length.
- * \param text Text with format string before the actual string.
+/*!
+ * \internal
+ * \brief Setup postbr to be used while wrapping the text.
+ * Add to postbr array all the spaces and tabs at the beginning of text.
+ *
+ * \param postbr output array.
+ * \param len text array length.
+ * \param text Text with format string before the actual string.
*/
static void xmldoc_setpostbr(char *postbr, size_t len, const char *text)
{
postbr[postbrlen] = '\0';
}
-/*! \internal
- * \brief Try to find a space or a break in text starting at currentpost
+/*!
+ * \internal
+ * \brief Try to find a space or a break in text starting at currentpost
* and moving at most maxdiff positions.
* Helper for xmldoc_string_wrap().
- * \param text Input string where it will search.
- * \param currentpos Current position within text.
- * \param maxdiff Not move more than maxdiff inside text.
- * \retval 1 if a space or break is found inside text while moving.
- * \retval 0 if no space or break is found.
+ *
+ * \param text Input string where it will search.
+ * \param currentpos Current position within text.
+ * \param maxdiff Not move more than maxdiff inside text.
+ *
+ * \retval 1 if a space or break is found inside text while moving.
+ * \retval 0 if no space or break is found.
*/
static int xmldoc_wait_nextspace(const char *text, int currentpos, int maxdiff)
{
return 0;
}
-/*! \internal
- * \brief Helper function for xmldoc_string_wrap().
- * Try to found a space or a break inside text moving backward
- * not more than maxdiff positions.
- * \param text The input string where to search for a space.
- * \param currentpos The current cursor position.
- * \param maxdiff The max number of positions to move within text.
- * \retval 0 If no space is found (Notice that text[currentpos] is not a space or a break)
- * \retval > 0 If a space or a break is found, and the result is the position relative to
- * currentpos.
+/*!
+ * \internal
+ * \brief Helper function for xmldoc_string_wrap().
+ * Try to found a space or a break inside text moving backward
+ * not more than maxdiff positions.
+ *
+ * \param text The input string where to search for a space.
+ * \param currentpos The current cursor position.
+ * \param maxdiff The max number of positions to move within text.
+ *
+ * \retval 0 If no space is found (Notice that text[currentpos] is not a space or a break)
+ * \retval > 0 If a space or a break is found, and the result is the position relative to
+ * currentpos.
*/
static int xmldoc_foundspace_backward(const char *text, int currentpos, int maxdiff)
{
return 0;
}
-/*! \internal
- * \brief Justify a text to a number of columns.
- * \param text Input text to be justified.
- * \param columns Number of columns to preserve in the text.
- * \param maxdiff Try to not cut a word when goinf down.
- * \retval NULL on error.
- * \retval The wrapped text.
+/*!
+ * \internal
+ * \brief Justify a text to a number of columns.
+ *
+ * \param text Input text to be justified.
+ * \param columns Number of columns to preserve in the text.
+ * \param maxdiff Try to not cut a word when goinf down.
+ *
+ * \retval NULL on error.
+ * \retval The wrapped text.
*/
static char *xmldoc_string_wrap(const char *text, int columns, int maxdiff)
{
return wrapped;
}
-/*! \internal
- * \brief Cleanup spaces and tabs after a \n
- * \param text String to be cleaned up.
- * \param output buffer (not already allocated).
- * \param lastspaces Remove last spaces in the string.
+/*!
+ * \internal
+ * \brief Cleanup spaces and tabs after a \n
+ *
+ * \param text String to be cleaned up.
+ * \param output buffer (not already allocated).
+ * \param lastspaces Remove last spaces in the string.
*/
static void xmldoc_string_cleanup(const char *text, struct ast_str **output, int lastspaces)
{
}
}
-/*! \internal
+/*!
+ * \internal
* \brief Check if the given attribute on the given node matches the given value.
+ *
* \param node the node to match
* \param attr the name of the attribute
* \param value the expected value of the attribute
+ *
* \retval true if the given attribute contains the given value
* \retval false if the given attribute does not exist or does not contain the given value
*/
return match;
}
-/*! \internal
- * \brief Get the application/function node for 'name' application/function with language 'language'
- * and module 'module' if we don't find any, get the first application
- * with 'name' no matter which language or module.
- * \param type 'application', 'function', ...
- * \param name Application or Function name.
- * \param module Module item is in.
- * \param language Try to get this language (if not found try with en_US)
- * \retval NULL on error.
- * \retval A node of type ast_xml_node.
+/*!
+ * \internal
+ * \brief Get the application/function node for 'name' application/function with language 'language'
+ * and module 'module' if we don't find any, get the first application
+ * with 'name' no matter which language or module.
+ *
+ * \param type 'application', 'function', ...
+ * \param name Application or Function name.
+ * \param module Module item is in.
+ * \param language Try to get this language (if not found try with en_US)
+ *
+ * \retval NULL on error.
+ * \retval A node of type ast_xml_node.
*/
static struct ast_xml_node *xmldoc_get_node(const char *type, const char *name, const char *module, const char *language)
{
return node;
}
-/*! \internal
- * \brief Helper function used to build the syntax, it allocates the needed buffer (or reallocates it),
- * and based on the reverse value it makes use of fmt to print the parameter list inside the
- * realloced buffer (syntax).
- * \param reverse We are going backwards while generating the syntax?
- * \param len Current length of 'syntax' buffer.
- * \param syntax Output buffer for the concatenated values.
- * \param fmt A format string that will be used in a sprintf call.
+/*!
+ * \internal
+ * \brief Helper function used to build the syntax, it allocates the needed buffer (or reallocates it),
+ * and based on the reverse value it makes use of fmt to print the parameter list inside the
+ * realloced buffer (syntax).
+ *
+ * \param reverse We are going backwards while generating the syntax?
+ * \param len Current length of 'syntax' buffer.
+ * \param syntax Output buffer for the concatenated values.
+ * \param fmt A format string that will be used in a sprintf call.
*/
static void __attribute__((format(printf, 4, 5))) xmldoc_reverse_helper(int reverse, int *len, char **syntax, const char *fmt, ...)
{
ast_free(tmpfmt);
}
-/*! \internal
- * \brief Check if the passed node has 'what' tags inside it.
- * \param node Root node to search 'what' elements.
- * \param what node name to search inside node.
- * \retval 1 If a 'what' element is found inside 'node'.
- * \retval 0 If no 'what' is found inside 'node'.
+/*!
+ * \internal
+ * \brief Check if the passed node has 'what' tags inside it.
+ *
+ * \param node Root node to search 'what' elements.
+ * \param what node name to search inside node.
+ *
+ * \retval 1 If a 'what' element is found inside 'node'.
+ * \retval 0 If no 'what' is found inside 'node'.
*/
static int xmldoc_has_inside(struct ast_xml_node *fixnode, const char *what)
{
return 0;
}
-/*! \internal
- * \brief Check if the passed node has at least one node inside it.
- * \param node Root node to search node elements.
- * \retval 1 If a node element is found inside 'node'.
- * \retval 0 If no node is found inside 'node'.
+/*!
+ * \internal
+ * \brief Check if the passed node has at least one node inside it.
+ *
+ * \param node Root node to search node elements.
+ *
+ * \retval 1 If a node element is found inside 'node'.
+ * \retval 0 If no node is found inside 'node'.
*/
static int xmldoc_has_nodes(struct ast_xml_node *fixnode)
{
return 0;
}
-/*! \internal
- * \brief Check if the passed node has at least one specialtag.
- * \param node Root node to search "specialtags" elements.
- * \retval 1 If a "specialtag" element is found inside 'node'.
- * \retval 0 If no "specialtag" is found inside 'node'.
+/*!
+ * \internal
+ * \brief Check if the passed node has at least one specialtag.
+ *
+ * \param node Root node to search "specialtags" elements.
+ *
+ * \retval 1 If a "specialtag" element is found inside 'node'.
+ * \retval 0 If no "specialtag" is found inside 'node'.
*/
static int xmldoc_has_specialtags(struct ast_xml_node *fixnode)
{
return 0;
}
-/*! \internal
- * \brief Build the syntax for a specified starting node.
- * \param rootnode A pointer to the ast_xml root node.
- * \param rootname Name of the application, function, option, etc. to build the syntax.
- * \param childname The name of each parameter node.
- * \param printparenthesis Boolean if we must print parenthesis if not parameters are found in the rootnode.
- * \param printrootname Boolean if we must print the rootname before the syntax and parenthesis at the begining/end.
- * \retval NULL on error.
- * \retval An ast_malloc'ed string with the syntax generated.
+/*!
+ * \internal
+ * \brief Build the syntax for a specified starting node.
+ *
+ * \param rootnode A pointer to the ast_xml root node.
+ * \param rootname Name of the application, function, option, etc. to build the syntax.
+ * \param childname The name of each parameter node.
+ * \param printparenthesis Boolean if we must print parenthesis if not parameters are found in the rootnode.
+ * \param printrootname Boolean if we must print the rootname before the syntax and parenthesis at the begining/end.
+ *
+ * \retval NULL on error.
+ * \retval An ast_malloc'ed string with the syntax generated.
*/
static char *xmldoc_get_syntax_fun(struct ast_xml_node *rootnode, const char *rootname, const char *childname, int printparenthesis, int printrootname)
{
#undef MP
}
-/*! \internal
- * \brief Parse an enumlist inside a <parameter> to generate a COMMAND
- * syntax.
- * \param fixnode A pointer to the <enumlist> node.
- * \retval {<unknown>} on error.
- * \retval A string inside brackets {} with the enum's separated by pipes |.
+/*!
+ * \internal
+ * \brief Parse an enumlist inside a <parameter> to generate a COMMAND syntax.
+ *
+ * \param fixnode A pointer to the <enumlist> node.
+ *
+ * \retval {<unknown>} on error.
+ * \retval A string inside brackets {} with the enum's separated by pipes |.
*/
static char *xmldoc_parse_cmd_enumlist(struct ast_xml_node *fixnode)
{
return ret;
}
-/*! \internal
- * \brief Generate a syntax of COMMAND type.
- * \param fixnode The <syntax> node pointer.
- * \param name The name of the 'command'.
- * \param printname Print the name of the command before the paramters?
- * \retval On error, return just 'name'.
- * \retval On success return the generated syntax.
+/*!
+ * \internal
+ * \brief Generate a syntax of COMMAND type.
+ *
+ * \param fixnode The <syntax> node pointer.
+ * \param name The name of the 'command'.
+ * \param printname Print the name of the command before the paramters?
+ *
+ * \retval On error, return just 'name'.
+ * \retval On success return the generated syntax.
*/
static char *xmldoc_get_syntax_cmd(struct ast_xml_node *fixnode, const char *name, int printname)
{
return ret;
}
-/*! \internal
- * \brief Generate an AMI action/event syntax.
- * \param fixnode The manager action/event node pointer.
- * \param name The name of the manager action/event.
- * \param manager_type "Action" or "Event"
- * \retval The generated syntax.
- * \retval NULL on error.
+/*!
+ * \internal
+ * \brief Generate an AMI action/event syntax.
+ *
+ * \param fixnode The manager action/event node pointer.
+ * \param name The name of the manager action/event.
+ * \param manager_type "Action" or "Event"
+ *
+ * \retval The generated syntax.
+ * \retval NULL on error.
*/
static char *xmldoc_get_syntax_manager(struct ast_xml_node *fixnode, const char *name, const char *manager_type)
{
{ "agi", COMMAND_SYNTAX },
};
-/*! \internal
- * \brief Get syntax type based on type of node.
- * \param type Type of node.
- * \retval The type of syntax to generate based on the type of node.
+/*!
+ * \internal
+ * \brief Get syntax type based on type of node.
+ *
+ * \param type Type of node.
+ *
+ * \retval The type of syntax to generate based on the type of node.
*/
static enum syntaxtype xmldoc_get_syntax_type(const char *type)
{
* \note This method exists for when you already have the node. This
* prevents having to lock the documentation tree twice
*
- * \returns A malloc'd character pointer to the syntax of the item
- * \returns NULL on failure
+ * \retval A malloc'd character pointer to the syntax of the item
+ * \retval NULL on failure
*
* \since 11
*/
return _ast_xmldoc_build_syntax(node, type, name);
}
-/*! \internal
- * \brief Parse common internal elements. This includes paragraphs, special
- * tags, and information nodes.
- * \param node The element to parse
- * \param tabs Add this string before the content of the parsed element.
- * \param posttabs Add this string after the content of the parsed element.
- * \param buffer This must be an already allocated ast_str. It will be used to
- * store the result (if something has already been placed in the
- * buffer, the parsed elements will be appended)
- * \retval 1 if any data was appended to the buffer
- * \retval 2 if the data appended to the buffer contained a text paragraph
- * \retval 0 if no data was appended to the buffer
+/*!
+ * \internal
+ * \brief Parse common internal elements. This includes paragraphs, special
+ * tags, and information nodes.
+ *
+ * \param node The element to parse
+ * \param tabs Add this string before the content of the parsed element.
+ * \param posttabs Add this string after the content of the parsed element.
+ * \param buffer This must be an already allocated ast_str. It will be used to
+ * store the result (if something has already been placed in the
+ * buffer, the parsed elements will be appended)
+ *
+ * \retval 1 if any data was appended to the buffer
+ * \retval 2 if the data appended to the buffer contained a text paragraph
+ * \retval 0 if no data was appended to the buffer
*/
static int xmldoc_parse_common_elements(struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer)
{
|| xmldoc_parse_info(node, tabs, posttabs, buffer));
}
-/*! \internal
- * \brief Parse a <para> element.
- * \param node The <para> element pointer.
- * \param tabs Added this string before the content of the <para> element.
- * \param posttabs Added this string after the content of the <para> element.
- * \param buffer This must be an already allocated ast_str. It will be used
- * to store the result (if already has something it will be appended to the current
- * string).
- * \retval 1 If 'node' is a named 'para'.
- * \retval 2 If data is appended in buffer.
- * \retval 0 on error.
+/*!
+ * \internal
+ * \brief Parse a <para> element.
+ *
+ * \param node The <para> element pointer.
+ * \param tabs Added this string before the content of the <para> element.
+ * \param posttabs Added this string after the content of the <para> element.
+ * \param buffer This must be an already allocated ast_str. It will be used
+ * to store the result (if already has something it will be appended to the current
+ * string).
+ *
+ * \retval 1 If 'node' is a named 'para'.
+ * \retval 2 If data is appended in buffer.
+ * \retval 0 on error.
*/
static int xmldoc_parse_para(struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse special elements defined in 'struct special_tags' special elements must have a <para> element inside them.
- * \param fixnode special tag node pointer.
- * \param tabs put tabs before printing the node content.
- * \param posttabs put posttabs after printing node content.
- * \param buffer Output buffer, the special tags will be appended here.
- * \retval 0 if no special element is parsed.
- * \retval 1 if a special element is parsed (data is appended to buffer).
- * \retval 2 if a special element is parsed and also a <para> element is parsed inside the specialtag.
+/*!
+ * \internal
+ * \brief Parse special elements defined in 'struct special_tags' special elements must have a <para> element inside them.
+ *
+ * \param fixnode special tag node pointer.
+ * \param tabs put tabs before printing the node content.
+ * \param posttabs put posttabs after printing node content.
+ * \param buffer Output buffer, the special tags will be appended here.
+ *
+ * \retval 0 if no special element is parsed.
+ * \retval 1 if a special element is parsed (data is appended to buffer).
+ * \retval 2 if a special element is parsed and also a <para> element is parsed inside the specialtag.
*/
static int xmldoc_parse_specialtags(struct ast_xml_node *fixnode, const char *tabs, const char *posttabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse an 'info' tag inside an element.
- * \param node A pointer to the 'info' xml node.
- * \param tabs A string to be appended at the beginning of each line being printed
- * inside 'buffer'
- * \param posttabs Add this string after the content of the <para> element, if one exists
- * \param String buffer to put values found inide the info element.
- * \ret 2 if the information contained a para element, and it returned a value of 2
- * \ret 1 if information was put into the buffer
- * \ret 0 if no information was put into the buffer or error
+/*!
+ * \internal
+ * \brief Parse an 'info' tag inside an element.
+ *
+ * \param node A pointer to the 'info' xml node.
+ * \param tabs A string to be appended at the beginning of each line being printed
+ * inside 'buffer'
+ * \param posttabs Add this string after the content of the <para> element, if one exists
+ * \param String buffer to put values found inide the info element.
+ *
+ * \retval 2 if the information contained a para element, and it returned a value of 2
+ * \retval 1 if information was put into the buffer
+ * \retval 0 if no information was put into the buffer or error
*/
static int xmldoc_parse_info(struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse an <argument> element from the xml documentation.
- * \param fixnode Pointer to the 'argument' xml node.
- * \param insideparameter If we are parsing an <argument> inside a <parameter>.
- * \param paramtabs pre tabs if we are inside a parameter element.
- * \param tabs What to be printed before the argument name.
- * \param buffer Output buffer to put values found inside the <argument> element.
- * \retval 1 If there is content inside the argument.
- * \retval 0 If the argument element is not parsed, or there is no content inside it.
+/*!
+ * \internal
+ * \brief Parse an <argument> element from the xml documentation.
+ *
+ * \param fixnode Pointer to the 'argument' xml node.
+ * \param insideparameter If we are parsing an <argument> inside a <parameter>.
+ * \param paramtabs pre tabs if we are inside a parameter element.
+ * \param tabs What to be printed before the argument name.
+ * \param buffer Output buffer to put values found inside the <argument> element.
+ *
+ * \retval 1 If there is content inside the argument.
+ * \retval 0 If the argument element is not parsed, or there is no content inside it.
*/
static int xmldoc_parse_argument(struct ast_xml_node *fixnode, int insideparameter, const char *paramtabs, const char *tabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse a <variable> node inside a <variablelist> node.
- * \param node The variable node to parse.
- * \param tabs A string to be appended at the begining of the output that will be stored
- * in buffer.
- * \param buffer This must be an already created ast_str. It will be used
- * to store the result (if already has something it will be appended to the current
- * string).
- * \retval 0 if no data is appended.
- * \retval 1 if data is appended.
+/*!
+ * \internal
+ * \brief Parse a <variable> node inside a <variablelist> node.
+ *
+ * \param node The variable node to parse.
+ * \param tabs A string to be appended at the begining of the output that will be stored
+ * in buffer.
+ * \param buffer This must be an already created ast_str. It will be used
+ * to store the result (if already has something it will be appended to the current
+ * string).
+ *
+ * \retval 0 if no data is appended.
+ * \retval 1 if data is appended.
*/
static int xmldoc_parse_variable(struct ast_xml_node *node, const char *tabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse a <variablelist> node and put all the output inside 'buffer'.
- * \param node The variablelist node pointer.
- * \param tabs A string to be appended at the begining of the output that will be stored
- * in buffer.
- * \param buffer This must be an already created ast_str. It will be used
- * to store the result (if already has something it will be appended to the current
- * string).
- * \retval 1 If a <variablelist> element is parsed.
- * \retval 0 On error.
+/*!
+ * \internal
+ * \brief Parse a <variablelist> node and put all the output inside 'buffer'.
+ *
+ * \param node The variablelist node pointer.
+ * \param tabs A string to be appended at the begining of the output that will be stored
+ * in buffer.
+ * \param buffer This must be an already created ast_str. It will be used
+ * to store the result (if already has something it will be appended to the current
+ * string).
+ *
+ * \retval 1 If a <variablelist> element is parsed.
+ * \retval 0 On error.
*/
static int xmldoc_parse_variablelist(struct ast_xml_node *node, const char *tabs, struct ast_str **buffer)
{
/*!
* \internal
* \brief Build seealso information for an item
+ *
* \param node The seealso node to parse
*
* \note This method exists for when you already have the node. This
* prevents having to lock the documentation tree twice
*
- * \returns A malloc'd character pointer to the seealso information of the item
- * \returns NULL on failure
+ * \retval A malloc'd character pointer to the seealso information of the item
+ * \retval NULL on failure
*
* \since 11
*/
return output;
}
-/*! \internal
- * \brief Parse a <enum> node.
- * \brief fixnode An ast_xml_node pointer to the <enum> node.
- * \bried buffer The output buffer.
- * \retval 0 if content is not found inside the enum element (data is not appended to buffer).
- * \retval 1 if content is found and data is appended to buffer.
+/*!
+ * \internal
+ * \brief Parse a <enum> node.
+ *
+ * \param fixnode An ast_xml_node pointer to the <enum> node.
+ * \param buffer The output buffer.
+ *
+ * \retval 0 if content is not found inside the enum element (data is not appended to buffer).
+ * \retval 1 if content is found and data is appended to buffer.
*/
static int xmldoc_parse_enum(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse a <enumlist> node.
- * \param fixnode As ast_xml pointer to the <enumlist> node.
- * \param buffer The ast_str output buffer.
- * \retval 0 if no <enumlist> node was parsed.
- * \retval 1 if a <enumlist> node was parsed.
+/*!
+ * \internal
+ * \brief Parse a <enumlist> node.
+ *
+ * \param fixnode As ast_xml pointer to the <enumlist> node.
+ * \param buffer The ast_str output buffer.
+ *
+ * \retval 0 if no <enumlist> node was parsed.
+ * \retval 1 if a <enumlist> node was parsed.
*/
static int xmldoc_parse_enumlist(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse an <option> node.
- * \param fixnode An ast_xml pointer to the <option> node.
- * \param tabs A string to be appended at the begining of each line being added to the
- * buffer string.
- * \param buffer The output buffer.
- * \retval 0 if no option node is parsed.
- * \retval 1 if an option node is parsed.
+/*!
+ * \internal
+ * \brief Parse an <option> node.
+ *
+ * \param fixnode An ast_xml pointer to the <option> node.
+ * \param tabs A string to be appended at the begining of each line being added to the
+ * buffer string.
+ * \param buffer The output buffer.
+ *
+ * \retval 0 if no option node is parsed.
+ * \retval 1 if an option node is parsed.
*/
static int xmldoc_parse_option(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
return ret;
}
-/*! \internal
- * \brief Parse an <optionlist> element from the xml documentation.
- * \param fixnode Pointer to the optionlist xml node.
- * \param tabs A string to be appended at the begining of each line being added to the
- * buffer string.
- * \param buffer Output buffer to put what is inside the optionlist tag.
+/*!
+ * \internal
+ * \brief Parse an <optionlist> element from the xml documentation.
+ *
+ * \param fixnode Pointer to the optionlist xml node.
+ * \param tabs A string to be appended at the begining of each line being added to the
+ * buffer string.
+ * \param buffer Output buffer to put what is inside the optionlist tag.
*/
static void xmldoc_parse_optionlist(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
}
}
-/*! \internal
- * \brief Parse a 'parameter' tag inside a syntax element.
- * \param fixnode A pointer to the 'parameter' xml node.
- * \param tabs A string to be appended at the beginning of each line being printed inside
- * 'buffer'.
- * \param buffer String buffer to put values found inside the parameter element.
+/*!
+ * \internal
+ * \brief Parse a 'parameter' tag inside a syntax element.
+ *
+ * \param fixnode A pointer to the 'parameter' xml node.
+ * \param tabs A string to be appended at the beginning of each line being printed inside
+ * 'buffer'.
+ * \param buffer String buffer to put values found inside the parameter element.
*/
static void xmldoc_parse_parameter(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
/*!
* \internal
* \brief Build the arguments for an item
+ *
* \param node The arguments node to parse
*
* \note This method exists for when you already have the node. This
* prevents having to lock the documentation tree twice
*
- * \returns A malloc'd character pointer to the arguments for the item
- * \returns NULL on failure
+ * \retval A malloc'd character pointer to the arguments for the item
+ * \retval NULL on failure
*
* \since 11
*/
return _ast_xmldoc_build_arguments(node);
}
-/*! \internal
- * \brief Return the string within a node formatted with <para> and <variablelist> elements.
- * \param node Parent node where content resides.
- * \param raw If set, return the node's content without further processing.
- * \param raw_wrap Wrap raw text.
- * \retval NULL on error
- * \retval Node content on success.
+/*!
+ * \internal
+ * \brief Return the string within a node formatted with <para> and <variablelist> elements.
+ *
+ * \param node Parent node where content resides.
+ * \param raw If set, return the node's content without further processing.
+ * \param raw_wrap Wrap raw text.
+ *
+ * \retval NULL on error
+ * \retval Node content on success.
*/
static struct ast_str *xmldoc_get_formatted(struct ast_xml_node *node, int raw_output, int raw_wrap)
{
}
/*!
- * \brief Get the content of a field (synopsis, description, etc) from an asterisk document tree node
- * \param node The node to obtain the information from
- * \param var Name of field to return (synopsis, description, etc).
- * \param raw Field only contains text, no other elements inside it.
- * \retval NULL On error.
- * \retval Field text content on success.
- * \since 11
+ * \internal
+ * \brief Get the content of a field (synopsis, description, etc) from an asterisk document tree node
+ *
+ * \param node The node to obtain the information from
+ * \param var Name of field to return (synopsis, description, etc).
+ * \param raw Field only contains text, no other elements inside it.
+ *
+ * \retval NULL On error.
+ * \retval Field text content on success.
+ * \since 11
*/
static char *_xmldoc_build_field(struct ast_xml_node *node, const char *var, int raw)
{
}
/*!
+ * \internal
* \brief Get the content of a field (synopsis, description, etc) from an asterisk document tree
+ *
* \param type Type of element (application, function, ...).
* \param name Name of element (Dial, Echo, Playback, ...).
* \param var Name of field to return (synopsis, description, etc).
* \param module
* \param raw Field only contains text, no other elements inside it.
+ *
* \retval NULL On error.
* \retval Field text content on success.
*/
return _xmldoc_build_field(node, var, raw);
}
-/* \internal
+/*!
+ * \internal
* \brief Build the synopsis for an item
+ *
* \param node The synopsis node
*
* \note This method exists for when you already have the node. This
* prevents having to lock the documentation tree twice
*
- * \returns A malloc'd character pointer to the synopsis information
- * \returns NULL on failure
+ * \retval A malloc'd character pointer to the synopsis information
+ * \retval NULL on failure
* \since 11
*/
static char *_ast_xmldoc_build_synopsis(struct ast_xml_node *node)
/*!
* \internal
* \brief Build the descripton for an item
+ *
* \param node The description node to parse
*
* \note This method exists for when you already have the node. This
* prevents having to lock the documentation tree twice
*
- * \returns A malloc'd character pointer to the arguments for the item
- * \returns NULL on failure
+ * \retval A malloc'd character pointer to the arguments for the item
+ * \retval NULL on failure
* \since 11
*/
static char *_ast_xmldoc_build_description(struct ast_xml_node *node)
return xmldoc_build_field(type, name, module, "description", 0);
}
-/*! \internal \brief ast_xml_doc_item ao2 destructor
+/*!
+ * \internal
+ * \brief ast_xml_doc_item ao2 destructor
* \since 11
*/
static void ast_xml_doc_item_destructor(void *obj)
}
}
-/*! \internal
+/*!
+ * \internal
* \brief Create an ao2 ref counted ast_xml_doc_item
+ *
* \param name The name of the item
* \param type The item's source type
* \since 11
return NULL;
}
-/*! \internal
+/*!
+ * \internal
* \brief ao2 item hash function for ast_xml_doc_item
* \since 11
*/
return ast_str_case_hash(name);
}
-/*! \internal
+/*!
+ * \internal
* \brief ao2 item comparison function for ast_xml_doc_item
* \since 11
*/
return strcasecmp(left->name, match) ? 0 : (CMP_MATCH | CMP_STOP);
}
-/* \internal
+/*!
+ * \internal
* \brief Build an XML documentation item
+ *
* \param node The root node for the item
* \param name The name of the item
* \param type The item's source type
*
- * \returns NULL on failure
- * \returns An ao2 ref counted object
+ * \retval NULL on failure
+ * \retval An ao2 ref counted object
* \since 11
*/
static struct ast_xml_doc_item *xmldoc_build_documentation_item(struct ast_xml_node *node, const char *name, const char *type)
return parkee;
}
-/*! \internal \brief Determine if an extension is a parking extension */
+/*!
+ * \internal
+ * \brief Determine if an extension is a parking extension
+ */
static int parking_is_exten_park(const char *context, const char *exten)
{
struct ast_exten *exten_obj;
return 0;
}
-/*! \internal \brief Update RTCP interarrival jitter stats */
+/*!
+ * \internal
+ * \brief Update RTCP interarrival jitter stats
+ */
static void update_jitter_stats(struct ast_rtp *rtp, unsigned int ia_jitter)
{
double reported_jitter;
rtp->rtcp->reported_normdev_jitter = reported_normdev_jitter_current;
}
-/*! \internal \brief Update RTCP lost packet stats */
+/*!
+ * \internal
+ * \brief Update RTCP lost packet stats
+ */
static void update_lost_stats(struct ast_rtp *rtp, unsigned int lost_packets)
{
double reported_lost;
#define DEFAULT_CONFIG_RESYNC_THRESHOLD (DEFAULT_FRAME_MS) * 2
#define DEFAULT_CONFIG_TARGET_EXTRA -1
-/*! \internal \brief Destructor for a jitter buffer
+/*!
+ * \internal
+ * \brief Destructor for a jitter buffer
+ *
* \param jb The jitter buffer to destroy
+ *
* \note This will destroy all frames still in the jitter buffer
*/
static void dispose_jitterbuffer(struct ast_jb *jb)
jb->jbobj = NULL;
}
-/*! \internal \brief Create a test frame
+/*!
+ * \internal
+ * \brief Create a test frame
+ *
* \param timestamp the time in ms of the frame
* \param seqno the frame's sequence number
+ *
* \returns a malloc'd frame
*/
static struct ast_frame *create_test_frame(long timestamp,
(conf)->target_extra = DEFAULT_CONFIG_TARGET_EXTRA; \
} while (0)
-/*! \internal \brief A container object for the jitter buffers, used for all tests*/
+/*!
+ * \internal
+ * \brief A container object for the jitter buffers, used for all tests
+ */
static struct ast_jb default_jb = {
.impl = NULL,
.jbobj = NULL
};
-/*! \internal \brief Construct a test name */
+/*!
+ * \internal
+ * \brief Construct a test name
+ */
#define TEST_NAME(type_name, specifier) type_name ## _ ## specifier
#define TEST_NAME2(test_name) #test_name
#define STRINGIFY_TESTNAME(test_name) TEST_NAME2(test_name)
-/*! \internal \brief Test nominal construction of a jitter buffer
+/*!
+ * \internal
+ * \brief Test nominal construction of a jitter buffer
+ *
* \param type_name The enum type of the jitter buffer to create
* \param literal_type_name The literal name of the type - "fixed" or "adaptive"
*/
return AST_TEST_PASS; \
}
-/*! \internal \brief Test putting the initial frame into a jitter buffer
+/*!
+ * \internal
+ * \brief Test putting the initial frame into a jitter buffer
+ *
* \param type_name The enum type of the jitter buffer to create
* \param literal_type_name The literal name of the type - "fixed" or "adaptive"
*/
return AST_TEST_PASS; \
}
-/*! \internal \brief Test putting a voice frames into a jitter buffer
+/*!
+ * \internal
+ * \brief Test putting a voice frames into a jitter buffer
+ *
* \param type_name The enum type of the jitter buffer to create
* \param literal_type_name The literal name of the type - "fixed" or "adaptive"
*/
return AST_TEST_PASS; \
}
-/*! \internal \brief Test overflowing the limits of a jitter buffer
+/*!
+ * \internal
+ * \brief Test overflowing the limits of a jitter buffer
+ *
* \param type_name The enum type of the jitter buffer to create
* \param literal_type_name The literal name of the type - "fixed" or "adaptive"
* \param overflow_limit The number of frames at which we expect the buffer to overflow
return AST_TEST_PASS; \
}
-/*! \internal \brief Test putting voice frames into a jitter buffer out of order
+/*!
+ * \internal
+ * \brief Test putting voice frames into a jitter buffer out of order
+ *
* \param type_name The enum type of the jitter buffer to create
* \param literal_type_name The literal name of the type - "fixed" or "adaptive"
* \param synch_limit The synchronization limit for this particular type of jitter buffer
}
/*!
- * \internal \brief Callback function called before each test executes
+ * \internal
+ * \brief Callback function called before each test executes
*/
static int test_cdr_init_cb(struct ast_test_info *info, struct ast_test *test)
{
}
/*!
- * \internal \brief Callback function called after each test executes
+ * \internal
+ * \brief Callback function called after each test executes
*/
static int test_cdr_cleanup_cb(struct ast_test_info *info, struct ast_test *test)
{
}
/*!
- * \internal \brief Callback function called before each test executes
+ * \internal
+ * \brief Callback function called before each test executes
*/
static int test_cel_init_cb(struct ast_test_info *info, struct ast_test *test)
{
}
/*!
- * \internal \brief Callback function called after each test executes.
+ * \internal
+ * \brief Callback function called after each test executes.
+ *
+ * \details
* In addition to cleanup, this function also performs verification
* that the events received during a test match the events that were
* expected to have been generated during the test.
"JB_SCHED" /* 5 */
};
-/*! \internal \brief Make a default jitter buffer configuration */
+/*!
+ * \internal
+ * \brief Make a default jitter buffer configuration
+ */
static void test_jb_populate_config(struct jb_conf *jbconf)
{
if (!jbconf) {
jbconf->target_extra = 0;
}
-/*! \internal \brief Debug callback function for the jitter buffer's jb_dbg function */
+/*!
+ * \internal
+ * \brief Debug callback function for the jitter buffer's jb_dbg function
+ */
static void __attribute__((format(printf, 1, 2))) test_jb_debug_output(const char *fmt, ...)
{
va_list args;
ast_debug(1, "%s", buf);
}
-/*! \internal \brief Warning callback function for the jitter buffer's jb_warn function */
+/*!
+ * \internal
+ * \brief Warning callback function for the jitter buffer's jb_warn function
+ */
static void __attribute__((format(printf, 1, 2))) test_jb_warn_output(const char *fmt, ...)
{
va_list args;
ast_log(AST_LOG_WARNING, "%s", buf);
}
-/*! \internal \brief Error callback function for the jitter buffer's jb_err function */
+/*!
+ * \internal
+ * \brief Error callback function for the jitter buffer's jb_err function
+ */
static void __attribute__((format(printf, 1, 2))) test_jb_error_output(const char *fmt, ...)
{
va_list args;
ast_log(AST_LOG_ERROR, "%s", buf);
}
-/*! \internal \brief Insert frames into the jitter buffer for the nominal tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the nominal tests
+ */
static int test_jb_nominal_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0, ret = 0;
return result;
}
-/*! \internal \brief Insert frames into the jitter buffer for the out of order tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the out of order tests
+ */
static int test_jb_out_of_order_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0, ret = 0;
return result;
}
-/*! \internal \brief Insert frames into the jitter buffer for the lost frame tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the lost frame tests
+ */
static int test_jb_lost_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0, ret = 0;
return result;
}
-/*! \internal \brief Insert frames into the jitter buffer for the late frame tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the late frame tests
+ */
static int test_jb_late_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0, ret = 0;
return result;
}
-/*! \internal \brief Insert frames into the jitter buffer for the overflow tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the overflow tests
+ */
static void test_jb_overflow_frame_insertion(struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0;
return result;
}
-/*! \internal \brief Insert frames into the jitter buffer for the resynch tests */
+/*!
+ * \internal
+ * \brief Insert frames into the jitter buffer for the resynch tests
+ */
static void test_jb_resynch_frame_insertion(struct jitterbuf *jb, enum jb_frame_type frame_type)
{
int i = 0;
#include "asterisk/channel.h"
#include "asterisk/app.h"
-/*! \internal \brief Permissions to set on the voicemail directories we create
- * - taken from app_voicemail */
+/*!
+ * \internal
+ * \brief Permissions to set on the voicemail directories we create
+ *
+ * \note taken from app_voicemail
+ */
#define VOICEMAIL_DIR_MODE 0777
-/*! \internal \brief Permissions to set on the voicemail files we create
- * - taken from app_voicemail */
+/*!
+ * \internal
+ * \brief Permissions to set on the voicemail files we create
+ *
+ * \note taken from app_voicemail
+ */
#define VOICEMAIL_FILE_MODE 0666
-/*! \internal \brief The number of mock snapshot objects we use for tests */
+/*!
+ * \internal
+ * \brief The number of mock snapshot objects we use for tests
+ */
#define TOTAL_SNAPSHOTS 4
-/*! \internal \brief Create and populate the mock message objects and create the
- * envelope files on the file system */
+/*!
+ * \internal
+ * \brief Create and populate the mock message objects and create the
+ * envelope files on the file system
+ */
#define VM_API_TEST_SETUP do { \
if (test_vm_api_test_setup()) { \
VM_API_TEST_CLEANUP; \
} \
} } while (0)
-/*! \internal \brief Safely cleanup after a test run. This should be called both when a
- * test fails and when it passes */
+/*!
+ * \internal
+ * \brief Safely cleanup after a test run.
+ *
+ * \note This should be called both when a test fails and when it passes
+ */
#define VM_API_TEST_CLEANUP test_vm_api_test_teardown()
-/*! \internal \brief Safely cleanup a snapshot and a test run. Note that it assumes
- * that the mailbox snapshot object is test_mbox_snapshot */
+/*!
+ * \internal
+ * \brief Safely cleanup a snapshot and a test run.
+ *
+ * \note It assumes that the mailbox snapshot object is test_mbox_snapshot
+ */
#define VM_API_SNAPSHOT_TEST_CLEANUP \
if (test_mbox_snapshot) { \
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot); \
} \
VM_API_TEST_CLEANUP; \
-/*! \internal \brief Verify the expected result from two string values obtained
- * from a mailbox snapshot. Note that it assumes the mailbox snapshot
- * object is test_mbox_snapshot
+/*!
+ * \internal
+ * \brief Verify the expected result from two string values obtained
+ * from a mailbox snapshot.
+ *
+ * \note It assumes the mailbox snapshot object is test_mbox_snapshot
*/
#define VM_API_STRING_FIELD_VERIFY(expected, actual) do { \
if (strcmp((expected), (actual))) { \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Verify the expected result from two integer values. Note
- * that it assumes the mailbox snapshot object is test_mbox_snapshot */
+/*!
+ * \internal
+ * \brief Verify the expected result from two integer values.
+ *
+ * \note It assumes the mailbox snapshot object is test_mbox_snapshot
+ */
#define VM_API_INT_VERIFY(expected, actual) do { \
if ((expected) != (actual)) { \
ast_test_status_update(test, "Test failed for parameter %s: Expected [%d], Actual [%d]\n", #actual, expected, actual); \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Verify that a mailbox snapshot contains the expected message
- * snapshot, in the correct position, with the expected values. Note
- * that it assumes the mailbox snapshot object is test_mbox_snapshot
+/*!
+ * \internal
+ * \brief Verify that a mailbox snapshot contains the expected message
+ * snapshot, in the correct position, with the expected values.
+ *
+ * \note It assumes the mailbox snapshot object is test_mbox_snapshot
*/
#define VM_API_SNAPSHOT_MSG_VERIFY(expected, actual, expected_folder, expected_index) do { \
struct ast_vm_msg_snapshot *msg; \
} } while (0)
-/*! \internal \brief Create a message snapshot, failing the test if the snapshot could not be created.
- * This requires having a snapshot named test_mbox_snapshot.
+/*!
+ * \internal
+ * \brief Create a message snapshot, failing the test if the snapshot could not be created.
+ *
+ * \note This requires having a snapshot named test_mbox_snapshot.
*/
#define VM_API_SNAPSHOT_CREATE(mailbox, context, folder, desc, sort, old_and_inbox) do { \
if (!(test_mbox_snapshot = ast_vm_mailbox_snapshot_create( \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Create a message snapshot, failing the test if the snapshot could be created.
- * This is used to test off nominal conditions.
- * This requires having a snapshot named test_mbox_snapshot.
+/*!
+ * \internal
+ * \brief Create a message snapshot, failing the test if the snapshot could be created.
+ *
+ * \note This is used to test off nominal conditions.
+ * \note This requires having a snapshot named test_mbox_snapshot.
*/
#define VM_API_SNAPSHOT_OFF_NOMINAL_TEST(mailbox, context, folder, desc, sort, old_and_inbox) do { \
if ((test_mbox_snapshot = ast_vm_mailbox_snapshot_create( \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Move a voicemail message, failing the test if the message could not be moved */
+/*!
+ * \internal
+ * \brief Move a voicemail message, failing the test if the message could not be moved
+ */
#define VM_API_MOVE_MESSAGE(mailbox, context, number_of_messages, source, message_numbers_in, dest) do { \
if (ast_vm_msg_move((mailbox), (context), (number_of_messages), (source), (message_numbers_in), (dest))) { \
ast_test_status_update(test, "Failed to move message %s@%s from %s to %s\n", \
return AST_TEST_FAIL; \
} } while (0)
- /*! \internal \brief Attempt to move a voicemail message, failing the test if the message could be moved */
+/*!
+ * \internal
+ * \brief Attempt to move a voicemail message, failing the test if the message could be moved
+ */
#define VM_API_MOVE_MESSAGE_OFF_NOMINAL(mailbox, context, number_of_messages, source, message_numbers_in, dest) do { \
if (!ast_vm_msg_move((mailbox), (context), (number_of_messages), (source), (message_numbers_in), (dest))) { \
ast_test_status_update(test, "Succeeded to move message %s@%s from %s to %s when we really shouldn't\n", \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Remove a message, failing the test if the method failed or if the message is still present. */
+/*!
+ * \internal
+ * \brief Remove a message, failing the test if the method failed or if the message is still present.
+ */
#define VM_API_REMOVE_MESSAGE(mailbox, context, number_of_messages, folder, message_numbers_in) do { \
if (ast_vm_msg_remove((mailbox), (context), (number_of_messages), (folder), (message_numbers_in))) { \
ast_test_status_update(test, "Failed to remove message from mailbox %s@%s, folder %s", \
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot); \
} while (0)
-/*! \internal \brief Remove a message, failing the test if the method succeeds */
+/*!
+ * \internal
+ * \brief Remove a message, failing the test if the method succeeds
+ */
#define VM_API_REMOVE_MESSAGE_OFF_NOMINAL(mailbox, context, number_of_messages, folder, message_numbers_in) do { \
if (!ast_vm_msg_remove((mailbox), (context), (number_of_messages), (folder), (message_numbers_in))) { \
ast_test_status_update(test, "Succeeded in removing message from mailbox %s@%s, folder %s, when expected result was failure\n", \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Forward a message, failing the test if the message could not be forwarded */
+/*!
+ * \internal
+ * \brief Forward a message, failing the test if the message could not be forwarded
+ */
# define VM_API_FORWARD_MESSAGE(from_mailbox, from_context, from_folder, to_mailbox, to_context, to_folder, number_of_messages, message_numbers_in, delete_old) do { \
if (ast_vm_msg_forward((from_mailbox), (from_context), (from_folder), (to_mailbox), (to_context), (to_folder), (number_of_messages), (message_numbers_in), (delete_old))) { \
ast_test_status_update(test, "Failed to forward message from %s@%s [%s] to %s@%s [%s]\n", \
return AST_TEST_FAIL; \
} } while (0)
- /*! \internal \brief Forward a message, failing the test if the message was successfully forwarded */
+/*!
+ * \internal
+ * \brief Forward a message, failing the test if the message was successfully forwarded
+ */
#define VM_API_FORWARD_MESSAGE_OFF_NOMINAL(from_mailbox, from_context, from_folder, to_mailbox, to_context, to_folder, number_of_messages, message_numbers_in, delete_old) do { \
if (!ast_vm_msg_forward((from_mailbox), (from_context), (from_folder), (to_mailbox), (to_context), (to_folder), (number_of_messages), (message_numbers_in), (delete_old))) { \
ast_test_status_update(test, "Succeeded in forwarding message from %s@%s [%s] to %s@%s [%s] when expected result was fail\n", \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Playback a message on a channel or callback function. Note that the channel name must be test_channel.
- * Fail the test if the message could not be played. */
+/*!
+ * \internal .
+ * \brief Playback a message on a channel or callback function .
+ * .
+ * \note The channel name must be test_channel.
+ * \note Fail the test if the message could not be played.
+ */
#define VM_API_PLAYBACK_MESSAGE(channel, mailbox, context, folder, message, callback_fn) do { \
if (ast_vm_msg_play((channel), (mailbox), (context), (folder), (message), (callback_fn))) { \
ast_test_status_update(test, "Failed nominal playback message test\n"); \
return AST_TEST_FAIL; \
} } while (0)
-/*! \internal \brief Playback a message on a channel or callback function. Note that the channel name must be test_channel.
- * Fail the test if the message is successfully played */
+/*!
+ * \internal
+ * \brief Playback a message on a channel or callback function.
+ *
+ * \note The channel name must be test_channel.
+ * \note Fail the test if the message is successfully played
+ */
#define VM_API_PLAYBACK_MESSAGE_OFF_NOMINAL(channel, mailbox, context, folder, message, callback_fn) do { \
if (!ast_vm_msg_play((channel), (mailbox), (context), (folder), (message), (callback_fn))) { \
ast_test_status_update(test, "Succeeded in playing back of message when expected result was to fail\n"); \
} } while (0)
-/*! \internal \brief Possible names of folders. Taken from app_voicemail */
+/*!
+ * \internal
+ * \brief Possible names of folders.
+ *
+ * \note Taken from app_voicemail
+ */
static const char * const mailbox_folders[] = {
"INBOX",
"Old",
"Urgent",
};
-/*! \internal \brief Message snapshots representing the messages that are used by the various tests */
+/*!
+ * \internal
+ * \brief Message snapshots representing the messages that are used by the various tests
+ */
static struct ast_vm_msg_snapshot *test_snapshots[TOTAL_SNAPSHOTS];
-/*! \internal \brief Tracks whether or not we entered into the message playback callback function */
+/*!
+ * \internal
+ * \brief Tracks whether or not we entered into the message playback callback function
+ */
static int global_entered_playback_callback = 0;
-/*! \internal \brief Get a folder index by its name */
+/*!
+ * \internal
+ * \brief Get a folder index by its name
+ */
static int get_folder_by_name(const char *folder)
{
size_t i;
return -1;
}
-/*! \internal \brief Get a mock snapshot object
+/*!
+ * \internal
+ * \brief Get a mock snapshot object
+ *
* \param context The mailbox context
* \param exten The mailbox extension
* \param callerid The caller ID of the person leaving the message
+ *
* \returns an ast_vm_msg_snapshot object on success
* \returns NULL on error
*/
return snapshot;
}
-/*! \internal \brief Make a voicemail mailbox folder based on the values provided in a message snapshot
+/*!
+ * \internal
+ * \brief Make a voicemail mailbox folder based on the values provided in a message snapshot
+ *
* \param snapshot The snapshot containing the information to create the folder from
+ *
* \returns 0 on success
* \returns 1 on failure
*/
return 0;
}
-/*! \internal \brief Create the voicemail files specified by a snapshot
+/*!
+ * \internal
+ * \brief Create the voicemail files specified by a snapshot
+ *
* \param context The context of the mailbox
* \param mailbox The actual mailbox
* \param snapshot The message snapshot object containing the relevant envelope data
+ *
* \note This will symbolic link the sound file 'beep.gsm' to act as the 'sound' portion of the voicemail.
* Certain actions in app_voicemail will fail if an actual sound file does not exist
+ *
* \returns 0 on success
* \returns 1 on any failure
*/
return 0;
}
-/*! \internal \brief Destroy the voicemail on the file system associated with a snapshot
+/*!
+ * \internal
+ * \brief Destroy the voicemail on the file system associated with a snapshot
+ *
* \param snapshot The snapshot describing the voicemail
*/
static void test_vm_api_remove_voicemail(struct ast_vm_msg_snapshot *snapshot)
return;
}
-/*! \internal \brief Destroy the voicemails associated with a mailbox snapshot
+/*!
+ * \internal
+ * \brief Destroy the voicemails associated with a mailbox snapshot
+ *
* \param mailbox The actual mailbox name
* \param mailbox_snapshot The mailbox snapshot containing the voicemails to destroy
- * \note Its necessary to specify not just the snapshot, but the mailbox itself. The
+ *
+ * \note It is necessary to specify not just the snapshot, but the mailbox itself. The
* message snapshots contained in the snapshot may have originated from a different mailbox
* then the one we're destroying, which means that we can't determine the files to delete
* without knowing the actual mailbox they exist in.
}
}
-/*! \internal \brief Use snapshots to remove all messages in the mailboxes */
+/*!
+ * \internal
+ * \brief Use snapshots to remove all messages in the mailboxes
+ */
static void test_vm_api_remove_all_messages(void)
{
struct ast_vm_mailbox_snapshot *mailbox_snapshot;
}
}
-/*! \internal \brief Set up the necessary voicemails for a unit test run
- * \note
+/*!
+ * \internal
+ * \brief Set up the necessary voicemails for a unit test run
+ *
+ * \details
* This creates 4 voicemails, stores them on the file system, and creates snapshot objects
* representing them for expected/actual value comparisons in the array test_snapshots.
*
ast_vm_test_destroy_user("default", "test_vm_api_2345");
}
-/*! \internal \brief Update the test snapshots with a new mailbox snapshot
+/*!
+ * \internal
+ * \brief Update the test snapshots with a new mailbox snapshot
+ *
* \param mailbox_snapshot The new mailbox shapshot to update the test snapshots with
*/
static void test_vm_api_update_test_snapshots(struct ast_vm_mailbox_snapshot *mailbox_snapshot)
}
}
-/*! \internal \brief A callback function for message playback
+/*!
+ * \internal
+ * \brief A callback function for message playback
+ *
* \param chan The channel the file would be played back on
* \param file The file to play back
* \param duration The duration of the file
+ *
* \note This sets global_entered_playback_callback to 1 if the parameters
* passed to the callback are minimally valid
*/
}
}
-/*! \internal \brief Dummy channel write function for mock_channel_tech */
+/*!
+ * \internal
+ * \brief Dummy channel write function for mock_channel_tech
+ */
static int test_vm_api_mock_channel_write(struct ast_channel *chan, struct ast_frame *frame)
{
return 0;
}
-/*! \internal \brief Dummy channel read function for mock_channel_tech */
+/*!
+ * \internal
+ * \brief Dummy channel read function for mock_channel_tech
+ */
static struct ast_frame *test_vm_api_mock_channel_read(struct ast_channel *chan)
{
return &ast_null_frame;
}
-/*! \internal \brief A dummy channel technology */
+/*!
+ * \internal
+ * \brief A dummy channel technology
+ */
static const struct ast_channel_tech mock_channel_tech = {
.write = test_vm_api_mock_channel_write,
.read = test_vm_api_mock_channel_read,
};
-/*! \internal \brief Create a dummy channel suitable for 'playing back' gsm sound files on
+/*!
+ * \internal
+ * \brief Create a dummy channel suitable for 'playing back' gsm sound files on
+ *
* \returns a channel on success
* \returns NULL on failure
*/