summaryrefslogtreecommitdiff
path: root/apps/app_mp3.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
committerRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
commit5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch)
tree9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_mp3.c
parent1fef0f63bbbde9530837995c8790b839f73b74e7 (diff)
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_mp3.c')
-rw-r--r--apps/app_mp3.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/apps/app_mp3.c b/apps/app_mp3.c
index 23db94fbc..688be6a00 100644
--- a/apps/app_mp3.c
+++ b/apps/app_mp3.c
@@ -44,16 +44,26 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
#define MPG_123 "/usr/bin/mpg123"
+/*** DOCUMENTATION
+ <application name="MP3Player" language="en_US">
+ <synopsis>
+ Play an MP3 file or stream.
+ </synopsis>
+ <syntax>
+ <parameter name="Location" required="true">
+ <para>Location of the file to be played.
+ (argument passed to mpg123)</para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>Executes mpg123 to play the given location, which typically would be a filename or a URL.
+ User can exit by pressing any key on the dialpad, or by hanging up.</para>
+ </description>
+ </application>
+
+ ***/
static char *app = "MP3Player";
-static char *synopsis = "Play an MP3 file or stream";
-
-static char *descrip =
-" MP3Player(location): Executes mpg123 to play the given location,\n"
-"which typically would be a filename or a URL. User can exit by pressing\n"
-"any key on the dialpad, or by hanging up.";
-
-
static int mp3play(char *filename, int fd)
{
int res;
@@ -221,7 +231,7 @@ static int unload_module(void)
static int load_module(void)
{
- return ast_register_application(app, mp3_exec, synopsis, descrip);
+ return ast_register_application_xml(app, mp3_exec);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Silly MP3 Application");