diff options
author | Joshua Colp <jcolp@digium.com> | 2006-04-10 23:29:50 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2006-04-10 23:29:50 +0000 |
commit | e4811a8248c88e14bd4b3421bdf692d228707fdb (patch) | |
tree | 165b92004e41c726c99721800866bd38eb63faf7 /include/asterisk/channel.h | |
parent | cf15740eaf6de047096a25afe678a577a574a9aa (diff) |
Presenting a revised data stores and oh my, a generic speech recognition API! I wonder what we can do with this now...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 44f70aa1e..4d1826e6e 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -144,6 +144,26 @@ struct ast_generator { int (*generate)(struct ast_channel *chan, void *data, int len, int samples); }; +/*! Structure for a data store type */ +struct ast_datastore_info { + /*! Type of data store */ + const char *type; + /*! Destroy function */ + void (*destroy)(void *data); +}; + +/*! Structure for a channel data store */ +struct ast_datastore { + /*! Unique data store identifier */ + char *uid; + /*! Contained data */ + void *data; + /*! Data store type information */ + const struct ast_datastore_info *info; + /*! Used for easy linking */ + AST_LIST_ENTRY(ast_datastore) list; +}; + /*! Structure for all kinds of caller ID identifications */ struct ast_callerid { /*! Malloc'd Dialed Number Identifier */ @@ -423,6 +443,9 @@ struct ast_channel { /*! Chan Spy stuff */ struct ast_channel_spy_list *spies; + /*! Data stores on the channel */ + AST_LIST_HEAD(datastores, ast_datastore) datastores; + /*! For easy linking */ AST_LIST_ENTRY(ast_channel) chan_list; }; @@ -553,6 +576,21 @@ enum channelreloadreason { CHANNEL_MANAGER_RELOAD, }; +/*! \brief Create a channel datastore structure */ +struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, char *uid); + +/*! \brief Free a channel datastore structure */ +int ast_channel_datastore_free(struct ast_datastore *datastore); + +/*! \brief Add a datastore to a channel */ +int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore); + +/*! \brief Remove a datastore from a channel */ +int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore); + +/*! \brief Find a datastore on a channel */ +struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, char *uid); + /*! \brief Change the state of a channel */ int ast_setstate(struct ast_channel *chan, int state); |