root / lib / pyzinn / erp / Itransport.py @ a899390a2a8aca3b3b4617dd7cd96a19e64b489c

View | Annotate | Download (1.1 KB)

1
# Copyright (c) 2009 Lost Oasis, IELO <info@ielo.net>
2
#
3
# This file is part of ZINN.
4
# 
5
# SINN is free software: you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free
7
# Software Foundation, either version 3 of the License, or (at your
8
# option) any later version.
9
# 
10
# SINN is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
# for more details.
14
# 
15
# You should have received a copy of the GNU General Public License
16
# along with ZINN.  If not, see <http://www.gnu.org/licenses/>.
17
18
"""
19
    Common interface that erp transport plugins must implement
20
"""
21
class Itransport(object):
22
    def __init__(self, dsn):
23
        self.dsn = dsn
24
25
    def getProxy(self):
26
        raise NotImplementedError
27
28
    def getContext(self):
29
        raise NotImplementedError
30
31
    def getSession(self):
32
        raise NotImplementedError
33
34
    def getUserId(self):
35
        return self.user_id
36
        raise NotImplementedError