--- a/libidav/davqlparser.h Tue Mar 24 12:02:47 2015 +0100 +++ b/libidav/davqlparser.h Tue Mar 24 15:49:51 2015 +0100 @@ -33,6 +33,7 @@ extern "C" { #endif +#include <stdint.h> #include "ucx/string.h" #include "ucx/list.h" @@ -167,16 +168,6 @@ davqltype_t type; /** * The list of field expressions. - * <ul> - * <li> - * GET: the list of queried fields (may contain arbitrary expressions) - * </li> - * <li> - * SET: the list of DAV properties that shall receive new values - * (must be a list of IDENTIFIER expressions) - * </li> - * </ul> - * This may be <code>NULL</code> for GET queries, to request all properties. */ UcxList* fields; /** @@ -187,7 +178,7 @@ /** * A DavQLExpression that denotes the queried path. */ - DavQLExpression from; + DavQLExpression path; /** * Logical expression for selection. * <code>NULL</code>, if there is no where clause. @@ -201,6 +192,25 @@ } DavQLStatement; +/** + * Starts an interactive debugger for a DavQLStatement. + * + * @param stmt the statement to debug + */ +void dav_debug_ql_statement(DavQLStatement *stmt); + +/** + * Parses a statement. + * @param stmt the sstr_t containing the statement + * @return a DavQLStatement object + */ +DavQLStatement* dav_parse_statement(sstr_t stmt); + +/** + * Implicitly converts a cstr to a sstr_t and calls dav_parse_statement. + */ +#define dav_parse_cstr_statement(stmt) dav_parse_statement(S(stmt)) + #ifdef __cplusplus } #endif