'Invoke the download states callback with a list of the download states.'

def _invoke_states_cb(self, callback):

    dslist = []
    for d in self.downloads.values():
        d.set_moreinfo_stats(((True in self.get_peer_list) or (d.get_def().get_infohash() in self.get_peer_list)))
        ds = d.network_get_state(None, False)
        dslist.append(ds)
    def on_cb_done(new_get_peer_list):
        self.get_peer_list = new_get_peer_list
    return deferToThread(callback, dslist).addCallback(on_cb_done)
