Debian Codegraph @

res/ari/resource_endpoints.h

raw symbols SCIP
1 /*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2012 - 2013, Digium, Inc.
5 *
6 * David M. Lee, II <[email protected]>
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_endpoints.c
23 *
24 * Endpoint resources
25 *
26 * \author David M. Lee, II <[email protected]>
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_ENDPOINTS_H
38 #define _ASTERISK_RESOURCE_ENDPOINTS_H
39
40 #include "asterisk/ari.h"
41
42 /*! Argument struct for ast_ari_endpoints_list() */
43 struct ast_ari_endpoints_list_args {
44 };
45 /*!
46 * \brief List all endpoints.
47 *
48 * \param headers HTTP headers
49 * \param args Swagger parameters
50 * \param[out] response HTTP response
51 */
52 void ast_ari_endpoints_list(struct ast_variable *headers, struct ast_ari_endpoints_list_args *args, struct ast_ari_response *response);
53 /*! Argument struct for ast_ari_endpoints_send_message() */
54 struct ast_ari_endpoints_send_message_args {
55 /*! The endpoint resource or technology specific URI to send the message to. Valid resources are pjsip, and xmpp. */
56 const char *to;
57 /*! The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip, and xmpp. */
58 const char *from;
59 /*! The body of the message */
60 const char *body;
61 struct ast_json *variables;
62 };
63 /*!
64 * \brief Body parsing function for /endpoints/sendMessage.
65 * \param body The JSON body from which to parse parameters.
66 * \param[out] args The args structure to parse into.
67 * \retval zero on success
68 * \retval non-zero on failure
69 */
70 int ast_ari_endpoints_send_message_parse_body(
71 struct ast_json *body,
72 struct ast_ari_endpoints_send_message_args *args);
73
74 /*!
75 * \brief Send a message to some technology URI or endpoint.
76 *
77 * \param headers HTTP headers
78 * \param args Swagger parameters
79 * \param[out] response HTTP response
80 */
81 void ast_ari_endpoints_send_message(struct ast_variable *headers, struct ast_ari_endpoints_send_message_args *args, struct ast_ari_response *response);
82 /*! Argument struct for ast_ari_endpoints_refer() */
83 struct ast_ari_endpoints_refer_args {
84 /*! The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip. */
85 const char *to;
86 /*! The endpoint resource or technology specific identity to refer from. */
87 const char *from;
88 /*! The endpoint resource or technology specific URI to refer to. */
89 const char *refer_to;
90 /*! If true and "refer_to" refers to an Asterisk endpoint, the "refer_to" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint. */
91 int to_self;
92 /*! The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The "display_name" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI. */
93 struct ast_json *variables;
94 };
95 /*!
96 * \brief Body parsing function for /endpoints/refer.
97 * \param body The JSON body from which to parse parameters.
98 * \param[out] args The args structure to parse into.
99 * \retval zero on success
100 * \retval non-zero on failure
101 */
102 int ast_ari_endpoints_refer_parse_body(
103 struct ast_json *body,
104 struct ast_ari_endpoints_refer_args *args);
105
106 /*!
107 * \brief Refer an endpoint or technology URI to some technology URI or endpoint.
108 *
109 * \param headers HTTP headers
110 * \param args Swagger parameters
111 * \param[out] response HTTP response
112 */
113 void ast_ari_endpoints_refer(struct ast_variable *headers, struct ast_ari_endpoints_refer_args *args, struct ast_ari_response *response);
114 /*! Argument struct for ast_ari_endpoints_list_by_tech() */
115 struct ast_ari_endpoints_list_by_tech_args {
116 /*! Technology of the endpoints (pjsip,iax2,...) */
117 const char *tech;
118 };
119 /*!
120 * \brief List available endoints for a given endpoint technology.
121 *
122 * \param headers HTTP headers
123 * \param args Swagger parameters
124 * \param[out] response HTTP response
125 */
126 void ast_ari_endpoints_list_by_tech(struct ast_variable *headers, struct ast_ari_endpoints_list_by_tech_args *args, struct ast_ari_response *response);
127 /*! Argument struct for ast_ari_endpoints_get() */
128 struct ast_ari_endpoints_get_args {
129 /*! Technology of the endpoint */
130 const char *tech;
131 /*! ID of the endpoint */
132 const char *resource;
133 };
134 /*!
135 * \brief Details for an endpoint.
136 *
137 * \param headers HTTP headers
138 * \param args Swagger parameters
139 * \param[out] response HTTP response
140 */
141 void ast_ari_endpoints_get(struct ast_variable *headers, struct ast_ari_endpoints_get_args *args, struct ast_ari_response *response);
142 /*! Argument struct for ast_ari_endpoints_send_message_to_endpoint() */
143 struct ast_ari_endpoints_send_message_to_endpoint_args {
144 /*! Technology of the endpoint */
145 const char *tech;
146 /*! ID of the endpoint */
147 const char *resource;
148 /*! The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip and xmpp. */
149 const char *from;
150 /*! The body of the message */
151 const char *body;
152 struct ast_json *variables;
153 };
154 /*!
155 * \brief Body parsing function for /endpoints/{tech}/{resource}/sendMessage.
156 * \param body The JSON body from which to parse parameters.
157 * \param[out] args The args structure to parse into.
158 * \retval zero on success
159 * \retval non-zero on failure
160 */
161 int ast_ari_endpoints_send_message_to_endpoint_parse_body(
162 struct ast_json *body,
163 struct ast_ari_endpoints_send_message_to_endpoint_args *args);
164
165 /*!
166 * \brief Send a message to some endpoint in a technology.
167 *
168 * \param headers HTTP headers
169 * \param args Swagger parameters
170 * \param[out] response HTTP response
171 */
172 void ast_ari_endpoints_send_message_to_endpoint(struct ast_variable *headers, struct ast_ari_endpoints_send_message_to_endpoint_args *args, struct ast_ari_response *response);
173 /*! Argument struct for ast_ari_endpoints_refer_to_endpoint() */
174 struct ast_ari_endpoints_refer_to_endpoint_args {
175 /*! Technology of the endpoint */
176 const char *tech;
177 /*! ID of the endpoint */
178 const char *resource;
179 /*! The endpoint resource or technology specific identity to refer from. */
180 const char *from;
181 /*! The endpoint resource or technology specific URI to refer to. */
182 const char *refer_to;
183 /*! If true and "refer_to" refers to an Asterisk endpoint, the "refer_to" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint. */
184 int to_self;
185 /*! The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers, */
186 struct ast_json *variables;
187 };
188 /*!
189 * \brief Body parsing function for /endpoints/{tech}/{resource}/refer.
190 * \param body The JSON body from which to parse parameters.
191 * \param[out] args The args structure to parse into.
192 * \retval zero on success
193 * \retval non-zero on failure
194 */
195 int ast_ari_endpoints_refer_to_endpoint_parse_body(
196 struct ast_json *body,
197 struct ast_ari_endpoints_refer_to_endpoint_args *args);
198
199 /*!
200 * \brief Refer an endpoint or technology URI to some technology URI or endpoint.
201 *
202 * \param headers HTTP headers
203 * \param args Swagger parameters
204 * \param[out] response HTTP response
205 */
206 void ast_ari_endpoints_refer_to_endpoint(struct ast_variable *headers, struct ast_ari_endpoints_refer_to_endpoint_args *args, struct ast_ari_response *response);
207
208 #endif /* _ASTERISK_RESOURCE_ENDPOINTS_H */