[asterisk-commits] kmoore: branch kmoore/stasis-http_sounds r387779 - /team/kmoore/stasis-http_s...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 6 15:00:43 CDT 2013
Author: kmoore
Date: Mon May 6 15:00:41 2013
New Revision: 387779
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387779
Log:
Add documentation
Modified:
team/kmoore/stasis-http_sounds/res/stasis_http/resource_sounds.c
Modified: team/kmoore/stasis-http_sounds/res/stasis_http/resource_sounds.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-http_sounds/res/stasis_http/resource_sounds.c?view=diff&rev=387779&r1=387778&r2=387779
==============================================================================
--- team/kmoore/stasis-http_sounds/res/stasis_http/resource_sounds.c (original)
+++ team/kmoore/stasis-http_sounds/res/stasis_http/resource_sounds.c Mon May 6 15:00:41 2013
@@ -33,12 +33,14 @@
#include "asterisk/format_cap.h"
#include "asterisk/json.h"
+/*! \brief arguments that are necessary for adding format/lang pairs */
struct lang_format_info {
- struct ast_json *format_list;
- const char *filename;
- const char *format_filter;
+ struct ast_json *format_list; /*!< The embedded array to which format/lang pairs should be added */
+ const char *filename; /*!< Name of the file for which to add format/lang pairs */
+ const char *format_filter; /*!< Format filter provided in the request */
};
+/*! \brief Add format/lang pairs to the array embedded in the sound object */
static int add_format_information_cb(void *obj, void *arg, int flags)
{
char *language = obj;
@@ -70,6 +72,7 @@
return 0;
}
+/*! \brief Filter out all languages not matching the specified language */
static int filter_langs_cb(void *obj, void *arg, int flags)
{
char *lang_filter = arg;
@@ -80,6 +83,7 @@
return 0;
}
+/*! \brief Generate a Sound structure as documented in sounds.json for the specified filename */
static struct ast_json *create_sound_blob(const char *filename, struct ast_get_sounds_args *args)
{
RAII_VAR(struct ast_json *, sound, NULL, ast_json_unref);
@@ -138,6 +142,7 @@
return ast_json_ref(sound);
}
+/*! \brief Generate a Sound structure and append it to the output blob */
static int append_sound_cb(void *obj, void *arg, void *data, int flags)
{
struct ast_json *sounds_array = arg;
More information about the asterisk-commits
mailing list