
1292
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using External Resources
Las
t
upda
te
d 8/5/2010
<cfcase value="setnickname">
<cfset ret=helper.setNickName(url.nickname)>
</cfcase>
<cfcase value="setpermitmode">
<cfset ret=helper.setPermitMode(url.mode)>
</cfcase>
<cfcase value="getpermitmode">
<cfset ret=helper.getPermitMode()>
</cfcase>
<cfcase value="setplaintextmode">
<cfset ret=helper.setPlainTextMode(url.mode)>
</cfcase>
<cfcase value="getplaintextmode">
<cfset ret=helper.getPlainTextMode()>
</cfcase>
<cfdefaultcase>
<cfset ret[1]="Error; Invalid command. You shouldn't get this.">
</cfdefaultcase>
</cfswitch>
<br>
<!--- Display the results returned by the called GatewayHelper method. --->
<strong>#url.cmd#</strong><br>
<cfdump var="#ret#">
<br>
<!--- If buddy information was requested, loop through buddy list to get
information for each buddy and display it. --->
<cfif comparenocase(url.cmd, "buddyinfo") is 0 and arraylen(ret) gt 0>
<b>Buddy info for all buddies</b><br>
<cfloop index="i" from="1" to="#arraylen(ret)#">
<cfdump var="#helper.getBuddyInfo(ret[i])#" label="#ret[i]#"></cfloop>
</cfif>
</cfif>
</cfoutput>
Using the SMS Event Gateway
You can develop an application that uses the short message service (SMS) event gateway type provided with Adobe
ColdFusion. ColdFusion provides tools for developing SMS applications.
Before you use the SMS event gateway, become familiar with ColdFusion event gateway principals and programming
techniques (see “
Using Event Gateways
” on page 1254). Although not required, a basic knowledge of SMS is helpful.
About SMS and ColdFusion
Short Message Service (SMS) is a system designed for sending short, often text, messages to and from wireless devices,
such as mobile phones or pagers. SMS is widely used in Europe and Asia and is becoming increasingly popular in the
United States and elsewhere. Some uses for SMS include the following:
•
Performing banking transactions
•
Sending authentication codes, for example, to be used to access web resources
•
Voting, such as popularity voting for reality television shows
•
Initiating an action (such as a server restart) and getting a response