Package common :: Module account
[hide private]
[frames] | no frames]

Source Code for Module common.account

 1  # -*- coding:utf-8 -*- 
 2  ## src/common/contacts.py 
 3  ## 
 4  ## Copyright (C) 2009 Stephan Erb <steve-e AT h3c.de> 
 5  ## 
 6  ## This file is part of Gajim. 
 7  ## 
 8  ## Gajim is free software; you can redistribute it and/or modify 
 9  ## it under the terms of the GNU General Public License as published 
10  ## by the Free Software Foundation; version 3 only. 
11  ## 
12  ## Gajim is distributed in the hope that it will be useful, 
13  ## but WITHOUT ANY WARRANTY; without even the implied warranty of 
14  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
15  ## GNU General Public License for more details. 
16  ## 
17  ## You should have received a copy of the GNU General Public License 
18  ## along with Gajim. If not, see <http://www.gnu.org/licenses/>. 
19  ## 
20   
21 -class Account(object):
22
23 - def __init__(self, name, contacts, gc_contacts):
24 self.name = name 25 self.contacts = contacts 26 self.gc_contacts = gc_contacts
27
28 - def change_contact_jid(self, old_jid, new_jid):
29 self.contacts.change_contact_jid(old_jid, new_jid)
30
31 - def __repr__(self):
32 return self.name
33
34 - def __hash__(self):
35 return hash(self.name)
36