diff options
author | David M. Lee <dlee@digium.com> | 2013-11-07 21:10:31 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-11-07 21:10:31 +0000 |
commit | 7d0d1a1efb1d484cce28137f1abc1a6ece61d7e9 (patch) | |
tree | a61c7891a423ff7a70ae5bb3a5880ba4437702fd /res/ari/resource_applications.c | |
parent | cdfbc02df164a9bc49e23900fae66e696c4623aa (diff) |
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
Diffstat (limited to 'res/ari/resource_applications.c')
-rw-r--r-- | res/ari/resource_applications.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |