def discoverItems(disp,jid,node=None):
    """ Query remote object about any items that it contains. Return items list. """
    """ According to JEP-0030:
        query MAY have node attribute
        item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
        action attribute of item can be either of remove or update value."""
    ret=[]
    for i in _discover(disp,NS_DISCO_ITEMS,jid,node):
        if i.getName()=='agent' and i.getTag('name'): i.setAttr('name',i.getTagData('name'))
        ret.append(i.attrs)
    return ret
 Query remote object about any items that it contains. Return items list. 
chrome-cordova/gcmServer/xmpp/features.py