* @revision 03 * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 3.0 Germany * @homepage http://oss.tiggerswelt.net/oscar/ * @copyright Copyright © 2009 tiggersWelt.net */ require_once ("oscar/snac.php"); class Oscar_SNAC_Bart_DownloadReply extends Oscar_SNAC { /* About this class */ const SNAC_FAMILY = 0x0010; const SNAC_SERVICE = 0x0007; public $Reference = ""; public $Query = null; public $Code = 0x00; public $Reply = null; // {{{ parse /** * @access public * @return void */ public function parse () { $this->Reference = Oscar_Common::string08 ($this->Data, 0 ,true); $this->Query = new Oscar_Bart ($this->Data, true); $this->Code = Oscar_Common::str2int8 ($this->Data, 0, true); $this->Reply = new Oscar_Bart ($this->Data, true); $this->Payload = Oscar_Common::string16 ($this->Data, 0, true); } // }}} // {{{ generate /** * Generate an binary string from this snac * * @access public * @return string **/ public function generate () { return Oscar_Common::toString08 ($this->Reference) . (is_object ($this->Query) ? $this->Query->generate () : "") . Oscar_Common::int8toStr ($this->Code) . (is_object ($this->Reply) ? $this->Reply->generate () : "") . Oscar_Common::toString16 ($this->Payload); } // }}} } ?>