diff --git a/livesupport/modules/storageServer/var/GreenBox.php b/livesupport/modules/storageServer/var/GreenBox.php index 76e496423..7a43f6af1 100644 --- a/livesupport/modules/storageServer/var/GreenBox.php +++ b/livesupport/modules/storageServer/var/GreenBox.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.49 $ + Version : $Revision: 1.50 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $ ------------------------------------------------------------------------------*/ @@ -35,7 +35,7 @@ require_once "BasicStor.php"; * LiveSupport file storage module * * @author $Author: tomas $ - * @version $Revision: 1.49 $ + * @version $Revision: 1.50 $ * @see BasicStor */ class GreenBox extends BasicStor{ @@ -483,7 +483,7 @@ class GreenBox extends BasicStor{ } /** - * Add audioclip specified by gunid to the playlist + * Add audioclip specified by local id to the playlist * * @param token string, playlist access token * @param acId string, local ID of added file diff --git a/livesupport/modules/storageServer/var/Playlist.php b/livesupport/modules/storageServer/var/Playlist.php index 990ce2650..c1a70c386 100644 --- a/livesupport/modules/storageServer/var/Playlist.php +++ b/livesupport/modules/storageServer/var/Playlist.php @@ -23,18 +23,26 @@ Author : $Author: tomas $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Playlist.php,v $ ------------------------------------------------------------------------------*/ /** + * Auxiliary class for GB playlist editing methods * + * remark: dcterms:extent format: hh:mm:ss.ssssss */ class Playlist extends StoredFile{ /** - * + * Create instace of Playlist object and recall existing file + * by access token.
+ * + * @param gb reference to GreenBox object + * @param token string, access token + * @param className string, optional classname to recall + * @return instace of StoredFile object */ function recallByToken(&$gb, $token, $className='Playlist') { @@ -43,6 +51,14 @@ class Playlist extends StoredFile{ /** * Get audioClip legth and title + * + * @param acId int, local id of audioClip inserted to playlist + * @return array with fields: + * */ function getAcInfo($acId) { @@ -61,7 +77,15 @@ class Playlist extends StoredFile{ } /** - * Get + * Get info about playlist + * + * @return array with fields: + * */ function getPlInfo() { @@ -85,7 +109,13 @@ class Playlist extends StoredFile{ } /** - * Get + * Get container record id, optionally insert new container + * + * @param containerName string + * @param parid int - parent record id + * @param insertIfNone boolean - flag if insert may be done + * if container wouldn't be found + * @return int - metadata record id of container */ function getContainer($containerName, $parid=NULL, $insertIfNone=FALSE) { @@ -104,7 +134,22 @@ class Playlist extends StoredFile{ } /** - * Get + * Inserting of new playlistEelement + * + * @param parid int - parent record id + * @param offset string - relative offset in extent format + * @param acGunid string - audioClip gunid + * @param acLen string - audiClip length in extent format + * @param acTit string - audioClip title + * @param fadeIn string - fadein value in ss.ssssss or extent format + * @param fadeOut string - fadeout value in ss.ssssss or extent format + * @return array with fields: + * */ function insertPlaylistElement($parid, $offset, $acGunid, $acLen, $acTit, $fadeIn=NULL, $fadeOut=NULL) @@ -152,7 +197,13 @@ class Playlist extends StoredFile{ } /** - * Set + * Return record id, optionally insert new record + * + * @param category string - qualified name of metadata category + * @param parid int - parent record id + * @param value string - value for inserted record + * @param predxml string - 'A' | 'T' (attribute or tag) + * @return int - metadata record id */ function _getMidOrInsert($category, $parid, $value=NULL, $predxml='T') { @@ -167,7 +218,13 @@ class Playlist extends StoredFile{ } /** - * Set + * Set value of metadata record, optionally insert new record + * + * @param mid int - record id + * @param value string - value for inserted record + * @param parid int - parent record id + * @param category string - qualified name of metadata category + * @return boolean */ function _setValueOrInsert($mid, $value, $parid, $category) { @@ -177,11 +234,16 @@ class Playlist extends StoredFile{ $r = $this->md->setMetadataEl($mid, $value); } if(PEAR::isError($r)){ return $r; } - return $r; + return TRUE; } /** - * Set + * Set playlist length - dcterm:extent + * + * @param newPlLen string - new length in extent format + * @param plLenMid int - playlist length record id + * @param metaParid int - metadata container record id + * @return boolean */ function setPlaylistLength($newPlLen, $plLenMid, $metaParid) { @@ -192,7 +254,7 @@ class Playlist extends StoredFile{ } /** - * Add audioclip specified by gunid to the playlist + * Add audioclip specified by local id to the playlist * * @param acId string, local ID of added file * @param fadeIn string, optional, in time format hh:mm:ss.ssssss @@ -292,8 +354,12 @@ class Playlist extends StoredFile{ } /** - * + * Change fadeIn and fadeOut values for plaulist Element * + * @param plElGunid string - playlistElement gunid + * @param fadeIn string - new value in ss.ssssss or extent format + * @param fadeOut string - new value in ss.ssssss or extent format + * @return boolean */ function changeFadeInfo($plElGunid, $fadeIn, $fadeOut) { @@ -335,7 +401,10 @@ class Playlist extends StoredFile{ } /** + * Recalculate total length of playlist and relativeOffset values + * of all playlistElements according to legth and fadeIn values * + * @return boolean */ function recalculateTimes() {