Documentation tags for doxugen added.

This commit is contained in:
tomas 2004-12-19 00:40:12 +00:00
parent 88df4ba4fc
commit 3490c97746
3 changed files with 49 additions and 9 deletions

View File

@ -23,13 +23,19 @@
Author : $Author: tomas $
Version : $Revision: 1.5 $
Version : $Revision: 1.6 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/conf.php,v $
------------------------------------------------------------------------------*/
/**
* \file conf.php
* storageServer configuration file
*/
/**
* configuration structure:
*
* <dl>
* <dt>dsn<dd> datasource setting
* <dt>tblNamePrefix <dd>prefix for table names in the database

View File

@ -23,10 +23,38 @@
Author : $Author: tomas $
Version : $Revision: 1.1 $
Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/put.php,v $
------------------------------------------------------------------------------*/
/**
* \file put.php
* Store PUT data as temporary file.
*
* put.php is remote callable script through HTTP PUT method.
* Requires token returned by appropriate storageServer XMLRPC call.
* Appropriate closing XMLRPC call should follow.
*
* This script accepts following HTTP GET parameter:
* <ul>
* <li>token : string, put token returned by appropriate
* XMLRPC call</li>
* </ul>
*
* On success, returns HTTP return code 200.
*
* On errors, returns HTTP return code &gt;200
* The possible error codes are:
* <ul>
* <li> 400 - Incorrect parameters passed to method</li>
* <li> 403 - Access denied</li>
* <li> 500 - Application error</li>
* </ul>
*
* @see XR_LocStor
*/
require_once '../conf.php';
require_once 'DB.php';
require_once '../LocStor.php';
@ -36,8 +64,6 @@ $dbc = DB::connect($config['dsn'], TRUE);
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
$gb = &new GreenBox(&$dbc, $config);
$token = $_REQUEST['token'];
function http_error($code, $err){
header("HTTP/1.1 $code");
header("Content-type: text/plain; charset=UTF-8");
@ -45,9 +71,15 @@ function http_error($code, $err){
exit;
}
if(preg_match("|^[0-9a-f]{32}$|", $_REQUEST['token'])){
$token = $_REQUEST['token'];
}else{
http_error(400, "Error on token parameter. ({$_REQUEST['token']})");
}
$tc = $gb->bsCheckToken($token, 'put');
if(PEAR::isError($tc)){ echo "ERR".$tc->getMessage()."\n"; exit; }
if(!$tc){ http_error(410, "Token not valid."); }
if(PEAR::isError($tc)){ http_error(500, $ex->getMessage()); }
if(!$tc){ http_error(403, "Token not valid."); }
#var_dump($tc); exit;
header("Content-type: text/plain");

View File

@ -23,15 +23,17 @@
Author : $Author: tomas $
Version : $Revision: 1.3 $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php,v $
------------------------------------------------------------------------------*/
/**
* simpleGet.php is remote callable script through HTTP GET method.
* \file simpleGet.php
* Returns stored media file identified by global unique ID.
* Requires valid session ID and read permission for requested file.
*
* simpleGet.php is remote callable script through HTTP GET method.
* Requires valid session ID with read permission for requested file.
*
* This script accepts following HTTP GET parameters:
* <ul>