[asterisk-commits] eliel: branch eliel/data_retrieval r191625 - in /team/eliel/data_retrieval: i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 1 18:17:01 CDT 2009


Author: eliel
Date: Fri May  1 18:16:58 2009
New Revision: 191625

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=191625
Log:
Update doxygen documentation.


Modified:
    team/eliel/data_retrieval/include/asterisk/data.h
    team/eliel/data_retrieval/main/data.c

Modified: team/eliel/data_retrieval/include/asterisk/data.h
URL: http://svn.digium.com/svn-view/asterisk/team/eliel/data_retrieval/include/asterisk/data.h?view=diff&rev=191625&r1=191624&r2=191625
==============================================================================
--- team/eliel/data_retrieval/include/asterisk/data.h (original)
+++ team/eliel/data_retrieval/include/asterisk/data.h Fri May  1 18:16:58 2009
@@ -30,15 +30,25 @@
  * This module implements an abstraction for retrieving asterisk data and
  * export it.
  *
- * \note
- *	There are four types of nodes:
- *		LONG
- *		STRING
- *		BOOLEAN
- *		CONTAINER
- *  \endnote
+ * \section USAGE
  *
- * \section USAGE
+ * To register a callback use:
+ *
+ * \code
+ *      ast_data_register("/node/path", callback_fn);
+ * \endcode
+ *
+ * To unregister a callback function already registered you can just call:
+ * 
+ * \code
+ *      ast_data_unregister(NULL);
+ * \endcode
+ * And every node registered by the current module (file) will be unregistered.
+ * If you want to unregister an specific node use:
+ *
+ * \code
+ *      ast_data_unregister("/node/path");
+ * \endcode
  *
  * The asterisk data is organized in a hierarchical structure. The data
  * is retrieved passing a path of the node we want to get:
@@ -83,6 +93,7 @@
  * \brief Register a data provider.
  * \param[in] path The path of the node to register.
  * \param[in] handler The structure defining this node handler. 
+ * \param[in] registrar Who is registering this node.
  * \see ast_data_unregister
  * \retval < 0 on error.
  * \retval 0 on success.
@@ -92,7 +103,10 @@
 
 /*!
  * \brief Unregister a data provider.
- * \param[in] path Which node to unregister.
+ * \param[in] path Which node to unregister, if path is NULL unregister every node registered by
+ *            the passed 'registrar'.
+ * \param[in] registrar Who is trying to unregister this node, only the owner (the one who registered
+ *            the node) will be able to unregister it.
  * \see ast_data_register
  * \retval < 0 on error.
  * \retval 0 on success.

Modified: team/eliel/data_retrieval/main/data.c
URL: http://svn.digium.com/svn-view/asterisk/team/eliel/data_retrieval/main/data.c?view=diff&rev=191625&r1=191624&r2=191625
==============================================================================
--- team/eliel/data_retrieval/main/data.c (original)
+++ team/eliel/data_retrieval/main/data.c Fri May  1 18:16:58 2009
@@ -39,7 +39,7 @@
 	const struct ast_data_handler *handler;
 	/*! \brief children nodes. */
 	struct ao2_container *children;
-	/*! \brief Owners of this node. */
+	/*! \brief Who registered this node. */
 	const char *registrar;
 	/*! \brief Node name. */
 	char name[0];
@@ -308,7 +308,7 @@
  * \brief Create the middle nodes for the specified path (asterisk/testnode1/childnode)
  * \param[in] parent Where to add the middle nodes structure.
  * \param[in] path The path of nodes to add.
- * \param[in] registrar
+ * \param[in] registrar Who is trying to create this node provider.
  * \retval NULL on error.
  * \retval The created node.
  * \see data_node_provider_release




More information about the asterisk-commits mailing list