diff options
Diffstat (limited to 'apps/files_external/3rdparty/irodsphp/prods/src/packet')
38 files changed, 1019 insertions, 0 deletions
diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php new file mode 100644 index 00000000000..89040882d20 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php @@ -0,0 +1,250 @@ +<?php + +//require_once(dirname(__FILE__)."/../autoload.inc.php"); + +/* +$GLOBALS['Pack_PI_Table']=array ( + "MsgHeader_PI" => array ("type" => NULL, "msgLen" => 0, + "errorLen" => 0, "bsLen" => 0, "intInfo" => 0), + "StartupPack_PI" => array ("irodsProt" => 1, "connectCnt" => 0, + "proxyUser" => NULL, "proxyRcatZone" => NULL, "clientUser" => NULL, + "clientRcatZone" => NULL, "relVersion" => NULL, + "apiVersion" => NULL, "option" => NULL ), + "Version_PI" => array ("status"=>0,"relVersion"=>NULL,"apiVersion"=>NULL), + "authResponseInp_PI" => array("response" => NULL, "username" => NULL), + "authRequestOut_PI" => array("challenge" => NULL) +); +*/ + +class RODSPacket +{ + protected $type; // type of packet + protected $packlets; // (array of mixed) main message body + + public function __construct($type = NULL, array $arr = NULL) + { + if (!isset($type)) + return; + + $this->type = $type; + $this->packlets = $arr; + } + + public function toXML() + { + if (empty($this->type)) + return NULL; + + $doc = new DOMDocument(); + $root = $this->toDOMElement($doc); + $doc->appendChild($root); + return ($doc->saveXML($root, LIBXML_NOEMPTYTAG)); + } + + /* + public function fromXML($str) + { + try { + $xml = new SimpleXMLElement($str); + } catch (Exception $e) { + throw new RODSException("RODSPacket::fromXML failed. ". + "Mal-formated XML: '$str'\n", + PERR_INTERNAL_ERR); + } + + if (isset($this->type)&&($this->type!=$xml->getName())) + { + throw new RODSException("RODSPacket::fromXML failed. ". + "Possible type mismatch! expected type:".$this->type." but got: ". + $xml->getName()." \n", + PERR_INTERNAL_ERR); + } + + $this->type=$xml->getName(); + + foreach($xml as $key => $val) + { + if (!array_key_exists($key,$this->msg)) + { + throw new RODSException("RODSPacket::fromXML failed. ". + "Possible type mismatch! expected key '$key' doesn't exists\n", + PERR_INTERNAL_ERR); + } + $this->msg[$key]=(string)$val; + } + } + */ + + public static function parseXML($xmlstr) + { + if (false == ($doc = DOMDocument::loadXML($xmlstr))) { + throw new RODSException("RODSPacket::parseXML failed. " . + "Failed to loadXML(). The xmlstr is: $xmlstr\n", + PERR_UNEXPECTED_PACKET_FORMAT); + } + + $rp_classname = "RP_" . substr($doc->tagName, 0, strlen($doc->tagName) - 3); + $packet = new $rp_classname(); + $packet->fromDOM($doc); + } + + /* + public function fromDOM(DOMNode $domnode) + { + if (!isset($this->packlets)) + return; + + $i=0; + $domnode_children=$domnode->childNodes; + + foreach($this->packlets as $packlet_key => &$packlet_val) + { + $domnode_child=$domnode_children->item($i++); + + // check if the tag names are expected + if ($domnode_child->tagName!=$packlet_key) + { + throw new RODSException("RODSPacket::fromDOM failed. ". + "Expecting packlet:$packlet_key, but got:".$domnode_child->tagName." \n", + PERR_UNEXPECTED_PACKET_FORMAT); + } + + if (is_a($packlet_val, "RODSPacket")) //if expecting sub packet + { + $packlet_val->fromDOM($domnode_child); + } + else //if expecting an string + { + + } + } + } + + */ + + public function fromSXE(SimpleXMLElement $sxe) + { + if (!isset($this->packlets)) + return; + + foreach ($this->packlets as $packlet_key => &$packlet_val) { + if ($packlet_val instanceof RODSPacket) //if expecting sub packet + { + if (!isset($sxe->$packlet_key)) { + throw new RODSException("RODSPacket(" . get_class($this) . ")::fromSXE failed. " . + "Failed to find expected packlet: '$packlet_key' \n", + "PERR_UNEXPECTED_PACKET_FORMAT"); + } + $packlet_val->fromSXE($sxe->$packlet_key); + } else + if (is_array($packlet_val)) //if expecting array + { + if (isset($sxe->$packlet_key)) { + $packlet_val = array(); + foreach ($sxe->$packlet_key as $sxe_val) { + if ((!empty($this->array_rp_type)) && + (!empty($this->array_rp_type["$packlet_key"])) + ) // if it's an array of packets + { + $class_name = $this->array_rp_type[$packlet_key]; + $sub_array_packet = new $class_name(); + $sub_array_packet->fromSXE($sxe_val); + $packlet_val[] = $sub_array_packet; + } else { + $packlet_val[] = (string)$sxe_val; + } + } + } + + } else { + if (isset($sxe->$packlet_key)) { + $packlet_val = (string)$sxe->$packlet_key; + } + } + } + /* + foreach($sxe->children() as $child) + { + $tagname=$child->getName(); + if(substr($tagname,-3,3)=="_PI") + { + $rp_classname="RP_".substr($name,0,strlen($name)-3); + $child_rp=new $rp_classname(); + $child_rp->fromSXE($child); + } + else + { + $this->packlets[$child->getName()]=(string)$child; + } + } + */ + } + + public function toDOMElement(DOMDocument $doc) + { + if (empty($this->type)) + return NULL; + + $node = $doc->createElement($this->type); + + foreach ($this->packlets as $name => $packlet) { + if ($packlet instanceof RODSPacket) //if node is a packet + { + $child_node = $packlet->toDOMElement($doc); + if (isset($child_node)) + $node->appendChild($packlet->toDOMElement($doc)); + } else + if (is_array($packlet)) //if node is an array + { + if (isset($packlet)) { + foreach ($packlet as $sub_packlet) { + if ($sub_packlet instanceof RODSPacket) //if sub_node is a packet + { + $child_node = $sub_packlet->toDOMElement($doc); + if (isset($child_node)) + $node->appendChild($sub_packlet->toDOMElement($doc)); + } else { + //echo "sub_packlet = $sub_packlet<br/>\n"; + $node->appendChild($doc->createElement($name, htmlspecialchars($sub_packlet))); + } + } + } + } else //if node holds a string + { //echo "packlet = $packlet<br/>\n"; + $node->appendChild($doc->createElement($name, htmlspecialchars($packlet))); + } + } + + return $node; + } + + public function __get($name) + { + if (array_key_exists($name, $this->packlets)) + return $this->packlets[$name]; + else { + debug_print_backtrace(); + throw new RODSException("RODSPacket::__get() failed. Trying to access field '$name' that doesn't exist!", + "PERR_INTERNAL_ERR"); + } + } + + public function __set($name, $val) + { + if (array_key_exists($name, $this->packlets)) + $this->packlets[$name] = $val; + else + throw new RODSException("RODSPacket::__set() failed. Trying to access field '$name' that doesn't exist!", + "PERR_INTERNAL_ERR"); + } + + /* + public static function makeStartupPack($user,$zone) + { + $msg=array(1,0,$user,$zone,$user,$zone,'rods0.5','a',NULL); + return (new RODSPacket("StartupPack_PI",$msg)); + } + */ +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php new file mode 100644 index 00000000000..8cabcd0ae42 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php @@ -0,0 +1,14 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_BinBytesBuf extends RODSPacket +{ + public function __construct($buflen = '', $buf = '') + { + $packlets = array("buflen" => $buflen, "buf" => $buf); + parent::__construct("BinBytesBuf_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php new file mode 100644 index 00000000000..b7ad6fd0cad --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php @@ -0,0 +1,19 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_CollInp extends RODSPacket +{ + public function __construct($collName = "", + RP_KeyValPair $KeyValPair_PI = NULL) + { + if (!isset($KeyValPair_PI)) $KeyValPair_PI = new RP_KeyValPair(); + + $packlets = array("collName" => $collName, + 'KeyValPair_PI' => $KeyValPair_PI); + parent::__construct("CollInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php new file mode 100644 index 00000000000..939d2e37596 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php @@ -0,0 +1,17 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_CollOprStat extends RODSPacket +{ + public function __construct($filesCnt = 0, $totalFileCnt = 0, $bytesWritten = 0, + $lastObjPath = '') + { + $packlets = array("filesCnt" => $filesCnt, "totalFileCnt" => $totalFileCnt, + 'bytesWritten' => $bytesWritten, 'lastObjPath' => $lastObjPath); + parent::__construct("CollOprStat_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php new file mode 100644 index 00000000000..c16b3628f5e --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php @@ -0,0 +1,19 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_DataObjCopyInp extends RODSPacket +{ + public function __construct(RP_DataObjInp $src = NULL, + RP_DataObjInp $dest = NULL) + { + if (!isset($src)) $src = new RP_DataObjInp(); + if (!isset($dest)) $dest = new RP_DataObjInp(); + + $packlets = array("src" => $src, 'dest' => $dest); + parent::__construct("DataObjCopyInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php new file mode 100644 index 00000000000..f7a8f939b82 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php @@ -0,0 +1,22 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_DataObjInp extends RODSPacket +{ + public function __construct($objPath = "", $createMode = 0, $openFlags = 0, + $offset = 0, $dataSize = -1, $numThreads = 0, $oprType = 0, + RP_KeyValPair $KeyValPair_PI = NULL) + { + if (!isset($KeyValPair_PI)) $KeyValPair_PI = new RP_KeyValPair(); + + $packlets = array("objPath" => $objPath, 'createMode' => $createMode, + 'openFlags' => $openFlags, 'offset' => $offset, "dataSize" => $dataSize, + "numThreads" => $numThreads, "oprType" => $oprType, + 'KeyValPair_PI' => $KeyValPair_PI); + parent::__construct("DataObjInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php new file mode 100644 index 00000000000..55dcb02383d --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php @@ -0,0 +1,56 @@ +<?php +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * Description of RP_ExecCmdOut + * + * @author lisa + */ +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_ExecCmdOut extends RODSPacket +{ + + public function __construct($buf = '', $buflen = 0) + { + $packlets = array("buf" => $buf); + parent::__construct("ExecCmdOut_PI", $packlets); + } + + public function fromSXE(SimpleXMLElement $sxe) + { + $binbytes = "BinBytesBuf_PI"; + $name = "buf"; + + if (!isset($this->packlets)) + return; + + $packlet_value = ""; + try { + foreach ($sxe->$binbytes as $binpacket) { + if (strlen($binpacket->$name) > 0) { + $decoded_value = base64_decode($binpacket->$name); + $packlet_value .= $decoded_value; + } + } + + // can't find a better way yet to get rid of the garbage on the end of the string ... + $len = strlen($packlet_value); + $cleaned_value = ""; + for ($i = 0; $i < $len; $i++) { + if (ord($packlet_value{$i}) <= 0) break; + $cleaned_value .= $packlet_value{$i}; + } + + $this->packlets[$name] = $cleaned_value; + $this->packlets["buflen"] = $i; + } catch (Exception $ex) { + $this->packlets[$name] = ""; + } + } +} + +?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php new file mode 100644 index 00000000000..88a62fc2b0c --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php @@ -0,0 +1,22 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_ExecMyRuleInp extends RODSPacket +{ + public function __construct($myRule = '', RP_RHostAddr $RHostAddr_PI = null, + RP_KeyValPair $KeyValPair_PI = null, $outParamDesc = '', + RP_MsParamArray $MsParamArray_PI = null) + { + if (!isset($RHostAddr_PI)) $RHostAddr_PI = new RP_RHostAddr(); + if (!isset($KeyValPair_PI)) $KeyValPair_PI = new RP_KeyValPair(); + if (!isset($MsParamArray_PI)) $MsParamArray_PI = new RP_MsParamArray(); + + $packlets = array("myRule" => $myRule, "RHostAddr_PI" => $RHostAddr_PI, + "KeyValPair_PI" => $KeyValPair_PI, "outParamDesc" => $outParamDesc, + "MsParamArray_PI" => $MsParamArray_PI); + parent::__construct("ExecMyRuleInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php new file mode 100644 index 00000000000..2e1e29a2bfe --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php @@ -0,0 +1,25 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_GenQueryInp extends RODSPacket +{ + public function __construct($maxRows = 500, $continueInx = 0, + RP_KeyValPair $KeyValPair_PI = NULL, + RP_InxIvalPair $InxIvalPair_PI = NULL, + RP_InxValPair $InxValPair_PI = NULL, + $options = 0, $partialStartIndex = 0) + { + if (!isset($KeyValPair_PI)) $KeyValPair_PI = new RP_KeyValPair(); + if (!isset($InxIvalPair_PI)) $InxIvalPair_PI = new RP_InxIvalPair(); + if (!isset($InxValPair_PI)) $InxValPair_PI = new RP_InxValPair(); + + $packlets = array("maxRows" => $maxRows, 'continueInx' => $continueInx, + 'partialStartIndex' => $partialStartIndex, 'options' => $options, + 'KeyValPair_PI' => $KeyValPair_PI, 'InxIvalPair_PI' => $InxIvalPair_PI, + 'InxValPair_PI' => $InxValPair_PI); + parent::__construct("GenQueryInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php new file mode 100644 index 00000000000..e9f31dd5368 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php @@ -0,0 +1,22 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_GenQueryOut extends RODSPacket +{ + // if one of the packlet is an array of packets, define it here. + protected $array_rp_type; + + public function __construct($rowCnt = 0, $attriCnt = 0, $continueInx = 0, + $totalRowCount = 0, array $SqlResult_PI = array()) + { + $this->array_rp_type = array("SqlResult_PI" => "RP_SqlResult"); + + $packlets = array("rowCnt" => $rowCnt, 'attriCnt' => $attriCnt, + 'continueInx' => $continueInx, 'totalRowCount' => $totalRowCount, + 'SqlResult_PI' => $SqlResult_PI); + parent::__construct("GenQueryOut_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php new file mode 100644 index 00000000000..ac56bc93df8 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php @@ -0,0 +1,27 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_InxIvalPair extends RODSPacket +{ + public function __construct($iiLen = 0, array $inx = array(), array $ivalue = array()) + { + $packlets = array("iiLen" => $iiLen, 'inx' => $inx, 'ivalue' => $ivalue); + parent::__construct("InxIvalPair_PI", $packlets); + } + + public function fromAssocArray($array) + { + if (!empty($array)) { + $this->packlets["iiLen"] = count($array); + $this->packlets["inx"] = array_keys($array); + $this->packlets["ivalue"] = array_values($array); + } else { + $this->packlets["iiLen"] = 0; + $this->packlets["inx"] = array(); + $this->packlets["ivalue"] = array(); + } + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php new file mode 100644 index 00000000000..787d27fd103 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php @@ -0,0 +1,44 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +require_once(dirname(__FILE__) . "/../RodsGenQueryNum.inc.php"); + +class RP_InxValPair extends RODSPacket +{ + public function __construct($isLen = 0, array $inx = array(), array $svalue = array()) + { + $packlets = array("isLen" => $isLen, 'inx' => $inx, 'svalue' => $svalue); + parent::__construct("InxValPair_PI", $packlets); + } + + public function fromAssocArray($array) + { + if (!empty($array)) { + $this->packlets["isLen"] = count($array); + $this->packlets["inx"] = array_keys($array); + $this->packlets["svalue"] = array_values($array); + } else { + $this->packlets["isLen"] = 0; + $this->packlets["inx"] = array(); + $this->packlets["svalue"] = array(); + } + } + + public function fromRODSQueryConditionArray($array) + { + $this->packlets["isLen"] = 0; + $this->packlets["inx"] = array(); + $this->packlets["svalue"] = array(); + + if (!isset($array)) return; + + $this->packlets["isLen"] = count($array); + foreach ($array as $cond) { + $this->packlets["inx"][] = $cond->name; + $this->packlets["svalue"][] = "$cond->op '$cond->value'"; + //echo "<pre> $cond->op '$cond->value' </pre>"; + } + } +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php new file mode 100644 index 00000000000..6d8dd12ff12 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php @@ -0,0 +1,47 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_KeyValPair extends RODSPacket +{ + public function __construct($ssLen = 0, array $keyWord = array(), array $svalue = array()) + { + if ($ssLen < 1) { + $keyWord = NULL; + $svalue = NULL; + } + + $packlets = array("ssLen" => $ssLen, 'keyWord' => $keyWord, + 'svalue' => $svalue); + parent::__construct("KeyValPair_PI", $packlets); + } + + public function fromAssocArray(array $array) + { + if (!empty($array)) { + $this->packlets["ssLen"] = count($array); + $this->packlets["keyWord"] = array_keys($array); + $this->packlets["svalue"] = array_values($array); + } else { + $this->packlets["ssLen"] = 0; + $this->packlets["keyWord"] = array(); + $this->packlets["svalue"] = array(); + } + } + + public function fromRODSQueryConditionArray($array) + { + $this->packlets["ssLen"] = 0; + $this->packlets["keyWord"] = array(); + $this->packlets["svalue"] = array(); + + if (!isset($array)) return; + + $this->packlets["ssLen"] = count($array); + foreach ($array as $cond) { + $this->packlets["keyWord"][] = $cond->name; + $this->packlets["svalue"][] = "$cond->op '$cond->value'"; + } + } +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php new file mode 100644 index 00000000000..65ee3580e97 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php @@ -0,0 +1,17 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_MiscSvrInfo extends RODSPacket +{ + public function __construct($serverType = 0, $relVersion = 0, $apiVersion = 0, + $rodsZone = '') + { + $packlets = array("serverType" => $serverType, 'relVersion' => $relVersion, + 'apiVersion' => $apiVersion, 'rodsZone' => $rodsZone); + parent::__construct("MiscSvrInfo_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php new file mode 100644 index 00000000000..b67b7083d44 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php @@ -0,0 +1,18 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_ModAVUMetadataInp extends RODSPacket +{ + public function __construct($arg0 = NULL, $arg1 = NULL, $arg2 = NULL, + $arg3 = NULL, $arg4 = NULL, $arg5 = NULL, $arg6 = NULL, $arg7 = NULL, $arg8 = NULL, + $arg9 = NULL) + { + $packlets = array("arg0" => $arg0, "arg1" => $arg1, "arg2" => $arg2, + "arg3" => $arg3, "arg4" => $arg4, "arg5" => $arg5, + "arg6" => $arg6, "arg7" => $arg7, "arg8" => $arg8, "arg9" => $arg9); + parent::__construct("ModAVUMetadataInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php new file mode 100644 index 00000000000..abf9bc471bb --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php @@ -0,0 +1,45 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_MsParam extends RODSPacket +{ + public function __construct($label = '', RODSPacket $inOutStruct = null, + RP_BinBytesBuf $BinBytesBuf_PI = null) + { + if (!isset($BinBytesBuf_PI)) $BinBytesBuf_PI = new RP_BinBytesBuf(); + if (!isset($inOutStruct)) $inOutStruct = new RODSPacket(); + + $packlets = array("label" => $label, "type" => $inOutStruct->type, + $inOutStruct->type => $inOutStruct, "BinBytesBuf_PI" => $BinBytesBuf_PI); + parent::__construct("MsParam_PI", $packlets); + } + + // need to overwrite it's parent function here, since $inOutStruct->type + // can be undefined, when it's parent packet class was defined. + public function fromSXE(SimpleXMLElement $sxe) + { + if (!isset($this->packlets)) + return; + + $this->packlets["label"] = (string)$sxe->label; + $this->packlets["type"] = (string)$sxe->type; + + $typename = $this->packlets["type"]; //type of the expected packet + if (substr($typename, -3, 3) != "_PI") { + throw new RODSException("RP_MsParam::fromSXE " . + "The XML node's type is unexpected: '$typename' " . + " expecting some thing like xxx_PI", + "SYS_PACK_INSTRUCT_FORMAT_ERR"); + } + $rp_classname = "RP_" . substr($typename, 0, strlen($typename) - 3); + $inOutStruct = new $rp_classname(); + $inOutStruct->fromSXE($sxe->$typename); + $this->packlets["$typename"] = $inOutStruct; + + $this->packlets['BinBytesBuf_PI'] = new RP_BinBytesBuf(); + $this->packlets['BinBytesBuf_PI']->fromSXE($sxe->BinBytesBuf_PI); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php new file mode 100644 index 00000000000..b747c098dd2 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php @@ -0,0 +1,21 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_MsParamArray extends RODSPacket +{ + // if one of the packlet is an array of packets, define it here. + protected $array_rp_type; + + public function __construct(array $MsParam_PI = array(), + $oprType = 0) + { + $this->array_rp_type = array("MsParam_PI" => "RP_MsParam"); + + $packlets = array("paramLen" => count($MsParam_PI), + "oprType" => $oprType, "MsParam_PI" => $MsParam_PI); + parent::__construct("MsParamArray_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php new file mode 100644 index 00000000000..0249da9a05d --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php @@ -0,0 +1,17 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_MsgHeader extends RODSPacket +{ + public function __construct($type = NULL, $msgLen = 0, $errorLen = 0, $bsLen = 0, + $intInfo = 0) + { + $packlets = array("type" => $type, "msgLen" => $msgLen, + "errorLen" => $errorLen, "bsLen" => $bsLen, "intInfo" => $intInfo); + parent::__construct("MsgHeader_PI", $packlets); + } + +} + +?> +
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php new file mode 100644 index 00000000000..28602f3150f --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php @@ -0,0 +1,15 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_RHostAddr extends RODSPacket +{ + public function __construct($hostAddr = '', $rodsZone = '', $port = 0) + { + $packlets = array("hostAddr" => $hostAddr, "rodsZone" => $rodsZone, + "port" => $port); + parent::__construct("RHostAddr_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php new file mode 100644 index 00000000000..290a4c9a5b0 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php @@ -0,0 +1,20 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_RodsObjStat extends RODSPacket +{ + public function __construct($objSize = 0, $objType = 0, $numCopies = 0, + $dataId = -1, $chksum = NULL, $ownerName = NULL, $ownerZone = NULL, + $createTime = NULL, $modifyTime = NULL) + { + $packlets = array("objSize" => $objSize, 'objType' => $objType, + 'numCopies' => $numCopies, 'dataId' => $dataId, "chksum" => $chksum, + "ownerName" => $ownerName, "ownerZone" => $ownerZone, + 'createTime' => $createTime, 'modifyTime' => $modifyTime); + parent::__construct("RodsObjStat_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php new file mode 100644 index 00000000000..3f5a91a35d0 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php @@ -0,0 +1,14 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_STR extends RODSPacket +{ + public function __construct($myStr = '') + { + $packlets = array("myStr" => $myStr); + parent::__construct("STR_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php new file mode 100644 index 00000000000..1950f096f13 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php @@ -0,0 +1,15 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_SqlResult extends RODSPacket +{ + public function __construct($attriInx = 0, $reslen = 0, array $value = array()) + { + $packlets = array("attriInx" => $attriInx, 'reslen' => $reslen, 'value' => $value); + parent::__construct("SqlResult_PI", $packlets); + } + + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php new file mode 100644 index 00000000000..a411bd7425b --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php @@ -0,0 +1,18 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_StartupPack extends RODSPacket +{ + public function __construct($user = "", $zone = "", $relVersion = RODS_REL_VERSION, + $apiVersion = RODS_API_VERSION, $option = NULL) + { + $packlets = array("irodsProt" => 1, "connectCnt" => 0, + "proxyUser" => $user, "proxyRcatZone" => $zone, "clientUser" => $user, + "clientRcatZone" => $zone, "relVersion" => $relVersion, + "apiVersion" => $apiVersion, "option" => $option); + parent::__construct("StartupPack_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php new file mode 100644 index 00000000000..bb591f01343 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_TransStat extends RODSPacket +{ + public function __construct($numThreads = 0, $bytesWritten = 0) + { + $packlets = array("numThreads" => $numThreads, + 'bytesWritten' => $bytesWritten); + parent::__construct("TransStat_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php new file mode 100644 index 00000000000..a08cb6cc24c --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_Version extends RODSPacket +{ + public function __construct($status = 0, $relVersion = 'rods0.5', + $apiVersion = 'a') + { + $packlets = array("status" => $status, "relVersion" => $relVersion, + "apiVersion" => $apiVersion); + parent::__construct("Version_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php new file mode 100644 index 00000000000..9dc87140635 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php @@ -0,0 +1,14 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_authRequestOut extends RODSPacket +{ + public function __construct($challenge = "") + { + $packlets = array("challenge" => $challenge); + parent::__construct("authRequestOut_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php new file mode 100644 index 00000000000..23d754df0ac --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php @@ -0,0 +1,14 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_authResponseInp extends RODSPacket +{ + public function __construct($response = "", $username = "") + { + $packlets = array("response" => $response, "username" => $username); + parent::__construct("authResponseInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php new file mode 100644 index 00000000000..d16e1b3f3a4 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_dataObjCloseInp extends RODSPacket +{ + public function __construct($l1descInx = -1, $bytesWritten = 0) + { + $packlets = array("l1descInx" => $l1descInx, + 'bytesWritten' => $bytesWritten); + parent::__construct("dataObjCloseInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php new file mode 100644 index 00000000000..29bd1b68e35 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_dataObjReadInp extends RODSPacket +{ + public function __construct($l1descInx = -1, $len = 0) + { + $packlets = array("l1descInx" => $l1descInx, + 'len' => $len); + parent::__construct("dataObjReadInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php new file mode 100644 index 00000000000..5327d7a8932 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_dataObjWriteInp extends RODSPacket +{ + public function __construct($dataObjInx = -1, $len = 0) + { + $packlets = array("dataObjInx" => $dataObjInx, + 'len' => $len); + parent::__construct("dataObjWriteInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php new file mode 100644 index 00000000000..e28a7b3b498 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_fileLseekInp extends RODSPacket +{ + public function __construct($fileInx = -1, $offset = 0, $whence = 0) + { + $packlets = array("fileInx" => $fileInx, "offset" => $offset, + 'whence' => $whence); + parent::__construct("fileLseekInp_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php new file mode 100644 index 00000000000..cf01741bea6 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php @@ -0,0 +1,15 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_fileLseekOut extends RODSPacket +{ + public function __construct($offset = 0) + { + $packlets = array("offset" => $offset); + parent::__construct("fileLseekOut_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php new file mode 100644 index 00000000000..ba073e97939 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php @@ -0,0 +1,14 @@ +<?php + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); +class RP_getTempPasswordOut extends RODSPacket +{ + public function __construct($stringToHashWith = '') + { + $packlets = array("stringToHashWith" => $stringToHashWith); + parent::__construct("getTempPasswordOut_PI", $packlets); + } + +} + +?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php new file mode 100644 index 00000000000..0bbc2334a82 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php @@ -0,0 +1,13 @@ +<?php + +require_once(dirname(__FILE__)."/../autoload.inc.php"); +class RP_pamAuthRequestInp extends RODSPacket +{ + public function __construct($pamUser="", $pamPassword="", $timeToLive=-1) + { + $packlets=array("pamUser" => $pamUser, "pamPassword" => $pamPassword, "timeToLive" => $timeToLive); + parent::__construct("pamAuthRequestInp_PI",$packlets); + } + +} +?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php new file mode 100644 index 00000000000..01959954c97 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php @@ -0,0 +1,13 @@ +<?php + +require_once(dirname(__FILE__)."/../autoload.inc.php"); +class RP_pamAuthRequestOut extends RODSPacket +{ + public function __construct($irodsPamPassword="") + { + $packlets=array("irodsPamPassword" => $irodsPamPassword); + parent::__construct("pamAuthRequestOut_PI",$packlets); + } + +} +?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php new file mode 100644 index 00000000000..530f3048604 --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php @@ -0,0 +1,13 @@ +<?php + +require_once(dirname(__FILE__)."/../autoload.inc.php"); +class RP_sslEndInp extends RODSPacket +{ + public function __construct($arg0="") + { + $packlets=array("arg0" => $arg0); + parent::__construct("sslEndInp_PI",$packlets); + } + +} +?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php new file mode 100644 index 00000000000..03c8365898e --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php @@ -0,0 +1,13 @@ +<?php + +require_once(dirname(__FILE__)."/../autoload.inc.php"); +class RP_sslStartInp extends RODSPacket +{ + public function __construct($arg0="") + { + $packlets=array("arg0" => $arg0); + parent::__construct("sslStartInp_PI",$packlets); + } + +} +?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ticketAdminInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ticketAdminInp.class.php new file mode 100644 index 00000000000..ec849b68dbe --- /dev/null +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ticketAdminInp.class.php @@ -0,0 +1,30 @@ +<?php +/** + * Developer: Daniel + * Date: 11.01.13 + * Time: 16:45 + */ + +require_once(dirname(__FILE__) . "/../autoload.inc.php"); + +class RP_ticketAdminInp extends RODSPacket +{ + public function __construct($arg1 = 'session', // session -> to use it, create -> to... create!, + $arg2 = '', // the actual ticket + $arg3 = '', // "read" or "write" -> in case of "create" above + $arg4 = '', // full path to the resource, e.g.: /tempZone/home/rods/as + $arg5 = '', + $arg6 = '') + { + + $packlets = array( 'arg1' => $arg1, + 'arg2' => $arg2, + 'arg3' => $arg3, + 'arg4' => $arg4, + 'arg5' => $arg5, + 'arg6' => $arg6, + ); + parent::__construct('ticketAdminInp_PI', $packlets); + } + +}
\ No newline at end of file |