ProcessResult CaptchaListener::blockArrived(JabberDataBlockRef block, const ResourceContextRef rc){ JabberDataBlockRef challenge=block->findChildNamespace("challenge", "urn:xmpp:tmp:challenge"); if (!challenge) return BLOCK_REJECTED; JabberDataBlockRef xdata=challenge->findChildNamespace("x", "jabber:x:data"); const std::string &jid=block->getAttribute("from"); const std::string &id=block->getAttribute("id"); CaptchaForm::ref rform=CaptchaForm::createCaptchaForm(tabs->getHWnd(), jid, id, rc); tabs->addWindow(rform); tabs->switchByWndRef(rform); rform->bindXData(xdata); return BLOCK_PROCESSED; }
void ServiceDiscovery::execute() { WndRef exeForm=AdHocForm::createAdHocForm(tabs->getHWnd(), jid, node, rc); tabs->addWindow(exeForm); tabs->switchByWndRef(exeForm); }
void ServiceDiscovery::registerForm() { WndRef rform=RegisterForm::createRegisterForm(tabs->getHWnd(), jid, rc); tabs->addWindow(rform); tabs->switchByWndRef(rform); }
void ServiceDiscovery::vcard() { WndRef vcardForm=VcardForm::createVcardForm(tabs->getHWnd(), jid, rc, false); tabs->addWindow(vcardForm); tabs->switchByWndRef(vcardForm); }