diff --git a/livesupport/modules/storageServer/var/LocStor.php b/livesupport/modules/storageServer/var/LocStor.php index 2ad3c4085..1555bafe1 100644 --- a/livesupport/modules/storageServer/var/LocStor.php +++ b/livesupport/modules/storageServer/var/LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.37 $ + Version : $Revision: 1.38 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -662,5 +662,17 @@ class LocStor extends BasicStor{ return FALSE; } + /*===================================================== auxiliary methods */ + /** + * Dummy method - only returns livesupport version + * + * @return string + */ + function getVersion() + { + //return $this->config['version']; + return LS_VERSION; + } + } ?> \ No newline at end of file diff --git a/livesupport/modules/storageServer/var/conf.php b/livesupport/modules/storageServer/var/conf.php index 4deb33672..24529db9e 100644 --- a/livesupport/modules/storageServer/var/conf.php +++ b/livesupport/modules/storageServer/var/conf.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.17 $ + Version : $Revision: 1.18 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/conf.php,v $ ------------------------------------------------------------------------------*/ @@ -33,6 +33,8 @@ * storageServer configuration file */ +define('LS_VERSION', '0.9'); + /** * configuration structure: * diff --git a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php index eb961767b..f08637dba 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.15 $ + Version : $Revision: 1.16 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -36,6 +36,49 @@ require_once '../../../storageServer/var/LocStor.php'; */ class XR_LocStor extends LocStor{ + /* ----------------------------------------------------------- getVersion */ + /** + * Dummy method - only returns livesupport version + * + * The XML-RPC name of this method is "locstor.getVersion". + * + * Input parameters: XML-RPC struct with no fields. + * + * On success, returns a XML-RPC struct with the following fields: + * + * + * On errors, returns an XML-RPC error response. + * The possible error codes and error message are: + * + * + * @param input XMLRPC struct + * @return XMLRPC struct + * @see Subjects::getVersion + */ + function xr_getVersion($input) + { + list($ok, $r) = $this->_xr_getPars($input); + if(!$ok) return $r; + $res = $this->getVersion(); + if(PEAR::isError($res)){ + return new XML_RPC_Response(0, 805, + "xr_getVersion: ".$res->getMessage(). + " ".$res->getUserInfo() + ); + } + return new XML_RPC_Response( + XML_RPC_encode(array('version'=>$res)) + ); + } + /* ------------------------------------------------------- authentication */ /** * Checks the login name and password of the user and return diff --git a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php index 60bab0bf9..e6f4a313b 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.22 $ + Version : $Revision: 1.23 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -78,6 +78,7 @@ $locStor = &new XR_LocStor($dbc, $config); $methods = array( 'test' => 'Tests toupper and checks sessid, params: '. 'teststring, sessid.', + 'getVersion' => 'Dummy function for connection testing.', 'authenticate' => 'Checks authentication.', 'login' => 'Login to storage.', 'logout' => 'Logout from storage.', diff --git a/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php b/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php index 45508b548..29de43a53 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php +++ b/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.6 $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $ ------------------------------------------------------------------------------*/ @@ -64,6 +64,8 @@ $infos = array( "methodSignature" => array('m'=>"system.methodSignature", 'p'=>0), "test" => array('m'=>"locstor.test", 'p'=>array('sessid', 'teststring')), + "getVersion" => array('m'=>"locstor.getVersion", + 'p'=>array(), 'r'=>'version'), "authenticate" => array('m'=>"locstor.authenticate", 'p'=>array('login', 'pass'), 'r'=>'authenticate'), "login" => array('m'=>"locstor.login",