Backup and playlist render dummy methods fixed.

This commit is contained in:
tomash 2006-03-20 13:54:19 +00:00
parent 588de8d2ac
commit 2c7630c800

View file

@ -803,9 +803,10 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToFileOpen($sessid, $plid) function renderPlaylistToFileOpen($sessid, $plid)
{ {
return PEAR::raiseError( $token = '123456789abcdeff';
"GreenBox::renderPlaylistToFileOpen: not implemented" $fakeFile = "{$this->accessDir}/$token.ogg";
); file_put_contents($fakeFile, "fake renderred file");
return array('token'=>$token);
} }
/** /**
@ -818,8 +819,15 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToFileCheck($token) function renderPlaylistToFileCheck($token)
{ {
return PEAR::raiseError( $fakeFile = "{$this->accessDir}/$token.ogg";
"GreenBox::renderPlaylistToFileCheck: not implemented" if($token != '123456789abcdeff' || !file_exists($fakeFile)){
return PEAR::raiseError(
"GreenBox::renderPlaylistToFileCheck: invalid token ($token)"
);
}
return array(
'status'=> 'success',
'tmpfile' => $fakeFile,
); );
} }
@ -831,9 +839,14 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToFileClose($token) function renderPlaylistToFileClose($token)
{ {
return PEAR::raiseError( if($token != '123456789abcdeff'){
"GreenBox::renderPlaylistToFileClose: not implemented" return PEAR::raiseError(
); "GreenBox::renderPlaylistToFileClose: invalid token"
);
}
$fakeFile = "{$this->accessDir}/$token.ogg";
unlink($fakeFile);
return TRUE;
} }
@ -846,9 +859,10 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToStorageOpen($sessid, $plid) function renderPlaylistToStorageOpen($sessid, $plid)
{ {
return PEAR::raiseError( $token = '123456789abcdeff';
"GreenBox::renderPlaylistToStorageOpen: not implemented" $fakeFile = "{$this->accessDir}/$token.ogg";
); file_put_contents($fakeFile, "fake renderred file");
return array('token'=>$token);
} }
/** /**
@ -861,8 +875,16 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToStorageCheck($token) function renderPlaylistToStorageCheck($token)
{ {
return PEAR::raiseError( $fakeFile = "{$this->accessDir}/$token.ogg";
"GreenBox::renderPlaylistToStorageCheck: not implemented" if($token != '123456789abcdeff' || !file_exists($fakeFile)){
return PEAR::raiseError(
"GreenBox::renderPlaylistToStorageCheck: invalid token ($token)"
);
}
unlink($fakeFile);
return array(
'status'=> 'success',
'gunid' => '0000000000010001',
); );
} }
@ -876,9 +898,10 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToRSSOpen($sessid, $plid) function renderPlaylistToRSSOpen($sessid, $plid)
{ {
return PEAR::raiseError( $token = '123456789abcdeff';
"GreenBox::renderPlaylistToRSSOpen: not implemented" $fakeFile = "{$this->accessDir}/$token.rss";
); file_put_contents($fakeFile, "fake renderred file");
return array('token'=>$token);
} }
/** /**
@ -891,8 +914,15 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToRSSCheck($token) function renderPlaylistToRSSCheck($token)
{ {
return PEAR::raiseError( $fakeFile = "{$this->accessDir}/$token.rss";
"GreenBox::renderPlaylistToRSSCheck: not implemented" if($token != '123456789abcdeff' || !file_exists($fakeFile)){
return PEAR::raiseError(
"LocStor::renderPlaylistToRSSCheck: invalid token ($token)"
);
}
return array(
'status'=> 'success',
'tmpfile' => $fakeFile,
); );
} }
@ -904,9 +934,14 @@ class GreenBox extends BasicStor{
*/ */
function renderPlaylistToRSSClose($token) function renderPlaylistToRSSClose($token)
{ {
return PEAR::raiseError( if($token != '123456789abcdeff'){
"GreenBox::renderPlaylistToRSSClose: not implemented" return PEAR::raiseError(
); "GreenBox::renderPlaylistToRSSClose: invalid token"
);
}
$fakeFile = "{$this->accessDir}/$token.rss";
unlink($fakeFile);
return TRUE;
} }
@ -919,11 +954,12 @@ class GreenBox extends BasicStor{
* @param criteria : struct - see search criteria * @param criteria : struct - see search criteria
* @return token : string - backup token * @return token : string - backup token
*/ */
function createBackupOpen($sessid, $criteria) function createBackupOpen($sessid, $criteria='')
{ {
return PEAR::raiseError( $token = '123456789abcdeff';
"GreenBox::createBackupOpen: not implemented" $fakeFile = "{$this->accessDir}/$token.tar";
); file_put_contents($fakeFile, "fake archive file");
return array('token'=>$token);
} }
/** /**
@ -937,8 +973,16 @@ class GreenBox extends BasicStor{
*/ */
function createBackupCheck($token) function createBackupCheck($token)
{ {
return PEAR::raiseError( $fakeFile = "{$this->accessDir}/$token.tar";
"GreenBox::createBackupCheck: not implemented" if($token != '123456789abcdeff' || !file_exists($fakeFile)){
return PEAR::raiseError(
"LocStor::createBackupCheck: invalid token ($token)"
);
}
return array(
'status'=> 'success',
'tmpfile' => $fakeFile,
'metafile' => '',
); );
} }
@ -950,9 +994,14 @@ class GreenBox extends BasicStor{
*/ */
function createBackupClose($token) function createBackupClose($token)
{ {
return PEAR::raiseError( if($token != '123456789abcdeff'){
"GreenBox::createBackupClose: not implemented" return PEAR::raiseError(
); "LocStor::createBackupClose: invalid token"
);
}
$fakeFile = "{$this->accessDir}/$token.tar";
unlink($fakeFile);
return TRUE;
} }
/* ============================================== methods for preferences */ /* ============================================== methods for preferences */