[asterisk-commits] mmichelson: branch mmichelson/issue13538 r161904 - /team/mmichelson/issue1353...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 8 16:06:48 CST 2008


Author: mmichelson
Date: Mon Dec  8 16:06:47 2008
New Revision: 161904

URL: http://svn.digium.com/view/asterisk?view=rev&rev=161904
Log:
Add doxygen stuff


Modified:
    team/mmichelson/issue13538/funcs/func_audiohookinherit.c

Modified: team/mmichelson/issue13538/funcs/func_audiohookinherit.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/issue13538/funcs/func_audiohookinherit.c?view=diff&rev=161904&r1=161903&r2=161904
==============================================================================
--- team/mmichelson/issue13538/funcs/func_audiohookinherit.c (original)
+++ team/mmichelson/issue13538/funcs/func_audiohookinherit.c Mon Dec  8 16:06:47 2008
@@ -81,6 +81,16 @@
 	.chan_fixup = audiohook_inheritance_fixup,
 };
 
+/*! \brief Move audiohooks as defined by previous calls to the AUDIOHOOK_INHERIT function
+ * 
+ * Move all allowed audiohooks from the old channel to the new channel. The exception to this
+ * is if the new channel specifically forbids being able to inherit the audiohook in question.
+ *
+ * \param data The ast_datastore containing audiohook inheritance information that will be moved
+ * \param old_chan The "clone" channel from a masquerade. We are moving the audiohook in question off of this channel
+ * \param new_chan The "original" channel from a masquerade. We are moving the audiohook in question to this channel
+ * \return Void
+ */
 static void audiohook_inheritance_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
 {
 	struct inheritable_audiohook *old_audiohook = NULL;
@@ -115,6 +125,11 @@
 	}
 }
 
+/*! \brief Destroy dynamically allocated data on an audiohook_inheritance_datastore
+ *
+ * \param data Pointer to the audiohook_inheritance_datastore in question.
+ * \return Void
+ */
 static void audiohook_inheritance_destroy (void *data)
 {
 	struct audiohook_inheritance_datastore *audiohook_inheritance_datastore = data;
@@ -129,6 +144,11 @@
 	}
 }
 
+/*! \brief create an audiohook_inheritance_datastore and attach it to a channel
+ *
+ * \param chan The channel to which we wish to attach the new datastore
+ * \return Returns the newly created audiohook_inheritance_datastore or NULL on error
+ */
 static struct audiohook_inheritance_datastore *setup_inheritance_datastore(struct ast_channel *chan)
 {
 	struct ast_datastore *datastore = NULL;
@@ -150,6 +170,13 @@
 	return audiohook_inheritance_datastore;
 }
 
+/*! \brief Create a new inheritable_audiohook structure and add it to an audiohook_inheritance_datastore
+ *
+ * \param audiohook_inheritance_datastore The audiohook_inheritance_datastore we want to add the new inheritable_audiohook to
+ * \param allow A boolean used to determine which list to add the source to
+ * \param source The audiohook source for the newly created inheritable_audiohook
+ * \return Returns 0 on success, non-zero on failure
+ */
 static int setup_inheritable_audiohook(struct audiohook_inheritance_datastore *audiohook_inheritance_datastore, const int allow, const char *source)
 {
 	struct inheritable_audiohook *inheritable_audiohook = ast_calloc(1, sizeof(*inheritable_audiohook) + strlen(source));
@@ -165,6 +192,15 @@
 	return 0;
 }
 
+/*! \brief Set the permissibility of inheritance for a particular audiohook source on a channel
+ *
+ * For details regarding what happens in the function, see the inline comments
+ *
+ * \param chan The channel we are operating on
+ * \param function The name of the dialplan function (AUDIOHOOK_INHERIT)
+ * \param data The parameter to the function
+ * \param value The value indicating the permission for audiohook inheritance
+ */
 static int func_inheritance_write(struct ast_channel *chan, const char *function, char *data, const char *value)
 {
 	int allow;




More information about the asterisk-commits mailing list