resource_bridges.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2012 - 2013, Digium, Inc.
00005  *
00006  * David M. Lee, II <dlee@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  *
00021  * \brief Generated file - declares stubs to be implemented in
00022  * res/ari/resource_bridges.c
00023  *
00024  * Bridge resources
00025  *
00026  * \author David M. Lee, II <dlee@digium.com>
00027  */
00028 
00029 /*
00030  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00031  * !!!!!                               DO NOT EDIT                        !!!!!
00032  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00033  * This file is generated by a mustache template. Please see the original
00034  * template in rest-api-templates/ari_resource.h.mustache
00035  */
00036 
00037 #ifndef _ASTERISK_RESOURCE_BRIDGES_H
00038 #define _ASTERISK_RESOURCE_BRIDGES_H
00039 
00040 #include "asterisk/ari.h"
00041 
00042 /*! Argument struct for ast_ari_bridges_list() */
00043 struct ast_ari_bridges_list_args {
00044 };
00045 /*!
00046  * \brief List all active bridges in Asterisk.
00047  *
00048  * \param headers HTTP headers
00049  * \param args Swagger parameters
00050  * \param[out] response HTTP response
00051  */
00052 void ast_ari_bridges_list(struct ast_variable *headers, struct ast_ari_bridges_list_args *args, struct ast_ari_response *response);
00053 /*! Argument struct for ast_ari_bridges_create() */
00054 struct ast_ari_bridges_create_args {
00055    /*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media). */
00056    const char *type;
00057    /*! Unique ID to give to the bridge being created. */
00058    const char *bridge_id;
00059    /*! Name to give to the bridge being created. */
00060    const char *name;
00061 };
00062 /*!
00063  * \brief Body parsing function for /bridges.
00064  * \param body The JSON body from which to parse parameters.
00065  * \param[out] args The args structure to parse into.
00066  * \retval zero on success
00067  * \retval non-zero on failure
00068  */
00069 int ast_ari_bridges_create_parse_body(
00070    struct ast_json *body,
00071    struct ast_ari_bridges_create_args *args);
00072 
00073 /*!
00074  * \brief Create a new bridge.
00075  *
00076  * This bridge persists until it has been shut down, or Asterisk has been shut down.
00077  *
00078  * \param headers HTTP headers
00079  * \param args Swagger parameters
00080  * \param[out] response HTTP response
00081  */
00082 void ast_ari_bridges_create(struct ast_variable *headers, struct ast_ari_bridges_create_args *args, struct ast_ari_response *response);
00083 /*! Argument struct for ast_ari_bridges_create_with_id() */
00084 struct ast_ari_bridges_create_with_id_args {
00085    /*! Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set. */
00086    const char *type;
00087    /*! Unique ID to give to the bridge being created. */
00088    const char *bridge_id;
00089    /*! Set the name of the bridge. */
00090    const char *name;
00091 };
00092 /*!
00093  * \brief Body parsing function for /bridges/{bridgeId}.
00094  * \param body The JSON body from which to parse parameters.
00095  * \param[out] args The args structure to parse into.
00096  * \retval zero on success
00097  * \retval non-zero on failure
00098  */
00099 int ast_ari_bridges_create_with_id_parse_body(
00100    struct ast_json *body,
00101    struct ast_ari_bridges_create_with_id_args *args);
00102 
00103 /*!
00104  * \brief Create a new bridge or updates an existing one.
00105  *
00106  * This bridge persists until it has been shut down, or Asterisk has been shut down.
00107  *
00108  * \param headers HTTP headers
00109  * \param args Swagger parameters
00110  * \param[out] response HTTP response
00111  */
00112 void ast_ari_bridges_create_with_id(struct ast_variable *headers, struct ast_ari_bridges_create_with_id_args *args, struct ast_ari_response *response);
00113 /*! Argument struct for ast_ari_bridges_get() */
00114 struct ast_ari_bridges_get_args {
00115    /*! Bridge's id */
00116    const char *bridge_id;
00117 };
00118 /*!
00119  * \brief Get bridge details.
00120  *
00121  * \param headers HTTP headers
00122  * \param args Swagger parameters
00123  * \param[out] response HTTP response
00124  */
00125 void ast_ari_bridges_get(struct ast_variable *headers, struct ast_ari_bridges_get_args *args, struct ast_ari_response *response);
00126 /*! Argument struct for ast_ari_bridges_destroy() */
00127 struct ast_ari_bridges_destroy_args {
00128    /*! Bridge's id */
00129    const char *bridge_id;
00130 };
00131 /*!
00132  * \brief Shut down a bridge.
00133  *
00134  * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
00135  *
00136  * \param headers HTTP headers
00137  * \param args Swagger parameters
00138  * \param[out] response HTTP response
00139  */
00140 void ast_ari_bridges_destroy(struct ast_variable *headers, struct ast_ari_bridges_destroy_args *args, struct ast_ari_response *response);
00141 /*! Argument struct for ast_ari_bridges_add_channel() */
00142 struct ast_ari_bridges_add_channel_args {
00143    /*! Bridge's id */
00144    const char *bridge_id;
00145    /*! Array of Ids of channels to add to bridge */
00146    const char **channel;
00147    /*! Length of channel array. */
00148    size_t channel_count;
00149    /*! Parsing context for channel. */
00150    char *channel_parse;
00151    /*! Channel's role in the bridge */
00152    const char *role;
00153 };
00154 /*!
00155  * \brief Body parsing function for /bridges/{bridgeId}/addChannel.
00156  * \param body The JSON body from which to parse parameters.
00157  * \param[out] args The args structure to parse into.
00158  * \retval zero on success
00159  * \retval non-zero on failure
00160  */
00161 int ast_ari_bridges_add_channel_parse_body(
00162    struct ast_json *body,
00163    struct ast_ari_bridges_add_channel_args *args);
00164 
00165 /*!
00166  * \brief Add a channel to a bridge.
00167  *
00168  * \param headers HTTP headers
00169  * \param args Swagger parameters
00170  * \param[out] response HTTP response
00171  */
00172 void ast_ari_bridges_add_channel(struct ast_variable *headers, struct ast_ari_bridges_add_channel_args *args, struct ast_ari_response *response);
00173 /*! Argument struct for ast_ari_bridges_remove_channel() */
00174 struct ast_ari_bridges_remove_channel_args {
00175    /*! Bridge's id */
00176    const char *bridge_id;
00177    /*! Array of Ids of channels to remove from bridge */
00178    const char **channel;
00179    /*! Length of channel array. */
00180    size_t channel_count;
00181    /*! Parsing context for channel. */
00182    char *channel_parse;
00183 };
00184 /*!
00185  * \brief Body parsing function for /bridges/{bridgeId}/removeChannel.
00186  * \param body The JSON body from which to parse parameters.
00187  * \param[out] args The args structure to parse into.
00188  * \retval zero on success
00189  * \retval non-zero on failure
00190  */
00191 int ast_ari_bridges_remove_channel_parse_body(
00192    struct ast_json *body,
00193    struct ast_ari_bridges_remove_channel_args *args);
00194 
00195 /*!
00196  * \brief Remove a channel from a bridge.
00197  *
00198  * \param headers HTTP headers
00199  * \param args Swagger parameters
00200  * \param[out] response HTTP response
00201  */
00202 void ast_ari_bridges_remove_channel(struct ast_variable *headers, struct ast_ari_bridges_remove_channel_args *args, struct ast_ari_response *response);
00203 /*! Argument struct for ast_ari_bridges_start_moh() */
00204 struct ast_ari_bridges_start_moh_args {
00205    /*! Bridge's id */
00206    const char *bridge_id;
00207    /*! Channel's id */
00208    const char *moh_class;
00209 };
00210 /*!
00211  * \brief Body parsing function for /bridges/{bridgeId}/moh.
00212  * \param body The JSON body from which to parse parameters.
00213  * \param[out] args The args structure to parse into.
00214  * \retval zero on success
00215  * \retval non-zero on failure
00216  */
00217 int ast_ari_bridges_start_moh_parse_body(
00218    struct ast_json *body,
00219    struct ast_ari_bridges_start_moh_args *args);
00220 
00221 /*!
00222  * \brief Play music on hold to a bridge or change the MOH class that is playing.
00223  *
00224  * \param headers HTTP headers
00225  * \param args Swagger parameters
00226  * \param[out] response HTTP response
00227  */
00228 void ast_ari_bridges_start_moh(struct ast_variable *headers, struct ast_ari_bridges_start_moh_args *args, struct ast_ari_response *response);
00229 /*! Argument struct for ast_ari_bridges_stop_moh() */
00230 struct ast_ari_bridges_stop_moh_args {
00231    /*! Bridge's id */
00232    const char *bridge_id;
00233 };
00234 /*!
00235  * \brief Stop playing music on hold to a bridge.
00236  *
00237  * This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
00238  *
00239  * \param headers HTTP headers
00240  * \param args Swagger parameters
00241  * \param[out] response HTTP response
00242  */
00243 void ast_ari_bridges_stop_moh(struct ast_variable *headers, struct ast_ari_bridges_stop_moh_args *args, struct ast_ari_response *response);
00244 /*! Argument struct for ast_ari_bridges_play() */
00245 struct ast_ari_bridges_play_args {
00246    /*! Bridge's id */
00247    const char *bridge_id;
00248    /*! Media's URI to play. */
00249    const char *media;
00250    /*! For sounds, selects language for sound. */
00251    const char *lang;
00252    /*! Number of media to skip before playing. */
00253    int offsetms;
00254    /*! Number of milliseconds to skip for forward/reverse operations. */
00255    int skipms;
00256    /*! Playback Id. */
00257    const char *playback_id;
00258 };
00259 /*!
00260  * \brief Body parsing function for /bridges/{bridgeId}/play.
00261  * \param body The JSON body from which to parse parameters.
00262  * \param[out] args The args structure to parse into.
00263  * \retval zero on success
00264  * \retval non-zero on failure
00265  */
00266 int ast_ari_bridges_play_parse_body(
00267    struct ast_json *body,
00268    struct ast_ari_bridges_play_args *args);
00269 
00270 /*!
00271  * \brief Start playback of media on a bridge.
00272  *
00273  * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
00274  *
00275  * \param headers HTTP headers
00276  * \param args Swagger parameters
00277  * \param[out] response HTTP response
00278  */
00279 void ast_ari_bridges_play(struct ast_variable *headers, struct ast_ari_bridges_play_args *args, struct ast_ari_response *response);
00280 /*! Argument struct for ast_ari_bridges_play_with_id() */
00281 struct ast_ari_bridges_play_with_id_args {
00282    /*! Bridge's id */
00283    const char *bridge_id;
00284    /*! Playback ID. */
00285    const char *playback_id;
00286    /*! Media's URI to play. */
00287    const char *media;
00288    /*! For sounds, selects language for sound. */
00289    const char *lang;
00290    /*! Number of media to skip before playing. */
00291    int offsetms;
00292    /*! Number of milliseconds to skip for forward/reverse operations. */
00293    int skipms;
00294 };
00295 /*!
00296  * \brief Body parsing function for /bridges/{bridgeId}/play/{playbackId}.
00297  * \param body The JSON body from which to parse parameters.
00298  * \param[out] args The args structure to parse into.
00299  * \retval zero on success
00300  * \retval non-zero on failure
00301  */
00302 int ast_ari_bridges_play_with_id_parse_body(
00303    struct ast_json *body,
00304    struct ast_ari_bridges_play_with_id_args *args);
00305 
00306 /*!
00307  * \brief Start playback of media on a bridge.
00308  *
00309  * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
00310  *
00311  * \param headers HTTP headers
00312  * \param args Swagger parameters
00313  * \param[out] response HTTP response
00314  */
00315 void ast_ari_bridges_play_with_id(struct ast_variable *headers, struct ast_ari_bridges_play_with_id_args *args, struct ast_ari_response *response);
00316 /*! Argument struct for ast_ari_bridges_record() */
00317 struct ast_ari_bridges_record_args {
00318    /*! Bridge's id */
00319    const char *bridge_id;
00320    /*! Recording's filename */
00321    const char *name;
00322    /*! Format to encode audio in */
00323    const char *format;
00324    /*! Maximum duration of the recording, in seconds. 0 for no limit. */
00325    int max_duration_seconds;
00326    /*! Maximum duration of silence, in seconds. 0 for no limit. */
00327    int max_silence_seconds;
00328    /*! Action to take if a recording with the same name already exists. */
00329    const char *if_exists;
00330    /*! Play beep when recording begins */
00331    int beep;
00332    /*! DTMF input to terminate recording. */
00333    const char *terminate_on;
00334 };
00335 /*!
00336  * \brief Body parsing function for /bridges/{bridgeId}/record.
00337  * \param body The JSON body from which to parse parameters.
00338  * \param[out] args The args structure to parse into.
00339  * \retval zero on success
00340  * \retval non-zero on failure
00341  */
00342 int ast_ari_bridges_record_parse_body(
00343    struct ast_json *body,
00344    struct ast_ari_bridges_record_args *args);
00345 
00346 /*!
00347  * \brief Start a recording.
00348  *
00349  * This records the mixed audio from all channels participating in this bridge.
00350  *
00351  * \param headers HTTP headers
00352  * \param args Swagger parameters
00353  * \param[out] response HTTP response
00354  */
00355 void ast_ari_bridges_record(struct ast_variable *headers, struct ast_ari_bridges_record_args *args, struct ast_ari_response *response);
00356 
00357 #endif /* _ASTERISK_RESOURCE_BRIDGES_H */

Generated on Thu Apr 16 06:27:53 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6