* @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_Auth_Request extends Oscar_SNAC_Helper_TLV { const SNAC_FAMILY = 0x0017; const SNAC_SERVICE = 0x0006; // {{{ __construct /** * Create a new authentication-request * * @param object $Parent (optional) Our parent OSCAR-Instance * @param string $Username (optional) Which username * * @access friendly * @return void */ function __construct ($Parent = null, $Username = null) { // Inherit to our parent parent::__construct ($Parent); // Set username if ($Username !== null) $this->setUsername ($Username); } // }}} // {{{ getTLVClasses /** * Retrive a list of prefered TLV-Types for this SNAC * * @access protected * @return array */ protected function getTLVClasses () { return array ( "Oscar_TLV_Logon_Username", ); } // }}} // {{{ setUsername /** * Set username for this SNAC * * @param string $Username * * @access public * @return void */ public function setUsername ($Username) { if (is_object ($TLV = self::findTLV ("Oscar_TLV_Logon_Username"))) $TLV->Value = $Username; else parent::addTLV (new Oscar_TLV_Logon_Username ($this->Parent, $Username)); } // }}} } ?>