From b55d21ad919b42829721ca3a0f7425a0b429ff12 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Sun, 16 Apr 2017 18:59:54 -0600 Subject: [PATCH] make ari-stubs so doc periodic jobs can run The periodic doc job does a make ari-stubs and checks that there are no changes before generating the docs. Since I changed the mustache template (and the generated code directly) recently and forgot to regenerate the stubs, the doc job thinks they're out of date. Change-Id: I94b97035311eccf52b0101b8590223265a7881d4 --- res/ari/resource_channels.h | 4 ++-- res/res_ari_applications.c | 21 +++++++++++++-------- res/res_ari_asterisk.c | 21 +++++++++++++-------- res/res_ari_bridges.c | 21 +++++++++++++-------- res/res_ari_channels.c | 21 +++++++++++++-------- res/res_ari_device_states.c | 21 +++++++++++++-------- res/res_ari_endpoints.c | 21 +++++++++++++-------- res/res_ari_events.c | 1 - res/res_ari_mailboxes.c | 21 +++++++++++++-------- res/res_ari_playbacks.c | 21 +++++++++++++-------- res/res_ari_recordings.c | 21 +++++++++++++-------- res/res_ari_sounds.c | 21 +++++++++++++-------- 12 files changed, 132 insertions(+), 83 deletions(-) diff --git a/res/ari/resource_channels.h b/res/ari/resource_channels.h index f68db2f5b3..b071d08baf 100644 --- a/res/ari/resource_channels.h +++ b/res/ari/resource_channels.h @@ -78,7 +78,7 @@ struct ast_ari_channels_originate_args { const char *other_channel_id; /*! The unique id of the channel which is originating this one. */ const char *originator; - /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names an be found with "core show codecs". */ + /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */ const char *formats; }; /*! @@ -179,7 +179,7 @@ struct ast_ari_channels_originate_with_id_args { const char *other_channel_id; /*! The unique id of the channel which is originating this one. */ const char *originator; - /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names an be found with "core show codecs". */ + /*! The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs". */ const char *formats; }; /*! diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c index 951ee85b7c..21d9f56eb0 100644 --- a/res/res_ari_applications.c +++ b/res/res_ari_applications.c @@ -490,14 +490,6 @@ static struct stasis_rest_handlers applications = { .children = { &applications_applicationName, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&applications); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&applications); @@ -505,6 +497,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&applications); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Stasis application resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c index 1dbd850bb4..89517ccae0 100644 --- a/res/res_ari_asterisk.c +++ b/res/res_ari_asterisk.c @@ -1211,14 +1211,6 @@ static struct stasis_rest_handlers asterisk = { .children = { &asterisk_config,&asterisk_info,&asterisk_modules,&asterisk_logging,&asterisk_variable, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&asterisk); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&asterisk); @@ -1226,6 +1218,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&asterisk); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Asterisk resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c index e61865e311..5402c2b995 100644 --- a/res/res_ari_bridges.c +++ b/res/res_ari_bridges.c @@ -1537,14 +1537,6 @@ static struct stasis_rest_handlers bridges = { .children = { &bridges_bridgeId, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&bridges); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&bridges); @@ -1552,6 +1544,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&bridges); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Bridge resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c index 739eb0135b..9d218e2bee 100644 --- a/res/res_ari_channels.c +++ b/res/res_ari_channels.c @@ -2841,14 +2841,6 @@ static struct stasis_rest_handlers channels = { .children = { &channels_create,&channels_channelId, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&channels); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&channels); @@ -2856,6 +2848,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&channels); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Channel resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c index b2aea525e7..d6de5dff86 100644 --- a/res/res_ari_device_states.c +++ b/res/res_ari_device_states.c @@ -321,14 +321,6 @@ static struct stasis_rest_handlers deviceStates = { .children = { &deviceStates_deviceName, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&deviceStates); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&deviceStates); @@ -336,6 +328,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&deviceStates); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Device state resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c index 944146fcb5..d96de0877b 100644 --- a/res/res_ari_endpoints.c +++ b/res/res_ari_endpoints.c @@ -445,14 +445,6 @@ static struct stasis_rest_handlers endpoints = { .children = { &endpoints_sendMessage,&endpoints_tech, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&endpoints); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&endpoints); @@ -460,6 +452,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&endpoints); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Endpoint resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_events.c b/res/res_ari_events.c index 76b7917199..3f5b89a440 100644 --- a/res/res_ari_events.c +++ b/res/res_ari_events.c @@ -454,7 +454,6 @@ static int load_module(void) res |= ast_websocket_server_add_protocol2(events.ws_server, protocol); stasis_app_ref(); res |= ast_ari_add_handler(&events); - if (res) { unload_module(); return AST_MODULE_LOAD_DECLINE; diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c index 2eac609872..12c33cd884 100644 --- a/res/res_ari_mailboxes.c +++ b/res/res_ari_mailboxes.c @@ -327,14 +327,6 @@ static struct stasis_rest_handlers mailboxes = { .children = { &mailboxes_mailboxName, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&mailboxes); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&mailboxes); @@ -342,6 +334,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&mailboxes); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Mailboxes resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c index 8267a91b5a..e2c432db03 100644 --- a/res/res_ari_playbacks.c +++ b/res/res_ari_playbacks.c @@ -279,14 +279,6 @@ static struct stasis_rest_handlers playbacks = { .children = { &playbacks_playbackId, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&playbacks); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&playbacks); @@ -294,6 +286,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&playbacks); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Playback control resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c index e82605c7bc..57d80f2e0f 100644 --- a/res/res_ari_recordings.c +++ b/res/res_ari_recordings.c @@ -863,14 +863,6 @@ static struct stasis_rest_handlers recordings = { .children = { &recordings_stored,&recordings_live, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&recordings); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&recordings); @@ -878,6 +870,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&recordings); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Recording resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c index fe0692f166..fded7fbced 100644 --- a/res/res_ari_sounds.c +++ b/res/res_ari_sounds.c @@ -209,14 +209,6 @@ static struct stasis_rest_handlers sounds = { .children = { &sounds_soundId, } }; -static int load_module(void) -{ - int res = 0; - stasis_app_ref(); - res |= ast_ari_add_handler(&sounds); - return res; -} - static int unload_module(void) { ast_ari_remove_handler(&sounds); @@ -224,6 +216,19 @@ static int unload_module(void) return 0; } +static int load_module(void) +{ + int res = 0; + stasis_app_ref(); + res |= ast_ari_add_handler(&sounds); + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } + + return AST_MODULE_LOAD_SUCCESS; +} + AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Sound resources", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module,