def getRegInfo(disp, host, info={}, sync=True):
 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})

def getRegInfo ( disp , host , info = { } , sync = True ) : 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 .