Asterisk - The Open Source Telephony Project  18.5.0
resource_endpoints.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 <[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() */
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() */
55  /*! The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp. */
56  const char *to;
57  /*! The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp. */
58  const char *from;
59  /*! The body of the message */
60  const char *body;
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  */
71  struct ast_json *body,
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_list_by_tech() */
84  /*! Technology of the endpoints (sip,iax2,...) */
85  const char *tech;
86 };
87 /*!
88  * \brief List available endoints for a given endpoint technology.
89  *
90  * \param headers HTTP headers
91  * \param args Swagger parameters
92  * \param[out] response HTTP response
93  */
94 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);
95 /*! Argument struct for ast_ari_endpoints_get() */
97  /*! Technology of the endpoint */
98  const char *tech;
99  /*! ID of the endpoint */
100  const char *resource;
101 };
102 /*!
103  * \brief Details for an endpoint.
104  *
105  * \param headers HTTP headers
106  * \param args Swagger parameters
107  * \param[out] response HTTP response
108  */
109 void ast_ari_endpoints_get(struct ast_variable *headers, struct ast_ari_endpoints_get_args *args, struct ast_ari_response *response);
110 /*! Argument struct for ast_ari_endpoints_send_message_to_endpoint() */
112  /*! Technology of the endpoint */
113  const char *tech;
114  /*! ID of the endpoint */
115  const char *resource;
116  /*! The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp. */
117  const char *from;
118  /*! The body of the message */
119  const char *body;
121 };
122 /*!
123  * \brief Body parsing function for /endpoints/{tech}/{resource}/sendMessage.
124  * \param body The JSON body from which to parse parameters.
125  * \param[out] args The args structure to parse into.
126  * \retval zero on success
127  * \retval non-zero on failure
128  */
130  struct ast_json *body,
132 
133 /*!
134  * \brief Send a message to some endpoint in a technology.
135  *
136  * \param headers HTTP headers
137  * \param args Swagger parameters
138  * \param[out] response HTTP response
139  */
141 
142 #endif /* _ASTERISK_RESOURCE_ENDPOINTS_H */
int ast_ari_endpoints_send_message_parse_body(struct ast_json *body, struct ast_ari_endpoints_send_message_args *args)
Body parsing function for /endpoints/sendMessage.
Structure for variables, used for configurations and for channel variables.
Asterisk RESTful API hooks.
const char * args
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)
Send a message to some endpoint in a technology.
int ast_ari_endpoints_send_message_to_endpoint_parse_body(struct ast_json *body, struct ast_ari_endpoints_send_message_to_endpoint_args *args)
Body parsing function for /endpoints/{tech}/{resource}/sendMessage.
void ast_ari_endpoints_list(struct ast_variable *headers, struct ast_ari_endpoints_list_args *args, struct ast_ari_response *response)
List all endpoints.
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)
List available endoints for a given endpoint technology.
void ast_ari_endpoints_get(struct ast_variable *headers, struct ast_ari_endpoints_get_args *args, struct ast_ari_response *response)
Details for an endpoint.
Abstract JSON element (object, array, string, int, ...).
void ast_ari_endpoints_send_message(struct ast_variable *headers, struct ast_ari_endpoints_send_message_args *args, struct ast_ari_response *response)
Send a message to some technology URI or endpoint.