1
# -*- coding: utf-8 -*-
2
'''a module to handle abstract status for different IM clients'''
4
# This file is part of emesene.
6
# Emesene 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.
11
# emesene 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.
16
# You should have received a copy of the GNU General Public License
17
# along with emesene; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
ORDERED = [ONLINE, BUSY, AWAY, BE_RIGHT_BACK, IDLE, LUNCH, TELEPHONE,
36
STATUS = {OFFLINE : _('Offline'),
41
INVISIBLE : _('Invisible'),
43
TELEPHONE : _('On the phone'),
44
BE_RIGHT_BACK : _('Be right back')}
46
REVERSE = dict([(y, x) for x, y in STATUS.items()])
49
'''return True if status is a valid status value'''
51
return status in STATUS