# Path: stoqdrivers/printers/bematech/MP2100TH.py
# SI = '\x0f'
#     TXT_BOLD_ON = ESC + 'E'
#     TXT_BOLD_OFF = ESC + 'F'
#     FONT_REGULAR = ESC + 'H'
#     FONT_CONDENSED = ESC + SI
#     DOUBLE_HEIGHT_OFF = ESC + 'd0'
#     DOUBLE_HEIGHT_ON = ESC + 'd1'
#     PAPER_FULL_CUT = ESC + '\x6d'
#     CHARSET_MAP = {
#         'cp850': '\x32',
#         'utf8': '\x38',
#     }
# class MP2100TH(SerialBase, EscPosMixin):
#     def __init__(self, port, consts=None):
#     def print_qrcode(self, code):
#     def separator(self):
#     def open_drawer(self):
#     def is_drawer_open(self):
#     def set_charset(self, charset='cp850'):
#     def print_barcode(self, code):
#     def _setup_commandset(self, commset='\x30'):
#     def _print_configuration(self):
# 
# Path: stoqdrivers/interfaces.py
# class INonFiscalPrinter(IDevice):
#     """ Interface used to formatting texts in non fiscal printers.
#     """
# 
#     max_characters = Attribute("The maximum characters per line")
# 
#     def centralize():
#         """ Centralize the text to be sent to coupon. """
# 
#     def descentralize():
#         """ Descentralize the text to be sent to coupon. """
# 
#     def set_bold():
#         """ The sent text will be appear in bold. """
# 
#     def unset_bold():
#         """ Remove the bold option. """
# 
#     def print_line(data):
#         """ Performs a line break to the given text. """
# 
#     def print_inline(data):
#         """ Print a given text in a unique line. """
# 
#     def print_barcode(code):
#         """ Print a barcode representing the given code. """
# 
#     def print_qrcode(code):
#         """ Print a qrcode representing the given code. """
# 
#     def cut_paper():
#         """ Performs a paper cutting. """


from zope.interface import implementer
from stoqdrivers.printers.bematech.MP2100TH import MP2100TH, ESC
from stoqdrivers.interfaces import INonFiscalPrinter
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
## Author(s): Stoq Team <stoq-devel@async.com.br>
##




@implementer(INonFiscalPrinter)
class MP4200TH(MP2100TH):

    supported = True
    model_name = "Bematech MP4200 TH"
    max_characters = 64

    def cut_paper(self):

# Path: stoqdrivers/printers/bematech/MP2100TH.py
# SI = '\x0f'
#     TXT_BOLD_ON = ESC + 'E'
#     TXT_BOLD_OFF = ESC + 'F'
#     FONT_REGULAR = ESC + 'H'
#     FONT_CONDENSED = ESC + SI
#     DOUBLE_HEIGHT_OFF = ESC + 'd0'
#     DOUBLE_HEIGHT_ON = ESC + 'd1'
#     PAPER_FULL_CUT = ESC + '\x6d'
#     CHARSET_MAP = {
#         'cp850': '\x32',
#         'utf8': '\x38',
#     }
# class MP2100TH(SerialBase, EscPosMixin):
#     def __init__(self, port, consts=None):
#     def print_qrcode(self, code):
#     def separator(self):
#     def open_drawer(self):
#     def is_drawer_open(self):
#     def set_charset(self, charset='cp850'):
#     def print_barcode(self, code):
#     def _setup_commandset(self, commset='\x30'):
#     def _print_configuration(self):
# 
# Path: stoqdrivers/interfaces.py
# class INonFiscalPrinter(IDevice):
#     """ Interface used to formatting texts in non fiscal printers.
#     """
# 
#     max_characters = Attribute("The maximum characters per line")
# 
#     def centralize():
#         """ Centralize the text to be sent to coupon. """
# 
#     def descentralize():
#         """ Descentralize the text to be sent to coupon. """
# 
#     def set_bold():
#         """ The sent text will be appear in bold. """
# 
#     def unset_bold():
#         """ Remove the bold option. """
# 
#     def print_line(data):
#         """ Performs a line break to the given text. """
# 
#     def print_inline(data):
#         """ Print a given text in a unique line. """
# 
#     def print_barcode(code):
#         """ Print a barcode representing the given code. """
# 
#     def print_qrcode(code):
#         """ Print a qrcode representing the given code. """
# 
#     def cut_paper():
#         """ Performs a paper cutting. """


# Path: stoqdrivers/printers/bematech/MP4200TH.py
from zope.interface import implementer
from stoqdrivers.printers.bematech.MP2100TH import MP2100TH, ESC
from stoqdrivers.interfaces import INonFiscalPrinter

## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
## Author(s): Stoq Team <stoq-devel@async.com.br>
##




@implementer(INonFiscalPrinter)
class MP4200TH(MP2100TH):

    supported = True
    model_name = "Bematech MP4200 TH"
    max_characters = 64

    def cut_paper(self):

        self.write(ESC + '\x6d')