'Process an incoming disco#items stanza. If it is a get
request, find and return the appropriate items. If it
is an items result, fire the disco_items event.
Arguments:
iq -- The incoming disco#items stanza.'

def _handle_disco_items(self, iq):

    if (iq['type'] == 'get'):
        log.debug(('Received    disco    items    query    from    ' + '<%s>    to    <%s>.'), iq['from'], iq['to'])
        items = self.api['get_items'](iq['to'], iq['disco_items']['node'], iq['from'], iq)
        if isinstance(items, Iq):
            items.send()
        else:
            iq.reply()
            if items:
                iq.set_payload(items.xml)
            iq.send()
    elif (iq['type'] == 'result'):
        log.debug(('Received    disco    items    result    from    ' + '%s    to    %s.'), iq['from'], iq['to'])
        self.xmpp.event('disco_items', iq)
