aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-28 18:32:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-28 18:32:56 +0000
commitac52aa8cd647b169554fb09012f69be9b6bd249d (patch)
treec25307d562fc9a5264313a14869bcaa1395f737c /include
parent5525846c14b619c422b4b1373a2b600438de9c96 (diff)
* Constify the uid field of channel datastores
* Convert some spaces to tabs in func_volume * Add a note in channel.h making it clear that none of the datastore API calls lock the channel they are given, so the channel should be locked before calling the functions that take a channel argument. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81260 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index b24b25c79..11fb1df38 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -195,7 +195,7 @@ struct ast_datastore_info {
/*! \brief Structure for a channel data store */
struct ast_datastore {
- char *uid; /*!< Unique data store identifier */
+ const char *uid; /*!< Unique data store identifier */
void *data; /*!< Contained data */
const struct ast_datastore_info *info; /*!< Data store type information */
unsigned int inheritance; /*!< Number of levels this item will continue to be inherited */
@@ -615,8 +615,14 @@ 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 Create a channel datastore structure
+ *
+ * \note None of the datastore API calls lock the ast_channel they are using.
+ * So, the channel should be locked before calling the functions that
+ * take a channel argument.
+ */
+struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid);
/*! \brief Free a channel datastore structure */
int ast_channel_datastore_free(struct ast_datastore *datastore);
@@ -631,7 +637,7 @@ int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *da
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);
+struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid);
/*! \brief Change the state of a channel */
int ast_setstate(struct ast_channel *chan, enum ast_channel_state);