Asterisk - The Open Source Telephony Project
18.5.0
|
Mailboxes resources. More...
#include "asterisk.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/stasis_app.h"
#include "ari/resource_mailboxes.h"
#include "ari/ari_model_validators.h"
Go to the source code of this file.
Macros | |
#define | MAX_VALS 128 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | ast_ari_mailboxes_delete_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /mailboxes/{mailboxName}. More... | |
static void | ast_ari_mailboxes_get_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /mailboxes/{mailboxName}. More... | |
static void | ast_ari_mailboxes_list_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /mailboxes. More... | |
static void | ast_ari_mailboxes_update_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /mailboxes/{mailboxName}. More... | |
int | ast_ari_mailboxes_update_parse_body (struct ast_json *body, struct ast_ari_mailboxes_update_args *args) |
Body parsing function for /mailboxes/{mailboxName}. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "RESTful API module - Mailboxes resources" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_ari,res_ari_model,res_stasis,res_stasis_mailbox", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct stasis_rest_handlers | mailboxes |
REST handler for /api-docs/mailboxes.json. More... | |
static struct stasis_rest_handlers | mailboxes_mailboxName |
REST handler for /api-docs/mailboxes.json. More... | |
Mailboxes resources.
Definition in file res_ari_mailboxes.c.
#define MAX_VALS 128 |
Definition at line 52 of file res_ari_mailboxes.c.
|
static |
Definition at line 356 of file res_ari_mailboxes.c.
|
static |
Definition at line 356 of file res_ari_mailboxes.c.
|
static |
Parameter parsing callback for /mailboxes/{mailboxName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 257 of file res_ari_mailboxes.c.
References ast_ari_mailboxes_delete(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_mailboxes_delete_args::mailbox_name, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /mailboxes/{mailboxName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 111 of file res_ari_mailboxes.c.
References ast_ari_mailboxes_get(), ast_ari_response_error(), ast_ari_validate_mailbox(), ast_log, LOG_ERROR, ast_ari_mailboxes_get_args::mailbox_name, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /mailboxes.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 61 of file res_ari_mailboxes.c.
References ast_ari_mailboxes_list(), ast_ari_response_error(), ast_ari_validate_list(), ast_ari_validate_mailbox_fn(), ast_log, LOG_ERROR, ast_ari_response::message, NULL, and ast_ari_response::response_code.
|
static |
Parameter parsing callback for /mailboxes/{mailboxName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 186 of file res_ari_mailboxes.c.
References ast_ari_mailboxes_update(), ast_ari_mailboxes_update_parse_body(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_mailboxes_update_args::mailbox_name, ast_ari_response::message, ast_variable::name, ast_ari_mailboxes_update_args::new_messages, ast_variable::next, NULL, ast_ari_mailboxes_update_args::old_messages, ast_ari_response::response_code, and ast_variable::value.
int ast_ari_mailboxes_update_parse_body | ( | struct ast_json * | body, |
struct ast_ari_mailboxes_update_args * | args | ||
) |
Body parsing function for /mailboxes/{mailboxName}.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 162 of file res_ari_mailboxes.c.
References ast_json_integer_get(), ast_json_object_get(), ast_ari_mailboxes_update_args::new_messages, and ast_ari_mailboxes_update_args::old_messages.
Referenced by ast_ari_mailboxes_update_cb().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 356 of file res_ari_mailboxes.c.
|
static |
Definition at line 337 of file res_ari_mailboxes.c.
References ast_ari_add_handler(), AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, and unload_module().
|
static |
Definition at line 331 of file res_ari_mailboxes.c.
References ast_ari_remove_handler().
Referenced by load_module().
|
static |
Definition at line 356 of file res_ari_mailboxes.c.
|
static |
Definition at line 356 of file res_ari_mailboxes.c.
|
static |
REST handler for /api-docs/mailboxes.json.
Definition at line 322 of file res_ari_mailboxes.c.
Referenced by ast_mwi_mailbox_delete_all(), ast_mwi_mailbox_delete_by_regex(), ast_sip_initialize_sorcery_location(), create_unsolicited_mwi_subscriptions(), free_zone(), mwi_initial_events(), mwi_mailbox_get(), mwi_on_aor(), mwi_validate_for_aor(), and stasis_app_mailboxes_to_json().
|
static |
REST handler for /api-docs/mailboxes.json.
Definition at line 310 of file res_ari_mailboxes.c.