[asterisk-commits] eliel: branch group/appdocsxml r136886 - in /team/group/appdocsxml: apps/ cha...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 8 23:50:34 CDT 2008
Author: eliel
Date: Fri Aug 8 23:50:33 2008
New Revision: 136886
URL: http://svn.digium.com/view/asterisk?view=rev&rev=136886
Log:
Rollback revision 136850.
We don't need to move ast_register_application2() to non-constant parameters.
Just put a cast when assigning those values to the ast_app structure and leave everything as it is.
Modified:
team/group/appdocsxml/apps/app_chanspy.c
team/group/appdocsxml/apps/app_controlplayback.c
team/group/appdocsxml/apps/app_directed_pickup.c
team/group/appdocsxml/apps/app_externalivr.c
team/group/appdocsxml/apps/app_meetme.c
team/group/appdocsxml/apps/app_mixmonitor.c
team/group/appdocsxml/apps/app_osplookup.c
team/group/appdocsxml/apps/app_sendtext.c
team/group/appdocsxml/apps/app_stack.c
team/group/appdocsxml/apps/app_transfer.c
team/group/appdocsxml/channels/chan_agent.c
team/group/appdocsxml/channels/chan_nbs.c
team/group/appdocsxml/channels/chan_vpb.cc
team/group/appdocsxml/include/asterisk/module.h
team/group/appdocsxml/main/pbx.c
Modified: team/group/appdocsxml/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_chanspy.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_chanspy.c (original)
+++ team/group/appdocsxml/apps/app_chanspy.c Fri Aug 8 23:50:33 2008
@@ -52,9 +52,9 @@
#define AST_NAME_STRLEN 256
#define NUM_SPYGROUPS 128
-static char *tdesc = "Listen to a channel, and optionally whisper into it";
-static char *app_chan = "ChanSpy";
-static char *desc_chan =
+static const char *tdesc = "Listen to a channel, and optionally whisper into it";
+static const char *app_chan = "ChanSpy";
+static const char *desc_chan =
" ChanSpy([chanprefix][,options]): This application is used to listen to the\n"
"audio from an Asterisk channel. This includes the audio coming in and\n"
"out of the channel being spied on. If the 'chanprefix' parameter is specified,\n"
@@ -119,7 +119,7 @@
;
static const char *app_ext = "ExtenSpy";
-static char *desc_ext =
+static const char *desc_ext =
" ExtenSpy(exten[@context][,options]): This application is used to listen to the\n"
"audio from an Asterisk channel. This includes the audio coming in and\n"
"out of the channel being spied on. Only channels created by outgoing calls for the\n"
Modified: team/group/appdocsxml/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_controlplayback.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_controlplayback.c (original)
+++ team/group/appdocsxml/apps/app_controlplayback.c Fri Aug 8 23:50:33 2008
@@ -35,9 +35,9 @@
static const char *app = "ControlPlayback";
-static char *synopsis = "Play a file with fast forward and rewind";
+static const char *synopsis = "Play a file with fast forward and rewind";
-static char *descrip =
+static const char *descrip =
" ControlPlayback(file[,skipms[,ff[,rew[,stop[,pause[,restart,options]]]]]]]):\n"
"This application will play back the given filename. By default, the '*' key\n"
"can be used to rewind, and the '#' key can be used to fast-forward.\n"
Modified: team/group/appdocsxml/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_directed_pickup.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_directed_pickup.c (original)
+++ team/group/appdocsxml/apps/app_directed_pickup.c Fri Aug 8 23:50:33 2008
@@ -44,8 +44,8 @@
#define PICKUPMARK "PICKUPMARK"
static const char *app = "Pickup";
-static char *synopsis = "Directed Call Pickup";
-static char *descrip =
+static const char *synopsis = "Directed Call Pickup";
+static const char *descrip =
" Pickup([extension[@context][&extension2@[context]...]]): This application can\n"
"pickup any ringing channel that is calling the specified extension. If no\n"
"context is specified, the current context will be used. If you use the special\n"
@@ -56,8 +56,8 @@
"the pickup group of the active channel.";
static const char *app2 = "PickupChan";
-static char *synopsis2 = "Pickup a ringing channel";
-static char *descrip2 =
+static const char *synopsis2 = "Pickup a ringing channel";
+static const char *descrip2 =
" PickupChan(channel[&channel...]): This application can pickup any ringing channel\n";
/*! \todo This application should return a result code, like PICKUPRESULT */
Modified: team/group/appdocsxml/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_externalivr.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_externalivr.c (original)
+++ team/group/appdocsxml/apps/app_externalivr.c Fri Aug 8 23:50:33 2008
@@ -49,8 +49,8 @@
static const char *app = "ExternalIVR";
-static char *synopsis = "Interfaces with an external IVR application";
-static char *descrip =
+static const char *synopsis = "Interfaces with an external IVR application";
+static const char *descrip =
" ExternalIVR(command|ivr://ivrhosti([,arg[,arg...]])[,options]): Either forks a process\n"
"to run given command or makes a socket to connect to given host and starts\n"
"a generator on the channel. The generator's play list is controlled by the\n"
Modified: team/group/appdocsxml/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_meetme.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_meetme.c (original)
+++ team/group/appdocsxml/apps/app_meetme.c Fri Aug 8 23:50:33 2008
@@ -207,12 +207,12 @@
static const char *slastation_app = "SLAStation";
static const char *slatrunk_app = "SLATrunk";
-static char *synopsis = "MeetMe conference bridge";
-static char *synopsis2 = "MeetMe participant count";
-static char *synopsis3 = "MeetMe conference Administration";
-static char *synopsis4 = "MeetMe conference Administration (channel specific)";
-static char *slastation_synopsis = "Shared Line Appearance Station";
-static char *slatrunk_synopsis = "Shared Line Appearance Trunk";
+static const char *synopsis = "MeetMe conference bridge";
+static const char *synopsis2 = "MeetMe participant count";
+static const char *synopsis3 = "MeetMe conference Administration";
+static const char *synopsis4 = "MeetMe conference Administration (channel specific)";
+static const char *slastation_synopsis = "Shared Line Appearance Station";
+static const char *slatrunk_synopsis = "Shared Line Appearance Trunk";
/* Lookup RealTime conferences based on confno and current time */
static int rt_schedule;
@@ -223,7 +223,7 @@
/* Log participant count to the RealTime backend */
static int rt_log_members;
-static char *descrip =
+static const char *descrip =
" MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
"conference. If the conference number is omitted, the user will be prompted\n"
"to enter one. User can exit the conference by hangup, or if the 'p' option\n"
@@ -286,7 +286,7 @@
" The default is to say the time remaining.\n"
"";
-static char *descrip2 =
+static const char *descrip2 =
" MeetMeCount(confno[,var]): Plays back the number of users in the specified\n"
"MeetMe conference. If var is specified, playback will be skipped and the value\n"
"will be returned in the variable. Upon app completion, MeetMeCount will hangup\n"
@@ -294,7 +294,7 @@
"continue.\n"
"";
-static char *descrip3 =
+static const char *descrip3 =
" MeetMeAdmin(confno,command[,user]): Run admin command for conference\n"
" 'e' -- Eject last user that joined\n"
" 'k' -- Kick one user out of conference\n"
@@ -317,7 +317,7 @@
" 'V' -- Raise entire conference listening volume\n"
"";
-static char *descrip4 =
+static const char *descrip4 =
" MeetMeChannelAdmin(channel,command): Run admin command for a specific\n"
"channel in any coference.\n"
" 'k' -- Kick the specified user out of the conference he is in\n"
@@ -325,7 +325,7 @@
" 'M' -- Mute the specified user\n"
"";
-static char *slastation_desc =
+static const char *slastation_desc =
" SLAStation(<station name>):\n"
"This application should be executed by an SLA station. The argument depends\n"
"on how the call was initiated. If the phone was just taken off hook, then\n"
@@ -338,7 +338,7 @@
" FAILURE | CONGESTION | SUCCESS\n"
"";
-static char *slatrunk_desc =
+static const char *slatrunk_desc =
" SLATrunk(<trunk name>[,options]):\n"
"This application should be executed by an SLA trunk on an inbound call.\n"
"The channel calling this application should correspond to the SLA trunk\n"
Modified: team/group/appdocsxml/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_mixmonitor.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_mixmonitor.c (original)
+++ team/group/appdocsxml/apps/app_mixmonitor.c Fri Aug 8 23:50:33 2008
@@ -49,8 +49,8 @@
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
static const char *app = "MixMonitor";
-static char *synopsis = "Record a call and mix the audio during the recording";
-static char *desc = ""
+static const char *synopsis = "Record a call and mix the audio during the recording";
+static const char *desc = ""
" MixMonitor(<file>.<ext>[,<options>[,<command>]]):\n"
"Records the audio on the current channel to the specified file.\n"
"If the filename is an absolute path, uses that path, otherwise\n"
@@ -72,8 +72,8 @@
"";
static const char *stop_app = "StopMixMonitor";
-static char *stop_synopsis = "Stop recording a call through MixMonitor";
-static char *stop_desc = ""
+static const char *stop_synopsis = "Stop recording a call through MixMonitor";
+static const char *stop_desc = ""
" StopMixMonitor():\n"
"Stops the audio recording that was started with a call to MixMonitor()\n"
"on the current channel.\n"
Modified: team/group/appdocsxml/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_osplookup.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_osplookup.c (original)
+++ team/group/appdocsxml/apps/app_osplookup.c Fri Aug 8 23:50:33 2008
@@ -1936,8 +1936,8 @@
}
static const char* app1= "OSPAuth";
-static char* synopsis1 = "OSP authentication";
-static char* descrip1 =
+static const char* synopsis1 = "OSP authentication";
+static const char* descrip1 =
" OSPAuth([provider[,options]]): Authenticate a SIP INVITE by OSP and sets\n"
"the variables:\n"
" ${OSPINHANDLE}: The inbound call transaction handle\n"
@@ -1948,8 +1948,8 @@
" SUCCESS | FAILED | ERROR\n";
static const char* app2= "OSPLookup";
-static char* synopsis2 = "Lookup destination by OSP";
-static char* descrip2 =
+static const char* synopsis2 = "Lookup destination by OSP";
+static const char* descrip2 =
" OSPLookup(exten[,provider[,options]]): Looks up an extension via OSP and sets\n"
"the variables, where 'n' is the number of the result beginning with 1:\n"
" ${OSPOUTHANDLE}: The OSP Handle for anything remaining\n"
@@ -1973,8 +1973,8 @@
" SUCCESS | FAILED | ERROR\n";
static const char* app3 = "OSPNext";
-static char* synopsis3 = "Lookup next destination by OSP";
-static char* descrip3 =
+static const char* synopsis3 = "Lookup next destination by OSP";
+static const char* descrip3 =
" OSPNext(cause[,provider[,options]]): Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
"See OSPLookup for more information\n"
"\n"
@@ -1983,8 +1983,8 @@
" SUCCESS | FAILED | ERROR\n";
static const char* app4 = "OSPFinish";
-static char* synopsis4 = "Record OSP entry";
-static char* descrip4 =
+static const char* synopsis4 = "Record OSP entry";
+static const char* descrip4 =
" OSPFinish([status[,options]]): Records call state for ${OSPINHANDLE}, according to\n"
"status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n"
"or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n"
Modified: team/group/appdocsxml/apps/app_sendtext.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_sendtext.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_sendtext.c (original)
+++ team/group/appdocsxml/apps/app_sendtext.c Fri Aug 8 23:50:33 2008
@@ -39,9 +39,9 @@
static const char *app = "SendText";
-static char *synopsis = "Send a Text Message";
+static const char *synopsis = "Send a Text Message";
-static char *descrip =
+static const char *descrip =
" SendText(text): Sends text to current channel (callee).\n"
"Result of transmission will be stored in the SENDTEXTSTATUS\n"
"channel variable:\n"
Modified: team/group/appdocsxml/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_stack.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_stack.c (original)
+++ team/group/appdocsxml/apps/app_stack.c Fri Aug 8 23:50:33 2008
@@ -43,24 +43,24 @@
static const char *app_return = "Return";
static const char *app_pop = "StackPop";
-static char *gosub_synopsis = "Jump to label, saving return address";
-static char *gosubif_synopsis = "Conditionally jump to label, saving return address";
-static char *return_synopsis = "Return from gosub routine";
-static char *pop_synopsis = "Remove one address from gosub stack";
-
-static char *gosub_descrip =
+static const char *gosub_synopsis = "Jump to label, saving return address";
+static const char *gosubif_synopsis = "Conditionally jump to label, saving return address";
+static const char *return_synopsis = "Return from gosub routine";
+static const char *pop_synopsis = "Remove one address from gosub stack";
+
+static const char *gosub_descrip =
" Gosub([[context,]exten,]priority[(arg1[,...][,argN])]):\n"
"Jumps to the label specified, saving the return address.\n";
-static char *gosubif_descrip =
+static const char *gosubif_descrip =
" GosubIf(condition?labeliftrue[(arg1[,...])][:labeliffalse[(arg1[,...])]]):\n"
"If the condition is true, then jump to labeliftrue. If false, jumps to\n"
"labeliffalse, if specified. In either case, a jump saves the return point\n"
"in the dialplan, to be returned to with a Return.\n";
-static char *return_descrip =
+static const char *return_descrip =
" Return([return-value]):\n"
"Jumps to the last label on the stack, removing it. The return value, if\n"
"any, is saved in the channel variable GOSUB_RETVAL.\n";
-static char *pop_descrip =
+static const char *pop_descrip =
" StackPop():\n"
"Removes last label on the stack, discarding it.\n";
Modified: team/group/appdocsxml/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_transfer.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/apps/app_transfer.c (original)
+++ team/group/appdocsxml/apps/app_transfer.c Fri Aug 8 23:50:33 2008
@@ -39,9 +39,9 @@
static const char *app = "Transfer";
-static char *synopsis = "Transfer caller to remote extension";
+static const char *synopsis = "Transfer caller to remote extension";
-static char *descrip =
+static const char *descrip =
" Transfer([Tech/]dest[,options]): Requests the remote caller be transferred\n"
"to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only\n"
"an incoming call with the same channel technology will be transfered.\n"
Modified: team/group/appdocsxml/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_agent.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/channels/chan_agent.c (original)
+++ team/group/appdocsxml/channels/chan_agent.c Fri Aug 8 23:50:33 2008
@@ -72,13 +72,13 @@
static const char tdesc[] = "Call Agent Proxy Channel";
static const char config[] = "agents.conf";
-static char app[] = "AgentLogin";
-static char app3[] = "AgentMonitorOutgoing";
-
-static char synopsis[] = "Call agent login";
-static char synopsis3[] = "Record agent's outgoing call";
-
-static char descrip[] =
+static const char app[] = "AgentLogin";
+static const char app3[] = "AgentMonitorOutgoing";
+
+static const char synopsis[] = "Call agent login";
+static const char synopsis3[] = "Record agent's outgoing call";
+
+static const char descrip[] =
" AgentLogin([AgentNo][,options]):\n"
"Asks the agent to login to the system. Always returns -1. While\n"
"logged in, the agent can receive calls and will hear a 'beep'\n"
@@ -87,7 +87,7 @@
"The option string may contain zero or more of the following characters:\n"
" 's' -- silent login - do not announce the login ok segment after agent logged on/off\n";
-static char descrip3[] =
+static const char descrip3[] =
" AgentMonitorOutgoing([options]):\n"
"Tries to figure out the id of the agent who is placing outgoing call based on\n"
"comparison of the callerid of the current interface and the global variable \n"
Modified: team/group/appdocsxml/channels/chan_nbs.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_nbs.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/channels/chan_nbs.c (original)
+++ team/group/appdocsxml/channels/chan_nbs.c Fri Aug 8 23:50:33 2008
@@ -47,7 +47,7 @@
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
-static char tdesc[] = "Network Broadcast Sound Driver";
+static const char tdesc[] = "Network Broadcast Sound Driver";
/* Only linear is allowed */
static int prefformat = AST_FORMAT_SLINEAR;
Modified: team/group/appdocsxml/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_vpb.cc?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/channels/chan_vpb.cc (original)
+++ team/group/appdocsxml/channels/chan_vpb.cc Fri Aug 8 23:50:33 2008
@@ -89,7 +89,7 @@
#endif
/**/
-static char desc[] = "VoiceTronix V6PCI/V12PCI/V4PCI API Support";
+static const char desc[] = "VoiceTronix V6PCI/V12PCI/V4PCI API Support";
static const char tdesc[] = "Standard VoiceTronix API Driver";
static const char config[] = "vpb.conf";
Modified: team/group/appdocsxml/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/module.h?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/include/asterisk/module.h (original)
+++ team/group/appdocsxml/include/asterisk/module.h Fri Aug 8 23:50:33 2008
@@ -378,7 +378,6 @@
* \retval 0 success
* \retval -1 failure.
*/
-/* XXX: Remove this when finish changing every description/synopsis to 'char *' type. */
#define ast_register_application(app, execute, synopsis, description) ast_register_application2(app, execute, synopsis, description, ast_module_info->self)
/*!
@@ -417,7 +416,7 @@
* \retval -1 failure.
*/
int ast_register_application2(const char *app, int (*execute)(struct ast_channel *, void *),
- char *synopsis, char *description, void *mod);
+ const char *synopsis, const char *description, void *mod);
/*!
* \brief Unregister an application
Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=136886&r1=136885&r2=136886
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Fri Aug 8 23:50:33 2008
@@ -4611,7 +4611,7 @@
}
/*! \brief Dynamically register a new dial plan application */
-int ast_register_application2(const char *app, int (*execute)(struct ast_channel *, void *), char *synopsis, char *description, void *mod)
+int ast_register_application2(const char *app, int (*execute)(struct ast_channel *, void *), const char *synopsis, const char *description, void *mod)
{
struct ast_app *tmp, *cur = NULL;
char tmps[80];
@@ -4643,8 +4643,8 @@
tmp->docsrc = AST_XML_DOC;
} else {
#endif
- tmp->synopsis = synopsis;
- tmp->description = description;
+ tmp->synopsis = (char *)synopsis;
+ tmp->description = (char *)description;
tmp->docsrc = AST_STATIC_DOC;
#ifdef XML_DOCUMENTATION
}
More information about the asterisk-commits
mailing list