Here is a list of the functions used and the details about them :

All versions :

 

secondlife_help($section)

Parameters : A string representing the Drupal section
Return value : An Html string representing the admin help page
Action : This is the standard Drupal's Help hook

secondlife_menu($may_cache)

Parameters : An integer
Return value : An array form to build the menu
Action : This is the standard Drupal's menu hook

secondlife_settings()

Parameters : empty
Return value : An array form to build the admin settings.
Action : This is a function to build the admin settings page

secondlife_request()

Parameters : empty
Return value : empty
Action :

  • start the timer
  • et the values from the lsl script ( calling secondlife_parse_args() )
  • call the desired module
  • stop the timer
  • send the answer to the lsl script ( calling secondlife_send_response() )

secondlife_get_session()

Parameters : empty
Return value : The "sl" object containing informations
Action :

  • log the lsl request values
  • build the sl object

secondlife_parse_args($arg)

Parameters : a string containing arguments from the lsl script
Return value : an array with arguments as key/value
Action : parses the arguments from the lsl script to an array

secondlife_send_response(&$sl)

Parameters : the sl object reference
Return value : nothing
Action : prints the message string to the lsl script as : key=value:key=value...

The Drupal 6 version allows to print only the message property depending on the "output_type" posted field.
$sl->output_type can be :

  • null or "full": the default output as "key=value:key=value:key=value..."
  • "message" : the output will be an html filtered string containing only the $sl->response['message']

secondlife_debug($string)

Parameters : a string
Return value : nothing
Action : Writes the sting to the debug file.

secondlife_timer()

Parameters : empty
Return value : true if the timer is enabled on the admin settings or false if the timer is disabled
Action : reads the timer admin setting

_secondlife_getmillisecs()

Parameters :empty
Return value : a double number to represent the time in milliseconds
Action : Compute a timer in milliseconds

Drupal 6 version :

 

secondlife_netmatch($network, $ip)

Parameters :

  • $network = a string containing an Ip's list
  • $ip = the ip to check

Return value : True if the ip is inside this network or False if not

Action : determines if a network in the form of 192.168.17.1/16 or 127.0.0.1/255.255.255.255 or 10.0.0.1 matches a given ip ( written by Falados Kapuskas, JoeTheCatboy Freelunch )

secondlife_get_data_between($src, $left, $right)

Parameters :

  • $src = the string to compute
  • $left = the left side of the string to find
  • $right = the right side of the string to find

Returned value : a string
Action : return a string conained inside another one. This function can be used to find a string in an html page that cannot be xml parsed. ( this is used in the xml-rpc function before changing it to simple xml )
Example : in the $src="<p>test<br/><b>this is a test</b></p>
if the $left="<b>" and $right="</b>", the output will be "this is a test"

secondlife_rpc($channel, $intVal, $stringVal)

Parameters : $channel = the uuid key of the xml-rpc channel of the destination object
Output : an array containing the result as array('channel' => $channel, 'string' => returned string, 'integer' => returned integer)
Action : send an xml-rpc message to a script inworld

There are some others helpers functions, but im waiting for the "secondlife framework" author validation