[svn-commits] eliel: branch group/data_api_gsoc2009 r199278 - in /team/group/data_api_gsoc2...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jun 5 13:10:26 CDT 2009
Author: eliel
Date: Fri Jun 5 13:10:23 2009
New Revision: 199278
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=199278
Log:
Use stringfields in the ast_data_query structure.
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=199278&r1=199277&r2=199278
==============================================================================
--- team/group/data_api_gsoc2009/include/asterisk/data.h (original)
+++ team/group/data_api_gsoc2009/include/asterisk/data.h Fri Jun 5 13:10:23 2009
@@ -100,14 +100,16 @@
/*! \brief A query to the data API is specified in this structure. */
struct ast_data_query {
- /*! \brief Path to the node to retrieve. */
- const char *path;
- /*! \brief Search string, return the nodes that match this conditions.
- * Setting it to NULL will match every node in the specified path. */
- const char *search;
- /*! \brief Filter string, return the internal nodes specified here.
- * Setting it to NULL will return every internal node. */
- const char *filter;
+ AST_DECLARE_STRING_FIELDS(
+ /*! \brief Path to the node to retrieve. */
+ AST_STRING_FIELD(path);
+ /*! \brief Search string, return the nodes that match this conditions.
+ * Setting it to NULL will match every node in the specified path. */
+ AST_STRING_FIELD(search);
+ /*! \brief Filter string, return the internal nodes specified here.
+ * Setting it to NULL will return every internal node. */
+ AST_STRING_FIELD(filter);
+ );
/* XXX: Complete with security related stuff. */
};
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=199278&r1=199277&r2=199278
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Fri Jun 5 13:10:23 2009
@@ -455,16 +455,9 @@
/* XXX: test */
static void runtest(void)
{
- struct ast_data *res;
- struct ast_data_query q = {
- .path = "/asterisk/node1",
- .search = NULL,
- .filter = NULL
- };
/* some tests */
ast_data_register_multiple(test_providers, ARRAY_LEN(test_providers));
- res = ast_data_get(&q);
ast_data_unregister(NULL);
}
More information about the svn-commits
mailing list