blob: 8657d4d58d941e17687aa790d0948616225c47f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Private channel definitions for channel implementations only.
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#ifndef _ASTERISK_CHANNEL_PVT_H
#define _ASTERISK_CHANNEL_PVT_H
#include <asterisk/channel.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
struct ast_channel_pvt {
/* Private data used by channel backend */
void *pvt;
/* Send a literal DTMF digit */
int (*send_digit)(struct ast_channel *chan, char digit);
/* Call a given phone number (address, etc), but don't
take longer than timeout seconds to do so. */
int (*call)(struct ast_channel *chan, char *addr, int timeout);
/* Hangup (and possibly destroy) the channel */
int (*hangup)(struct ast_channel *chan);
/* Answer the line */
int (*answer)(struct ast_channel *chan);
/* Read a frame, in standard format */
struct ast_frame * (*read)(struct ast_channel *chan);
/* Write a frame, in standard format */
int (*write)(struct ast_channel *chan, struct ast_frame *frame);
/* Display or transmit text */
int (*send_text)(struct ast_channel *chan, char *text);
};
/* Create a channel structure */
struct ast_channel *ast_channel_alloc(void);
void ast_channel_free(struct ast_channel *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif
|