* @revision 01 * @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/tlv/helper/u16.php"); class Oscar_TLV_NickInfo_NickFlags extends Oscar_TLV_Helper_u16 { /* Type of this TLV */ const TYPE = 0x0001; /* Value Types */ const UNCONFIRMED = 0x0001; const AOL_USER = 0x0004; const AIM_USER = 0x0010; const UNAVAILABLE = 0x0020; const ICQ_USER = 0x0040; const WIRELESS = 0x0080; const IM_FOWARD = 0x0200; const BOT = 0x0400; const WIRELESS_OW = 0x1000; // {{{ toString /** * Generate a human readable string from this TLV * * @access public * @return string **/ public function toString () { $FlagString = ""; $Flags = array ("UNCONFIRMED", "AOL_USER", "AIM_USER", "UNAVAILABLE", "ICQ_USER", "WIRELESS", "IM_FOWARD", "BOT", "WIRELESS_OW"); foreach ($Flags as $Flag) { $v = constant ("Oscar_TLV_NickInfo_NickFlags::" . $Flag); if (($this->Value & $v) == $v) $FlagString .= $Flag . " "; } return "TLV NickInfo_NickFlags with Flags [ " . $FlagString . "] (" . $this->Value . ")"; } // }}} } Oscar_TLV::classAdd ("NICK_INFO_TAGS", "Oscar_TLV_NickInfo_NickFlags"); ?>