aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-08 21:14:34 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-08 21:14:34 +0000
commit1945cc0f8179b17589095af3550c8969d7790eed (patch)
tree0991463e1dac7d5f44a2be634d9a79b713a86521 /include/asterisk/channel.h
parent4f868cef84f239a71b4f93b58aeb4852b3f0a0d3 (diff)
queue device state changes and handle them serially in a background thread
optimize device state related functions add ast_get_channel_by_name_prefix to allow searching for matching channels in O(1) operation git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6062 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/channel.h')
-rwxr-xr-xinclude/asterisk/channel.h45
1 files changed, 9 insertions, 36 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 817d3cc97..9380d7884 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -444,21 +444,6 @@ struct outgoing_helper {
/*! Do not transmit voice data */
#define AST_STATE_MUTE (1 << 16)
-/*! Device is valid but channel didn't know state */
-#define AST_DEVICE_UNKNOWN 0
-/*! Device is not used */
-#define AST_DEVICE_NOT_INUSE 1
-/*! Device is in use */
-#define AST_DEVICE_INUSE 2
-/*! Device is busy */
-#define AST_DEVICE_BUSY 3
-/*! Device is invalid */
-#define AST_DEVICE_INVALID 4
-/*! Device is unavailable */
-#define AST_DEVICE_UNAVAILABLE 5
-/*! Device is ringing */
-#define AST_DEVICE_RINGING 6
-
/*! Create a channel structure */
/*! Returns NULL on failure to allocate. New channels are
by default set to the "default" context and
@@ -494,27 +479,6 @@ void ast_channel_free(struct ast_channel *);
*/
struct ast_channel *ast_request(const char *type, int format, void *data, int *status);
-/*! Search the Channels by Name */
-/*!
- * \param device like a dialstring
- * Search the Device in active channels by compare the channelname against
- * the devicename. Compared are only the first chars to the first '-' char.
- * Returns an AST_DEVICE_UNKNOWN if no channel found or
- * AST_DEVICE_INUSE if a channel is found
- */
-int ast_parse_device_state(char *device);
-
-/*! Asks a channel for device state */
-/*!
- * \param device like a dialstring
- * Asks a channel for device state, data is normaly a number from dialstring
- * used by the low level module
- * Trys the channel devicestate callback if not supported search in the
- * active channels list for the device.
- * Returns an AST_DEVICE_??? state -1 on failure
- */
-int ast_device_state(char *device);
-
/*!
* \param type type of channel to request
* \param format requested channel format
@@ -545,6 +509,12 @@ int ast_channel_register(const struct ast_channel_tech *tech);
*/
void ast_channel_unregister(const struct ast_channel_tech *tech);
+/*! Get a channel technology structure by name
+ * \param name name of technology to find
+ * \return a pointer to the structure, or NULL if no matching technology found
+ */
+const struct ast_channel_tech *ast_get_channel_tech(const char *name);
+
/*! Hang up a channel */
/*!
* \param chan channel to hang up
@@ -759,6 +729,9 @@ struct ast_channel *ast_channel_walk_locked(const struct ast_channel *prev);
/*! Get channel by name (locks channel) */
struct ast_channel *ast_get_channel_by_name_locked(const char *chan);
+/*! Get channel by name prefix (locks channel) */
+struct ast_channel *ast_get_channel_by_name_prefix_locked(const char *name, const int namelen);
+
/*! Waits for a digit */
/*!
* \param c channel to wait for a digit on