00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
#ifndef _ASTERISK_CHANNEL_PVT_H
00015
#define _ASTERISK_CHANNEL_PVT_H
00016
00017
#include <asterisk/channel.h>
00018
00019
#if defined(__cplusplus) || defined(c_plusplus)
00020
extern "C" {
00021
#endif
00022
00023
00024 struct ast_channel_pvt {
00025
00026 void *
pvt;
00027 struct ast_frame *
readq;
00028 int alertpipe[2];
00029
00030 struct ast_trans_pvt *
writetrans;
00031
00032 struct ast_trans_pvt *
readtrans;
00033
00034 int rawreadformat;
00035
00036 int rawwriteformat;
00037
00038 int (*send_digit)(
struct ast_channel *chan,
char digit);
00039
00040
00041 int (*call)(
struct ast_channel *chan,
char *addr,
int timeout);
00042
00043 int (*hangup)(
struct ast_channel *chan);
00044
00045 int (*answer)(
struct ast_channel *chan);
00046
00047
struct ast_frame * (*read)(
struct ast_channel *chan);
00048
00049 int (*write)(
struct ast_channel *chan,
struct ast_frame *frame);
00050
00051 int (*send_text)(
struct ast_channel *chan,
char *text);
00052
00053 int (*send_image)(
struct ast_channel *chan,
struct ast_frame *frame);
00054
00055 int (*send_html)(
struct ast_channel *chan,
int subclass,
char *data,
int len);
00056
00057
struct ast_frame * (*exception)(
struct ast_channel *chan);
00058
00059 int (*bridge)(
struct ast_channel *c0,
struct ast_channel *c1,
int flags,
struct ast_frame **fo,
struct ast_channel **rc);
00060
00061 int (*indicate)(
struct ast_channel *c,
int condition);
00062
00063 int (*fixup)(
struct ast_channel *oldchan,
struct ast_channel *newchan);
00064
00065 int (*setoption)(
struct ast_channel *chan,
int option,
void *data,
int datalen);
00066
00067 int (*queryoption)(
struct ast_channel *chan,
int option,
void *data,
int *datalen);
00068
00069 int (*transfer)(
struct ast_channel *chan,
char *newdest);
00070
00071 int (*write_video)(
struct ast_channel *chan,
struct ast_frame *frame);
00072 };
00073
00074
00075
00076
struct ast_channel *
ast_channel_alloc(
int needalertpipe);
00077
00078
00079
int ast_queue_frame(
struct ast_channel *chan,
struct ast_frame *f);
00080
00081
int ast_queue_hangup(
struct ast_channel *chan);
00082
00083
int ast_queue_control(
struct ast_channel *chan,
int control);
00084
00085
00086
int ast_setstate(
struct ast_channel *chan,
int state);
00087
00088
void ast_change_name(
struct ast_channel *chan,
char *newname);
00089
00090
00091
void ast_channel_free(
struct ast_channel *);
00092
00093
#if defined(__cplusplus) || defined(c_plusplus)
00094
}
00095
#endif
00096
00097
00098
#endif