'''
Obsolete scanners for sagator.

(c) 2003-2006 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
    
'''

from avlib import *
import interscan.file

__all__=['file2stream','stream2file','f2s','s2f','stream2mbox']

class obsolete_interscanner(interscanner):
  name='an_obsolete_interscanner()'
  newname='not_defined()'
  def __init__(self,scanner):
      if 'updatecfg' in sys.argv[0]:
        return
      print "ERROR: %s scanner has been renamed to %s." \
            % (self.name,self.newname)
      print "Please update your configuration."
      sys.exit(1)

class file2stream(interscan.file.file2buffer):
  '''
  An alias for file2buffer() interscanner. [obsolete]
  
  Obsolete since 0.8.0.
  '''
  name='file2stream()'
  newname='file2buffer()'

class f2s(interscan.file.f2b):
  '''
  An alias for f2b() interscanner. [obsolete]
  
  Obsolete since 0.8.0.
  '''
  name='f2s()'
  newname='f2b()'

class stream2file(interscan.file.buffer2file):
  '''
  An alias for buffer2file() interscanner. [obsolete]
  
  Obsolete since 0.8.0.
  '''
  name='stream2file()'
  newname='buffer2file()'

class s2f(interscan.file.b2f):
  '''
  An alias for b2f() interscanner. [obsolete]
  
  Obsolete since 0.8.0.
  '''
  name='s2f()'
  newname='b2f()'

class stream2mbox(interscan.file.buffer2mbox):
  '''
  An alias for buffer2mbox() interscanner. [obsolete]
  
  Obsolete since 0.8.0.
  '''
  name='stream2mbox()'
  newname='buffer2mbox()'
