|
From: creedon <icr...@us...> - 2005-09-08 17:35:31
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/xmlStorageSystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20059 Modified Files: register Log Message: disabled serial number check disabled useragent bundle, use Frontier.getProgramName changed UserLand Frontier to Frontier Index: register =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/xmlStorageSystem/register,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** register 26 Mar 2005 19:42:33 -0000 1.1.1.1 --- register 8 Sep 2005 17:35:23 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.apps.xmlStorageSystem.register ! on register (email, password, name, adrgreeting = nil, adrdata = @xmlStorageSystem.data, adrresponse = nil) { ÇChanges Ç4/2/01; 7:58:22 AM by DW ÇCreated. Send a registerUser message to the cloud, returning true if the user is registered, false if there was a failure. Çemail is an email address, it could be fictitious, it identifies the user. ÇWe send an MD5 hash of the password to the server. ÇThe user's name is displayed in various lists, it's nice to know people's real name. You may lie if you want. Çadrgreeting points to a string that will receive the English-language message from the server, but it's optional. Ç7/23/01; 9:45:30 PM by JES ÇThe data table now supports both xmlRpcPath, and the more general rpcPath, used for both XML-RPC and for SOAP. This is for support for SOAP-based xmlStorageSystem implementations which have a request URI which is different from the value of the SOAPAction header. Ç10/6/01; 1:55:51 AM by JES ÇSend the serial number as a parameter in the RPC request. ÇNew optional parameter, adrresponse. If not nil, the entire response struct will be copied to adrresponse. This is required in order to get usernums back from an xmlStorageSystem server. Ç10/6/01; 2:10:07 AM by JES ÇCommented out debugging code. local (useragent); bundle { //set useragent if system.environment.isPike { useragent = "Radio UserLand"} else { useragent = "UserLand Frontier"}; useragent = useragent + " v" + Frontier.version () + ", " + system.environment.osFullNameForDisplay + " " + system.environment.osVersionString}; local (params = {"email":email, "name":name, "password":string.hashmd5 (password), "clientPort":user.inetd.config.http.port, "userAgent":useragent}); if defined (adrdata^.serialNumber) { params = params + {"serialNumber":user.prefs.serialNumber}}; local (rpcPath); if defined (adrdata^.xmlRpcPath) { rpcPath = adrdata^.xmlRpcPath}; if defined (adrdata^.rpcPath) { rpcPath = adrdata^.rpcPath}; with adrdata^ { local (result); result = xml.rpc (server, port, "xmlStorageSystem.registerUser", @params, rpcPath:rpcPath, fldebug:fldebug, protocol:protocol, soapAction:soapAction); if adrgreeting != nil { adrgreeting^ = result.message}; if adrresponse != nil { adrresponse^ = result}; return (not result.flerror)}}; Çbundle //test code Çlocal (greeting) Çlocal (data); new (tableType, @data) Çbundle //init data table Çdata.fldebug = false Çdata.port = 80 Çdata.protocol = "xml-rpc" Çdata.server = "xmlstoragesystem.com" Çdata.xmlRpcPath = "/RPC2" Çdata.soapAction = "/xmlStorageSystem" Çdata.serialNumber = user.prefs.serialNumber ÇxmlStorageSystem.init () Çwith user.xmlStorageSystem Çregister (email, password, name, @greeting, @data) Çdialog.alert (greeting) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.apps.xmlStorageSystem.register ! on register (email, password, name, adrgreeting = nil, adrdata = @xmlStorageSystem.data, adrresponse = nil) { ÇChanges Ç9/8/05; 10:04:26 AM by TAC Çdisabled serial number check Çdisabled useragent bundle, use Frontier.getProgramName Çchanged UserLand Frontier to Frontier Ç4/2/01; 7:58:22 AM by DW ÇCreated. Send a registerUser message to the cloud, returning true if the user is registered, false if there was a failure. Çemail is an email address, it could be fictitious, it identifies the user. ÇWe send an MD5 hash of the password to the server. ÇThe user's name is displayed in various lists, it's nice to know people's real name. You may lie if you want. Çadrgreeting points to a string that will receive the English-language message from the server, but it's optional. Ç7/23/01; 9:45:30 PM by JES ÇThe data table now supports both xmlRpcPath, and the more general rpcPath, used for both XML-RPC and for SOAP. This is for support for SOAP-based xmlStorageSystem implementations which have a request URI which is different from the value of the SOAPAction header. Ç10/6/01; 1:55:51 AM by JES ÇSend the serial number as a parameter in the RPC request. ÇNew optional parameter, adrresponse. If not nil, the entire response struct will be copied to adrresponse. This is required in order to get usernums back from an xmlStorageSystem server. Ç10/6/01; 2:10:07 AM by JES ÇCommented out debugging code. local (userAgent = Frontier.getProgramName () + ", " + system.environment.osFullNameForDisplay + " " + system.environment.osVersionString); Çbundle // 9/8/05; 10:04:13 AM by TAC - old code, set useragent Çif system.environment.isPike Çuseragent = "Radio UserLand" Çelse Çuseragent = "Frontier" Çuseragent = useragent + " v" + Frontier.version () + ", " + system.environment.osFullNameForDisplay + " " + system.environment.osVersionString local (params = {"email":email, "name":name, "password":string.hashmd5 (password), "clientPort":user.inetd.config.http.port, "userAgent":userAgent}); Çif defined (adrdata^.serialNumber) Çparams = params + {"serialNumber":user.prefs.serialNumber} local (rpcPath); if defined (adrdata^.xmlRpcPath) { rpcPath = adrdata^.xmlRpcPath}; if defined (adrdata^.rpcPath) { rpcPath = adrdata^.rpcPath}; with adrdata^ { local (result); result = xml.rpc (server, port, "xmlStorageSystem.registerUser", @params, rpcPath:rpcPath, fldebug:fldebug, protocol:protocol, soapAction:soapAction); if adrgreeting != nil { adrgreeting^ = result.message}; if adrresponse != nil { adrresponse^ = result}; return (not result.flerror)}}; Çbundle // testing Çlocal (greeting) Çlocal (data); new (tableType, @data) Çbundle //init data table Çdata.fldebug = false Çdata.port = 80 Çdata.protocol = "xml-rpc" Çdata.server = "xmlstoragesystem.com" Çdata.xmlRpcPath = "/RPC2" Çdata.soapAction = "/xmlStorageSystem" Çdata.serialNumber = user.prefs.serialNumber ÇxmlStorageSystem.init () Çwith user.xmlStorageSystem Çregister (email, password, name, @greeting, @data) Çdialog.alert (greeting) \ No newline at end of file |