* @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"); require_once ("oscar/snac/helper/error.php"); class Oscar_SNAC_Invite extends Oscar_SNAC { const SNAC_FAMILY = 0x0006; const SNAC_VERSION = 0x0001; const SNAC_TOOLID = 0x0110; const SNAC_TOOL_VERSION = 0x164F; } class Oscar_SNAC_Invite_Error extends Oscar_SNAC_Helper_Error { /* About this class */ const SNAC_FAMILY = 0x0006; const SNAC_SERVICE = 0x0001; } class Oscar_SNAC_Invite_Request extends Oscar_SNAC_Helper_TLV { /* About this class */ const SNAC_FAMILY = 0x0006; const SNAC_SERVICE = 0x0002; private $TLV_EMail = null; private $TLV_Text = null; // {{{ __construct /** * Generate a new invitation * * @access public * @return void */ public function __construct (&$Parent = null, $EMail = "", $Text = "") { parent::__construct ($Parent); if ($EMail != "") $this->TLVs [] = new Oscar_TLV_EMail ($Parent, $EMail); if ($Text != "") $this->TLVs [] = new Oscar_TLV_Invite ($Parent, $Text); } // }}} // {{{ setEMail /** * Set E-Mail-Address for invitation * * @param string $EMail * * @access public * @return void */ public function setEMail ($EMail) { if (is_array ($this->TLVs)) foreach ($this->TLVs as $ID=>$TLV) if ($TLV instanceof Oscar_TLV_EMail) $this->TLVs [$ID]->setEMail ($EMail); } // }}} // {{{ setText /** * Set Text of invitation * * @param stirng $Text * * @access public * @return void */ public function setText ($Text) { if (is_array ($this->TLVs)) foreach ($this->TLVs as $ID=>$TLV) if ($TLV instanceof Oscar_TLV_Invite) $this->TLVs [$ID]->setText ($Text); } // }}} } class Oscar_SNAC_Invite_ACK extends Oscar_SNAC { /* About this class */ const SNAC_FAMILY = 0x0006; const SNAC_SERVICE = 0x0003; } ?>