* @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"); require_once ("oscar/bart.php"); require_once ("oscar/common.php"); class Oscar_SNAC_Bart_UploadReply extends Oscar_SNAC { /* About this class */ const SNAC_FAMILY = 0x0010; const SNAC_SERVICE = 0x0003; /* Reply types */ const REPLY_SUCCESS = 0x00; const REPLY_INVALID = 0x01; const REPLY_NOCUSTOM = 0x02; const REPLY_TOSMALL = 0x03; const REPLY_TOBIG = 0x04; const REPLY_INVALIDTYPE = 0x05; const REPLY_BANNED = 0x06; const REPLY_NOTFOUND = 0x07; /* Properties of this SNAC */ public $Code = 0x0000; public $Bart = null; // {{{ parse /** * @access public * @return void */ public function parse () { $this->Code = Oscar_Common::str2int8 ($this->Data, 0, true); $this->Bart = new Oscar_Bart ($this->Data); } // }}} // {{{ generate /** * Generate an binary string from this snac * * @access public * @return string **/ public function generate () { $this->Data = Oscar_Common::int08tostr ($this->Code) . (is_object ($this->Bart) ? $this->Bart->generate () : "") ; return parent::generate (); } // }}} } ?>