comparison src/core/sat_main.py @ 572:ca13633d3b6b

dates update
author Goffi <goffi@goffi.org>
date Mon, 07 Jan 2013 23:30:13 +0100
parents 626e85e46d7c
children 133078b82ca8
comparison
equal deleted inserted replaced
571:1cb24325485c 572:ca13633d3b6b
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 """ 4 """
5 SAT: a jabber client 5 SAT: a jabber client
6 Copyright (C) 2009, 2010, 2011, 2012 Jérôme Poisson (goffi@goffi.org) 6 Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org)
7 7
8 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Affero General Public License as published by 9 it under the terms of the GNU Affero General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or 10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version. 11 (at your option) any later version.
597 """xep-0030 Discovery Protocol. 597 """xep-0030 Discovery Protocol.
598 @param disco_result: result of the disco item querry 598 @param disco_result: result of the disco item querry
599 @param disco_client: SatDiscoProtocol instance 599 @param disco_client: SatDiscoProtocol instance
600 @param profile: profile of the user 600 @param profile: profile of the user
601 @param initialized: deferred which must be chained when everything is done""" 601 @param initialized: deferred which must be chained when everything is done"""
602
602 def _check_entity_cb(result, entity, profile): 603 def _check_entity_cb(result, entity, profile):
603 for category, type in result.identities: 604 for category, type in result.identities:
604 debug (_('Identity added: (%(category)s,%(type)s) ==> %(entity)s [%(profile)s]') % { 605 debug (_('Identity added: (%(category)s,%(type)s) ==> %(entity)s [%(profile)s]') % {
605 'category':category, 'type':type, 'entity':entity, 'profile':profile}) 606 'category':category, 'type':type, 'entity':entity, 'profile':profile})
606 self.memory.addServerIdentity(category, type, entity, profile) 607 self.memory.addServerIdentity(category, type, entity, profile)