Package papyon :: Package event :: Module contact

Source Code for Module papyon.event.contact

 1  # -*- coding: utf-8 -*- 
 2  # 
 3  # Copyright (C) 2007  Ali Sabil <ali.sabil@gmail.com> 
 4  # Copyright (C) 2007  Ole André Vadla Ravnås <oleavr@gmail.com> 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify 
 7  # it under the terms of the GNU General Public License as published by 
 8  # the Free Software Foundation; either version 2 of the License, or 
 9  # (at your option) any later version. 
10  # 
11  # This program is distributed in the hope that it will be useful, 
12  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
13  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
14  # GNU General Public License for more details. 
15  # 
16  # You should have received a copy of the GNU General Public License 
17  # along with this program; if not, write to the Free Software 
18  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
19  # 
20   
21  """Contact event interfaces 
22   
23  The interfaces defined in this module allow receiving notification events 
24  from the contacts.""" 
25   
26  from papyon.event import BaseEventInterface 
27   
28  __all__ = ["ContactEventInterface"] 
29   
30 -class ContactEventInterface(BaseEventInterface):
31 """Interface allowing the user to get notified about the 32 L{Contact<papyon.profile.Contact>}s events""" 33
34 - def __init__(self, client):
35 """Initializer 36 @param client: the client we want to be notified for its events 37 @type client: L{Client<papyon.Client>}""" 38 BaseEventInterface.__init__(self, client)
39
40 - def on_contact_memberships_changed(self, contact):
41 """Called when the memberships of a contact changes. 42 @param contact: the contact whose presence changed 43 @type contact: L{Contact<papyon.profile.Contact>} 44 @see: L{Memberships<papyon.profile.Membership>}""" 45 pass
46
47 - def on_contact_presence_changed(self, contact):
48 """Called when the presence of a contact changes. 49 @param contact: the contact whose presence changed 50 @type contact: L{Contact<papyon.profile.Contact>}""" 51 pass
52
53 - def on_contact_display_name_changed(self, contact):
54 """Called when the display name of a contact changes. 55 @param contact: the contact whose presence changed 56 @type contact: L{Contact<papyon.profile.Contact>}""" 57 pass
58
59 - def on_contact_personal_message_changed(self, contact):
60 """Called when the personal message of a contact changes. 61 @param contact: the contact whose presence changed 62 @type contact: L{Contact<papyon.profile.Contact>}""" 63 pass
64
65 - def on_contact_current_media_changed(self, contact):
66 """Called when the current media of a contact changes. 67 @param contact: the contact whose presence changed 68 @type contact: L{Contact<papyon.profile.Contact>}""" 69 pass
70
71 - def on_contact_infos_changed(self, contact, infos):
72 """Called when the infos of a contact changes. 73 @param contact: the contact whose presence changed 74 @type contact: L{Contact<papyon.profile.Contact>}""" 75 pass
76
78 """Called when the client capabilities of a contact changes. 79 @param contact: the contact whose presence changed 80 @type contact: L{Contact<papyon.profile.Contact>}""" 81 pass
82
83 - def on_contact_msn_object_changed(self, contact):
84 """Called when the MSNObject of a contact changes. 85 @param contact: the contact whose presence changed 86 @type contact: L{Contact<papyon.profile.Contact>} 87 88 @see: L{MSNObjectStore<papyon.p2p.MSNObjectStore>}, 89 L{MSNObject<papyon.p2p.MSNObject>}""" 90 pass
91