Opaquification for ast_format structs in struct ast_channel

Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2012-02-24 00:32:20 +00:00
parent 235f88d122
commit ebaf59a656
59 changed files with 358 additions and 330 deletions

View File

@@ -137,11 +137,11 @@ int ast_channel_data_add_structure(struct ast_data *tree,
}
}
ast_data_add_codec(tree, "oldwriteformat", &chan->oldwriteformat);
ast_data_add_codec(tree, "readformat", &chan->readformat);
ast_data_add_codec(tree, "writeformat", &chan->writeformat);
ast_data_add_codec(tree, "rawreadformat", &chan->rawreadformat);
ast_data_add_codec(tree, "rawwriteformat", &chan->rawwriteformat);
ast_data_add_codec(tree, "oldwriteformat", ast_channel_oldwriteformat(chan));
ast_data_add_codec(tree, "readformat", ast_channel_readformat(chan));
ast_data_add_codec(tree, "writeformat", ast_channel_writeformat(chan));
ast_data_add_codec(tree, "rawreadformat", ast_channel_rawreadformat(chan));
ast_data_add_codec(tree, "rawwriteformat", ast_channel_rawwriteformat(chan));
ast_data_add_codecs(tree, "nativeformats", ast_channel_nativeformats(chan));
/* state */
@@ -684,3 +684,23 @@ void ast_channel_state_set(struct ast_channel *chan, enum ast_channel_state valu
{
chan->__do_not_use_state = value;
}
struct ast_format *ast_channel_oldwriteformat(struct ast_channel *chan)
{
return &chan->__do_not_use_oldwriteformat;
}
struct ast_format *ast_channel_rawreadformat(struct ast_channel *chan)
{
return &chan->__do_not_use_rawreadformat;
}
struct ast_format *ast_channel_rawwriteformat(struct ast_channel *chan)
{
return &chan->__do_not_use_rawwriteformat;
}
struct ast_format *ast_channel_readformat(struct ast_channel *chan)
{
return &chan->__do_not_use_readformat;
}
struct ast_format *ast_channel_writeformat(struct ast_channel *chan)
{
return &chan->__do_not_use_writeformat;
}