Esempio n. 1
0
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;
}
Esempio n. 2
0
void ServiceDiscovery::execute() {
    WndRef exeForm=AdHocForm::createAdHocForm(tabs->getHWnd(), jid, node, rc);
    tabs->addWindow(exeForm);
    tabs->switchByWndRef(exeForm);
}
Esempio n. 3
0
void ServiceDiscovery::registerForm() {
    WndRef rform=RegisterForm::createRegisterForm(tabs->getHWnd(), jid, rc);
    tabs->addWindow(rform);
    tabs->switchByWndRef(rform);
}
Esempio n. 4
0
void ServiceDiscovery::vcard() {
    WndRef vcardForm=VcardForm::createVcardForm(tabs->getHWnd(), jid, rc, false);
    tabs->addWindow(vcardForm);
    tabs->switchByWndRef(vcardForm);
}