| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Stasis Application Mailbox API. See StasisApplication API" for detailed documentation. More...


Go to the source code of this file.
| Enumerations | |
| enum | stasis_mailbox_result { STASIS_MAILBOX_OK , STASIS_MAILBOX_MISSING , STASIS_MAILBOX_ERROR } | 
| Functions | |
| enum stasis_mailbox_result | stasis_app_mailbox_delete (const char *name) | 
| Delete a mailbox controlled by ARI. | |
| enum stasis_mailbox_result | stasis_app_mailbox_to_json (const char *name, struct ast_json **json) | 
| Convert mailbox to JSON. | |
| int | stasis_app_mailbox_update (const char *name, int old_messages, int new_messages) | 
| Changes the state of a mailbox. | |
| struct ast_json * | stasis_app_mailboxes_to_json (void) | 
| Convert mailboxes to json array. | |
Stasis Application Mailbox API. See StasisApplication API" for detailed documentation.
Definition in file stasis_app_mailbox.h.
Stasis mailbox operation result codes
| Enumerator | |
|---|---|
| STASIS_MAILBOX_OK | Mailbox operation completed successfully | 
| STASIS_MAILBOX_MISSING | Mailbox of the requested name does not exist | 
| STASIS_MAILBOX_ERROR | Mailbox operation failed internally | 
Definition at line 35 of file stasis_app_mailbox.h.
| enum stasis_mailbox_result stasis_app_mailbox_delete | ( | const char * | name | ) | 
Delete a mailbox controlled by ARI.
| name | the name of the ARI controlled mailbox | 
Definition at line 122 of file res_stasis_mailbox.c.
References ast_mwi_mailbox_delete(), ast_mwi_mailbox_get(), ast_mwi_mailbox_unref, name, NULL, STASIS_MAILBOX_ERROR, STASIS_MAILBOX_MISSING, and STASIS_MAILBOX_OK.
Referenced by ast_ari_mailboxes_delete().
| enum stasis_mailbox_result stasis_app_mailbox_to_json | ( | const char * | name, | 
| struct ast_json ** | json | ||
| ) | 
Convert mailbox to JSON.
| name | the name of the mailbox | 
| json | If the query is successful, this pointer at this address will be set to the JSON representation of the mailbox | 
| NULL | on error. | 
Definition at line 46 of file res_stasis_mailbox.c.
References ast_mwi_mailbox_get(), ast_mwi_mailbox_unref, mailbox_to_json(), name, STASIS_MAILBOX_ERROR, STASIS_MAILBOX_MISSING, and STASIS_MAILBOX_OK.
Referenced by ast_ari_mailboxes_get().
| int stasis_app_mailbox_update | ( | const char * | name, | 
| int | old_messages, | ||
| int | new_messages | ||
| ) | 
Changes the state of a mailbox.
| name | The name of the ARI controlled mailbox | 
| old_messages | count of old (read) messages in the mailbox | 
| new_messages | count of new (unread) messages in the mailbox | 
| 0 | if successful | 
| -1 | on internal error. | 
Definition at line 101 of file res_stasis_mailbox.c.
References ast_mwi_mailbox_alloc(), ast_mwi_mailbox_set_msgs_new(), ast_mwi_mailbox_set_msgs_old(), ast_mwi_mailbox_unref, ast_mwi_mailbox_update(), and name.
Referenced by ast_ari_mailboxes_update().
| struct ast_json * stasis_app_mailboxes_to_json | ( | void | ) | 
Convert mailboxes to json array.
| NULL | on error. | 
Definition at line 68 of file res_stasis_mailbox.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, array(), ast_json_array_append(), ast_json_array_create(), ast_json_unref(), ast_mwi_mailbox_get_all(), ast_mwi_mailbox_unref, mailbox_to_json(), mailboxes, and NULL.
Referenced by ast_ari_mailboxes_list().