diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-08-02 02:32:44 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-08-02 02:32:44 +0000 |
commit | 38236e54a84c61194c30c92b923752f0dc816d57 (patch) | |
tree | b27d3b73accfe81703eb5f706d1447a661986f5e /include/asterisk/pickup.h | |
parent | 63a229e3695514bbb15cd5ee4674b6b5bb580f0b (diff) |
Remove dead code from features.c; refactor pickup code into pickup.c
This patch does the following:
* It moves the pickup code out of features.c and into pickup.c
* It removes the vast majority of dead code out of features.c. In particular,
this includes the parking code.
(issue ASTERISK-22134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/pickup.h')
-rw-r--r-- | include/asterisk/pickup.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/include/asterisk/pickup.h b/include/asterisk/pickup.h new file mode 100644 index 000000000..de5c8961e --- /dev/null +++ b/include/asterisk/pickup.h @@ -0,0 +1,91 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2013, Digium, Inc. + * + * Matt Jordan <mjordan@digium.com> + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/*! + * \file + * \brief Call Pickup API + * + * Includes code and algorithms from the Zapata library. + * + */ + +#ifndef _AST_FEATURES_H +#define _AST_FEATURES_H + +/*! + * \brief Test if a channel can be picked up. + * + * \param chan Channel to test if can be picked up. + * + * \note This function assumes that chan is locked. + * + * \return TRUE if channel can be picked up. + */ +int ast_can_pickup(struct ast_channel *chan); + +/*! + * \brief Find a pickup channel target by group. + * + * \param chan channel that initiated pickup. + * + * \retval target on success. The returned channel is locked and reffed. + * \retval NULL on error. + */ +struct ast_channel *ast_pickup_find_by_group(struct ast_channel *chan); + +/*! + * \brief Pickup a call + * + * \param chan The channel that initiated the pickup + * + * \retval 0 on success + * \retval -1 on failure + */ +int ast_pickup_call(struct ast_channel *chan); + +/*! + * \brief Pickup a call target. + * + * \param chan channel that initiated pickup. + * \param target channel to be picked up. + * + * \note This function assumes that target is locked. + * + * \retval 0 on success. + * \retval -1 on failure. + */ +int ast_do_pickup(struct ast_channel *chan, struct ast_channel *target); + +/*! + * \brief accessor for call pickup message type + * \since 12.0.0 + * + * \retval pointer to the stasis message type + * \retval NULL if not initialized + */ +struct stasis_message_type *ast_call_pickup_type(void); + +/*! + * \brief Initialize pickup + * + * \retval 0 on success + * \retval non-zero on failure + */ +int ast_pickup_init(void); + +#endif /* _AST_FEATURES_H */ |