Asterisk - The Open Source Telephony Project  GIT-master-e8cda4b
resource_device_states.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  * Kevin Harwell <kharwell@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_deviceStates.c
23  *
24  * Device state resources
25  *
26  * \author Kevin Harwell <kharwell@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_DEVICESTATES_H
38 #define _ASTERISK_RESOURCE_DEVICESTATES_H
39 
40 #include "asterisk/ari.h"
41 
42 /*! Argument struct for ast_ari_device_states_list() */
44 };
45 /*!
46  * \brief List all ARI controlled device states.
47  *
48  * \param headers HTTP headers
49  * \param args Swagger parameters
50  * \param[out] response HTTP response
51  */
53 /*! Argument struct for ast_ari_device_states_get() */
55  /*! Name of the device */
56  const char *device_name;
57 };
58 /*!
59  * \brief Retrieve the current state of a device.
60  *
61  * \param headers HTTP headers
62  * \param args Swagger parameters
63  * \param[out] response HTTP response
64  */
65 void ast_ari_device_states_get(struct ast_variable *headers, struct ast_ari_device_states_get_args *args, struct ast_ari_response *response);
66 /*! Argument struct for ast_ari_device_states_update() */
68  /*! Name of the device */
69  const char *device_name;
70  /*! Device state value */
71  const char *device_state;
72 };
73 /*!
74  * \brief Body parsing function for /deviceStates/{deviceName}.
75  * \param body The JSON body from which to parse parameters.
76  * \param[out] args The args structure to parse into.
77  * \retval zero on success
78  * \retval non-zero on failure
79  */
81  struct ast_json *body,
83 
84 /*!
85  * \brief Change the state of a device controlled by ARI. (Note - implicitly creates the device state).
86  *
87  * \param headers HTTP headers
88  * \param args Swagger parameters
89  * \param[out] response HTTP response
90  */
91 void ast_ari_device_states_update(struct ast_variable *headers, struct ast_ari_device_states_update_args *args, struct ast_ari_response *response);
92 /*! Argument struct for ast_ari_device_states_delete() */
94  /*! Name of the device */
95  const char *device_name;
96 };
97 /*!
98  * \brief Destroy a device-state controlled by ARI.
99  *
100  * \param headers HTTP headers
101  * \param args Swagger parameters
102  * \param[out] response HTTP response
103  */
104 void ast_ari_device_states_delete(struct ast_variable *headers, struct ast_ari_device_states_delete_args *args, struct ast_ari_response *response);
105 
106 #endif /* _ASTERISK_RESOURCE_DEVICESTATES_H */
void ast_ari_device_states_delete(struct ast_variable *headers, struct ast_ari_device_states_delete_args *args, struct ast_ari_response *response)
Destroy a device-state controlled by ARI.
Structure for variables, used for configurations and for channel variables.
Asterisk RESTful API hooks.
const char * args
void ast_ari_device_states_list(struct ast_variable *headers, struct ast_ari_device_states_list_args *args, struct ast_ari_response *response)
List all ARI controlled device states.
void ast_ari_device_states_get(struct ast_variable *headers, struct ast_ari_device_states_get_args *args, struct ast_ari_response *response)
Retrieve the current state of a device.
Abstract JSON element (object, array, string, int, ...).
int ast_ari_device_states_update_parse_body(struct ast_json *body, struct ast_ari_device_states_update_args *args)
Body parsing function for /deviceStates/{deviceName}.
void ast_ari_device_states_update(struct ast_variable *headers, struct ast_ari_device_states_update_args *args, struct ast_ari_response *response)
Change the state of a device controlled by ARI. (Note - implicitly creates the device state)...