* @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/common.php"); require_once ("oscar/snac.php"); require_once ("oscar/snac/rate/parameter.php"); class Oscar_SNAC_Rate_Change extends Oscar_SNAC { /* About this class */ const SNAC_FAMILY = 0x0001; const SNAC_SERVICE = 0x000A; public $Code = 0x0000; public $Parameters = array (); // {{{ parse /** * Parse a received packet * * @access public * @return void */ public function parse () { $this->Code = Oscar_Common::str2int16 ($this->Data, 0, true); $this->Parameters = Oscar_SNAC_Rate_Parameter::getParameters ($this->Data); } // }}} // {{{ generate /** * Prepare for submission * * @access public * @return string **/ public function generate () { $this->Data = Oscar_Common::int16tostr ($this->Code) . Oscar_SNAC_Rate_Parameter::setParameters ($this->Parameters); return parent::generate (); } // }}} } ?>