'Respond to an incoming pull from the peer repository
@param resource: the resource to be synchronized
@param start: index of the first record to send
@param limit: maximum number of records to send
@param msince: minimum modification date/time for records to send
@param filters: URL filters for record extraction
@param mixed: negotiate resource with peer (disregard resource)
@param pretty_print: make the output human-readable
@return: a dict {status, remote, message, response}, with:
- status....the outcome of the operation
- remote....whether the error was remote (or local)
- message...the log message
- response..the response to send to the peer'

def send(self, resource, start=None, limit=None, msince=None, filters=None, mixed=False, pretty_print=False):

    if ((not resource) or mixed):
        msg = 'Mixed    resource    synchronization    not    supported'
        return {'status': self.log.FATAL, 'message': msg, 'response': current.xml.json_message(False, 400, msg)}
    output = resource.export_xml(start=start, limit=limit, filters=filters, msince=msince, pretty_print=pretty_print)
    count = resource.results
    msg = ('Data    sent    to    peer    (%s    records)' % count)
    current.db((current.s3db.sync_repository.id == self.repository.id)).update(last_connected=datetime.datetime.utcnow())
    headers = current.response.headers
    headers['Content-Type'] = 'text/xml'
    return {'status': self.log.SUCCESS, 'message': msg, 'response': output}
