[asterisk-commits] dlee: branch dlee/ari-url-shuffle r391672 - /team/dlee/ari-url-shuffle/rest-a...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 13 12:40:03 CDT 2013
Author: dlee
Date: Thu Jun 13 12:40:01 2013
New Revision: 391672
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391672
Log:
oops
Added:
team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache (with props)
Added: team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache?view=auto&rev=391672
==============================================================================
--- team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache (added)
+++ team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache Thu Jun 13 12:40:01 2013
@@ -1,0 +1,46 @@
+{{!
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2013, Digium, Inc.
+ *
+ * David M. Lee, II <dlee at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+}}
+{{!
+ * Snippet for decoding parameters into an _args struct.
+}}
+
+ struct ast_{{c_nickname}}_args args = {};
+{{#has_parameters}}
+ struct ast_variable *i;
+
+{{#has_query_parameters}}
+ for (i = get_params; i; i = i->next) {
+{{#query_parameters}}
+ if (strcmp(i->name, "{{name}}") == 0) {
+ args.{{c_name}} = {{c_convert}}(i->value);
+ } else
+{{/query_parameters}}
+ {}
+ }
+{{/has_query_parameters}}
+{{#has_path_parameters}}
+ for (i = path_vars; i; i = i->next) {
+{{#path_parameters}}
+ if (strcmp(i->name, "{{name}}") == 0) {
+ args.{{c_name}} = {{c_convert}}(i->value);
+ } else
+{{/path_parameters}}
+ {}
+ }
+{{/has_path_parameters}}
+{{/has_parameters}}
Propchange: team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: team/dlee/ari-url-shuffle/rest-api-templates/param_parsing.mustache
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list