2009-11-10 21:08:25 +01:00
|
|
|
# -*- coding:utf-8 -*-
|
|
|
|
## src/common/contacts.py
|
|
|
|
##
|
|
|
|
## Copyright (C) 2009 Stephan Erb <steve-e AT h3c.de>
|
|
|
|
##
|
|
|
|
## This file is part of Gajim.
|
|
|
|
##
|
|
|
|
## Gajim is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published
|
|
|
|
## by the Free Software Foundation; version 3 only.
|
|
|
|
##
|
|
|
|
## Gajim is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU General Public License
|
|
|
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
##
|
|
|
|
|
|
|
|
class Account(object):
|
2009-11-26 11:21:43 +01:00
|
|
|
|
2009-11-10 22:56:10 +01:00
|
|
|
def __init__(self, name, contacts, gc_contacts):
|
|
|
|
self.name = name
|
|
|
|
self.contacts = contacts
|
2009-11-10 21:08:25 +01:00
|
|
|
self.gc_contacts = gc_contacts
|
2009-11-26 11:21:43 +01:00
|
|
|
|
2010-01-29 19:47:52 +01:00
|
|
|
def change_contact_jid(self, old_jid, new_jid):
|
|
|
|
self.contacts.change_contact_jid(old_jid, new_jid)
|
|
|
|
|
2009-11-11 21:38:39 +01:00
|
|
|
def __repr__(self):
|
|
|
|
return self.name
|
2009-11-26 11:21:43 +01:00
|
|
|
|
2009-11-11 21:38:39 +01:00
|
|
|
def __hash__(self):
|
2009-11-26 11:21:43 +01:00
|
|
|
return hash(self.name)
|