From 7d0d1a1efb1d484cce28137f1abc1a6ece61d7e9 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Thu, 7 Nov 2013 21:10:31 +0000 Subject: ari: User better nicknames for ARI operations While working on building client libraries from the Swagger API, I noticed a problem with the nicknames. channel.deleteChannel() channel.answerChannel() channel.muteChannel() Etc. We put the object name in the nickname (since we were generating C code), but it makes OO generators redundant. This patch makes the nicknames more OO friendly. This resulted in a lot of name changing within the res_ari_*.so modules, but not much else. There were a couple of other fixed I made in the process. * When reversible operations (POST /hold, POST /unhold) were made more RESTful (POST /hold, DELETE /unhold), the path for the second operation was left in the API declaration. This worked, but really the two operations should have been on the same API. * The POST /unmute operation had still not been REST-ified. Review: https://reviewboard.asterisk.org/r/2940/ ........ Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/ari/resource_applications.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'res/ari/resource_applications.c') diff --git a/res/ari/resource_applications.c b/res/ari/resource_applications.c index c422ad17f..aef939005 100644 --- a/res/ari/resource_applications.c +++ b/res/ari/resource_applications.c @@ -41,8 +41,8 @@ static int append_json(void *obj, void *arg, int flags) return 0; } -void ast_ari_get_applications(struct ast_variable *headers, - struct ast_get_applications_args *args, +void ast_ari_applications_list(struct ast_variable *headers, + struct ast_ari_applications_list_args *args, struct ast_ari_response *response) { RAII_VAR(struct ao2_container *, apps, NULL, ao2_cleanup); @@ -72,8 +72,8 @@ void ast_ari_get_applications(struct ast_variable *headers, ast_ari_response_ok(response, json); } -void ast_ari_get_application(struct ast_variable *headers, - struct ast_get_application_args *args, +void ast_ari_applications_get(struct ast_variable *headers, + struct ast_ari_applications_get_args *args, struct ast_ari_response *response) { RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); @@ -89,8 +89,8 @@ void ast_ari_get_application(struct ast_variable *headers, ast_ari_response_ok(response, json); } -void ast_ari_application_subscribe(struct ast_variable *headers, - struct ast_application_subscribe_args *args, +void ast_ari_applications_subscribe(struct ast_variable *headers, + struct ast_ari_applications_subscribe_args *args, struct ast_ari_response *response) { RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); @@ -134,8 +134,8 @@ void ast_ari_application_subscribe(struct ast_variable *headers, } } -void ast_ari_application_unsubscribe(struct ast_variable *headers, - struct ast_application_unsubscribe_args *args, +void ast_ari_applications_unsubscribe(struct ast_variable *headers, + struct ast_ari_applications_unsubscribe_args *args, struct ast_ari_response *response) { RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); -- cgit v1.2.3