1
# -*- coding: utf-8 -*-
3
# This file is part of emesene.
5
# Emesene is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# emesene is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with emesene; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
'''a module that define a class to contain all the information regarding a
22
class Session(Object.Object):
23
'''a class that contain information and methods to handle a session'''
25
def __init__(self, account, password, host, port):
26
'''class constructor'''
27
self.account = account
28
self.password = password
36
self.signal_add('login-successful', 0)
38
self.signal_add('login-error', 1)
40
self.signal_add('connection-error', 1)
42
def login(self, account, password, stat):
43
'''do login and set status'''
44
raise NotImplementedError("This method isn't not implemented")
46
def cancel_login(self):
47
'''cancel the login process if posible on the protocol implementation
49
raise NotImplementedError("This method isn't not implemented")
53
raise NotImplementedError("This method isn't not implemented")