[asterisk-commits] eliel: branch group/data_api_gsoc2009 r201896 - in /team/group/data_api_gsoc2...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 19 09:03:45 CDT 2009
Author: eliel
Date: Fri Jun 19 09:03:42 2009
New Revision: 201896
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201896
Log:
Start putting some ideas in code...
The idea of this functions is to add nodes to the created 'root' node using
ast_data_create(), so, we first create the root node calling:
ast_data_create() and then we added childs to that node using ast_data_add_<type>().
Modified:
team/group/data_api_gsoc2009/include/asterisk/data.h
team/group/data_api_gsoc2009/main/data.c
Modified: team/group/data_api_gsoc2009/include/asterisk/data.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/include/asterisk/data.h?view=diff&rev=201896&r1=201895&r2=201896
==============================================================================
--- team/group/data_api_gsoc2009/include/asterisk/data.h (original)
+++ team/group/data_api_gsoc2009/include/asterisk/data.h Fri Jun 19 09:03:42 2009
@@ -216,6 +216,30 @@
struct ast_data *ast_data_create(const char *name);
/*!
+ * \brief Add a container child.
+ * \TODO: Complete docs
+ */
+struct ast_data *ast_data_add_node(struct ast_data *root, const char *childname);
+
+/*!
+ * \brief Add an integer node type.
+ * \TODO: Complete docs
+ */
+struct ast_data *ast_data_add_integer(struct ast_data *root, const char *childname, int value);
+
+/*!
+ * \brief Add a string node type.
+ * \TODO: Complete docs
+ */
+struct ast_data *ast_data_add_string(struct ast_data *root, const char *childname, const char *string);
+
+/*!
+ * \brief Add a boolean node type.
+ * \TODO: Complete docs
+ */
+struct ast_data *ast_data_add_boolean(struct ast_data *root, const char *childname, unsigned int boolean);
+
+/*!
* \brief Initialize an iterator.
* \param[in] tree The returned tree by a call to ast_data_get.
* \param[in] elements Which elements to iterate through.
Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=201896&r1=201895&r2=201896
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Fri Jun 19 09:03:42 2009
@@ -488,6 +488,35 @@
return res;
}
+struct ast_data *ast_data_add_node(struct ast_data *root, const char *childname)
+{
+ /* TODO: implement this. */
+ /* adds a container type. */
+ return NULL;
+}
+
+struct ast_data *ast_data_add_integer(struct ast_data *root, const char *childname,
+ int value)
+{
+ /* TODO: implement this. */
+ /* adds an integer node. */
+ return NULL;
+}
+
+struct ast_data *ast_data_add_string(struct ast_data *root, const char *childname,
+ const char *value)
+{
+ /* TODO: implement this. */
+ /* adds a string node. */
+ return NULL;
+}
+
+struct ast_data *ast_data_add_boolean(struct ast_data *root, const char *childname,
+ unsigned int boolean)
+{
+ return NULL;
+}
+
void ast_data_free(struct ast_data *root)
{
struct ao2_iterator i;
More information about the asterisk-commits
mailing list