def getRegInfo(disp,host,info={},sync=True):
    """ Gets registration form from remote host.
        You can pre-fill the info dictionary.
        F.e. if you are requesting info on registering user joey than specify 
        info as {'username':'joey'}. See JEP-0077 for details.
        'disp' must be connected dispatcher instance."""
    iq=Iq('get',NS_REGISTER,to=host)
    for i in info.keys(): iq.setTagData(i,info[i])
    if sync:
        resp=disp.SendAndWaitForResponse(iq)
        _ReceivedRegInfo(disp.Dispatcher,resp, host)
        return resp
    else: disp.SendAndCallForResponse(iq,_ReceivedRegInfo, {'agent': host})
 Gets registration form from remote host.
        You can pre-fill the info dictionary.
        F.e. if you are requesting info on registering user joey than specify 
        info as {'username':'joey'}. See JEP-0077 for details.
        'disp' must be connected dispatcher instance.
chrome-cordova/gcmServer/xmpp/features.py