Asterisk - The Open Source Telephony Project GIT-master-8924258
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
resource_events.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2012 - 2013, Digium, Inc.
5 *
6 * David M. Lee, II <dlee@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 *
21 * \brief Generated file - declares stubs to be implemented in
22 * res/ari/resource_events.c
23 *
24 * WebSocket resource
25 *
26 * \author David M. Lee, II <dlee@digium.com>
27 */
28
29/*
30 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31 * !!!!! DO NOT EDIT !!!!!
32 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 * This file is generated by a mustache template. Please see the original
34 * template in rest-api-templates/ari_resource.h.mustache
35 */
36
37#ifndef _ASTERISK_RESOURCE_EVENTS_H
38#define _ASTERISK_RESOURCE_EVENTS_H
39
40#include "asterisk/ari.h"
41
42/*! Argument struct for ast_ari_events_event_websocket() */
44 /*! Array of Applications to subscribe to. */
45 const char **app;
46 /*! Length of app array. */
47 size_t app_count;
48 /*! Parsing context for app. */
49 char *app_parse;
50 /*! Subscribe to all Asterisk events. If provided, the applications listed will be subscribed to all events, effectively disabling the application specific subscriptions. Default is 'false'. */
52};
53/*! Argument struct for ast_ari_events_user_event() */
55 /*! Event name */
56 const char *event_name;
57 /*! The name of the application that will receive this event */
58 const char *application;
59 /*! Array of URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName} */
60 const char **source;
61 /*! Length of source array. */
63 /*! Parsing context for source. */
65 /*! The "variables" key in the body object holds custom key/value pairs to add to the user event. Ex. { "variables": { "key": "value" } } */
67};
68/*!
69 * \brief Body parsing function for /events/user/{eventName}.
70 * \param body The JSON body from which to parse parameters.
71 * \param[out] args The args structure to parse into.
72 * \retval zero on success
73 * \retval non-zero on failure
74 */
76 struct ast_json *body,
78
79/*!
80 * \brief Generate a user event.
81 *
82 * \param headers HTTP headers
83 * \param args Swagger parameters
84 * \param[out] response HTTP response
85 */
87
88#endif /* _ASTERISK_RESOURCE_EVENTS_H */
Asterisk RESTful API hooks.
int ast_ari_events_user_event_parse_body(struct ast_json *body, struct ast_ari_events_user_event_args *args)
Body parsing function for /events/user/{eventName}.
void ast_ari_events_user_event(struct ast_variable *headers, struct ast_ari_events_user_event_args *args, struct ast_ari_response *response)
Generate a user event.
Abstract JSON element (object, array, string, int, ...).
Structure for variables, used for configurations and for channel variables.
const char * args