summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-26 18:01:38 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-26 18:01:38 +0000
commit390e952829dfbf9bed2cf4647e07ab9249d59cf2 (patch)
tree4c8c14d909286791a213e66f929bc619fab98f69 /src/contact.py
parentc486b78bbd072b5d924a62f0b2c4a40f644dfce5 (diff)
downloadpoezio-390e952829dfbf9bed2cf4647e07ab9249d59cf2.tar.gz
poezio-390e952829dfbf9bed2cf4647e07ab9249d59cf2.tar.bz2
poezio-390e952829dfbf9bed2cf4647e07ab9249d59cf2.tar.xz
poezio-390e952829dfbf9bed2cf4647e07ab9249d59cf2.zip
Basic implementation of the roster and one to one conversations
Diffstat (limited to 'src/contact.py')
-rw-r--r--src/contact.py30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/contact.py b/src/contact.py
index c3b07fc2..510e208a 100644
--- a/src/contact.py
+++ b/src/contact.py
@@ -22,8 +22,32 @@ class Contact(object):
"""
def __init__(self, jid):
self._jid = JID(jid) # a SleekXMPP jid object
- self._display_name = None
- self.groups = [] # a list of groups the contact is in
+ self._display_name = ''
+ self._subscription = 'none'
+ self._ask = None
+ self._status = ''
+ self._presence = 'unavailable'
+ self._priority = 0
+ self._groups = [] # a list of groups the contact is in
- def getJid(self):
+ def set_ask(self, ask):
+ self._ask = ask
+
+ def set_subscription(self, sub):
+ self._subscription = sub
+
+ def get_jid(self):
return self._jid
+
+ def __repr__(self):
+ return '%s' % self._jid
+
+ def set_priority(self, priority):
+ assert isinstance(priority, int)
+ self._priority = priority
+
+ def set_presence(self, pres):
+ self._presence = pres
+
+ def get_presence(self):
+ return self._presence