* @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_Upload extends Oscar_SNAC { /* About this class */ const SNAC_FAMILY = 0x0010; const SNAC_SERVICE = 0x0002; public $Type = 0x0000; public $Data = ""; // {{{ parse /** * @access public * @return void */ public function parse () { $this->Type = Oscar_Common::str2int16 ($this->Data, 0, true); $Length = Oscar_Common::str2int16 ($this->Data, 0, true); $this->Data = substr ($this->Data, 0, $this->Length); } // }}} // {{{ generate /** * Generate an binary string from this snac * * @access public * @return string **/ public function generate () { $this->Data = Oscar_Common::int16tostr ($this->Type) . Oscar_Common::toString16 ($this->Data); return parent::generate (); } // }}} } ?>