Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 # -*- coding: ISO-8859-15 -*-
00002 # Copyright (c) 2005-2007
00003 # Authors: KSS Project Contributors (see docs/CREDITS.txt)
00004 #
00005 # This program is free software; you can redistribute it and/or modify
00006 # it under the terms of the GNU General Public License version 2 as published
00007 # by the Free Software Foundation.
00008 #
00009 # This program is distributed in the hope that it will be useful,
00010 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 # GNU General Public License for more details.
00013 #
00014 # You should have received a copy of the GNU General Public License
00015 # along with this program; if not, write to the Free Software
00016 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00017 # 02111-1307, USA.
00018 
00019 import config
00020 from zope.interface import Interface
00021 
00022 if config.HAS_JSON:
00023     IJSONRPCRequest = config.IJSONRPCRequest
00024     IJSONStreamWriteable = config.IJSONStreamWriteable
00025     IJSONWriter = config.IJSONWriter
00026 else:
00027     # If jsonserver is not present, we just define interfaces
00028     # that noone implements so the adapters will never be looked up.
00029     # This is because the zcml will try to import these.
00030     # XXX occasionally this should be done from the zcml, 
00031     # via features/conditionals!
00032     
00033     class IJSONRPCRequest(Interface):
00034         'Interface never to be implemented'
00035 
00036     class IJSONStreamWriteable(Interface):
00037         'Interface never to be implemented'
00038         
00039     class IJSONWriter(Interface):
00040         'Interface never to be implemented'