* @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/helper/tlv.php"); class Oscar_SNAC_ICBM_MissedMessage extends Oscar_SNAC_Helper_TLV { /* About this class */ const SNAC_FAMILY = 0x0004; const SNAC_SERVICE = 0x000A; /* Reason types */ const REASON_TOO_LARGE = 0x0001; const REASON_RATE_EXCEEDED = 0x0002; const REASON_EVIL_SENDER = 0x0004; const REASON_EVIL_RECEIVER = 0x0008; // Information about missed messages public $Messages = array (); public $Username = ""; public $Warnlevel = ""; // {{{ parse /** * @access public * @return void */ public function parse () { // Reset internal storage $this->Messages = array (); while (strlen ($this->Data) > 0) { $this->TLVs = array (); // Get the channel of missed message $Channel = Oscar_Common::str2int16 ($this->Data, 0, true); // Parse userinfo of missed message parent::parseBuddyInfo (); // Retrive additional info $NumMessages = Oscar_Common::str2int16 ($this->Data, 0, true); $Reason = Oscar_Common::str2int16 ($this->Data, 0, true); // Append to external info $this->Messages [] = array ( "Username" => $this->Username, "Channel" => $Channel, "WarnLevel" => $this->Warnlevel, "MessageCount" => $NumMessages, "Reason" => $Reason, "TLV" => $this->TLVs, ); } // Reset internal values $this->TLVs = array (); $this->Username = ""; $this->Warnlevel = 0; } // }}} } ?>