def discoverInfo(disp, jid, node=None):
 ' According to JEP-0030:\n        query MAY have node attribute\n        identity: MUST HAVE category and name attributes and MAY HAVE type attribute.\n        feature: MUST HAVE var attribute'
 (identities, features) = ([], [])
 for i in _discover(disp, NS_DISCO_INFO, jid, node):
  if (i.getName() == 'identity'):
   identities.append(i.attrs)
  elif (i.getName() == 'feature'):
   features.append(i.getAttr('var'))
  elif (i.getName() == 'agent'):
   if i.getTag('name'):
    i.setAttr('name', i.getTagData('name'))
   if i.getTag('description'):
    i.setAttr('name', i.getTagData('description'))
   identities.append(i.attrs)
   if i.getTag('groupchat'):
    features.append(NS_GROUPCHAT)
   if i.getTag('register'):
    features.append(NS_REGISTER)
   if i.getTag('search'):
    features.append(NS_SEARCH)
 return (identities, features)

def discoverInfo ( disp , jid , node = None ) : ( identities , features ) = ( [ ] , [ ] ) for i in _discover ( disp , NS_DISCO_INFO , jid , node ) : if ( i . getName ( ) == 'identity' ) : identities . append ( i . attrs ) elif ( i . getName ( ) == 'feature' ) : features . append ( i . getAttr ( 'var' ) ) elif ( i . getName ( ) == 'agent' ) : if i . getTag ( 'name' ) : i . setAttr ( 'name' , i . getTagData ( 'name' ) ) if i . getTag ( 'description' ) : i . setAttr ( 'name' , i . getTagData ( 'description' ) ) identities . append ( i . attrs ) if i . getTag ( 'groupchat' ) : features . append ( NS_GROUPCHAT ) if i . getTag ( 'register' ) : features . append ( NS_REGISTER ) if i . getTag ( 'search' ) : features . append ( NS_SEARCH ) return ( identities , features )
query remote object about info that it publishes .