2 * Asterisk -- A telephony toolkit for Linux.
4 * Private channel definitions for channel implementations only.
6 * Copyright (C) 1999, Mark Spencer
8 * Mark Spencer <markster@linux-support.net>
10 * This program is free software, distributed under the terms of
11 * the GNU General Public License
14 #ifndef _ASTERISK_CHANNEL_PVT_H
15 #define _ASTERISK_CHANNEL_PVT_H
17 #include <asterisk/channel.h>
19 #if defined(__cplusplus) || defined(c_plusplus)
24 struct ast_channel_pvt {
25 /* Private data used by channel backend */
27 /* Write translation path */
28 struct ast_trans_pvt *writetrans;
29 /* Read translation path */
30 struct ast_trans_pvt *readtrans;
33 /* Raw write format */
35 /* Send a literal DTMF digit */
36 int (*send_digit)(struct ast_channel *chan, char digit);
37 /* Call a given phone number (address, etc), but don't
38 take longer than timeout seconds to do so. */
39 int (*call)(struct ast_channel *chan, char *addr, int timeout);
40 /* Hangup (and possibly destroy) the channel */
41 int (*hangup)(struct ast_channel *chan);
43 int (*answer)(struct ast_channel *chan);
44 /* Read a frame, in standard format */
45 struct ast_frame * (*read)(struct ast_channel *chan);
46 /* Write a frame, in standard format */
47 int (*write)(struct ast_channel *chan, struct ast_frame *frame);
48 /* Display or transmit text */
49 int (*send_text)(struct ast_channel *chan, char *text);
50 /* Handle an exception, reading a frame */
51 struct ast_frame * (*exception)(struct ast_channel *chan);
52 /* Bridge two channels of the same type together */
53 int (*bridge)(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc);
56 /* Create a channel structure */
57 struct ast_channel *ast_channel_alloc(void);
58 void ast_channel_free(struct ast_channel *);
60 #if defined(__cplusplus) || defined(c_plusplus)