comparison src/plugins/plugin_misc_imap.py @ 2145:33c8c4973743

core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 18:59:10 +0100
parents 633b5c21aefd
children
comparison
equal deleted inserted replaced
2144:1d3f73e065e1 2145:33c8c4973743
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import _ 20 from sat.core.i18n import _
21 from sat.core.constants import Const as C
21 from sat.core.log import getLogger 22 from sat.core.log import getLogger
22 log = getLogger(__name__) 23 log = getLogger(__name__)
23 from twisted.internet import protocol, defer 24 from twisted.internet import protocol, defer
24 from twisted.cred import portal, checkers, credentials 25 from twisted.cred import portal, checkers, credentials
25 from twisted.cred import error as cred_error 26 from twisted.cred import error as cred_error
31 from twisted.internet import reactor 32 from twisted.internet import reactor
32 33
33 from zope.interface import implements 34 from zope.interface import implements
34 35
35 PLUGIN_INFO = { 36 PLUGIN_INFO = {
36 "name": "IMAP server Plugin", 37 C.PI_NAME: "IMAP server Plugin",
37 "import_name": "IMAP", 38 C.PI_IMPORT_NAME: "IMAP",
38 "type": "Misc", 39 C.PI_TYPE: "Misc",
39 "protocols": [], 40 C.PI_PROTOCOLS: [],
40 "dependencies": ["Maildir"], 41 C.PI_DEPENDENCIES: ["Maildir"],
41 "main": "IMAP_server", 42 C.PI_MAIN: "IMAP_server",
42 "handler": "no", 43 C.PI_HANDLER: "no",
43 "description": _("""Create an Imap server that you can use to read your "normal" type messages""") 44 C.PI_DESCRIPTION: _("""Create an Imap server that you can use to read your "normal" type messages""")
44 } 45 }
45 46
46 47
47 class IMAP_server(object): 48 class IMAP_server(object):
48 #TODO: connect profile on mailbox request, once password is accepted 49 #TODO: connect profile on mailbox request, once password is accepted