Package x2go :: Package backends :: Package printing :: Module gconf

[frames] | no frames]

# Source Code for Module x2go.backends.printing.gconf

     1  # -*- coding: utf-8 -*-
     2
     3  # Copyright (C) 2010-2016 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
     4  #
     5  # Python X2Go is free software; you can redistribute it and/or modify
     6  # it under the terms of the GNU Affero General Public License as published by
     7  # the Free Software Foundation; either version 3 of the License, or
     8  # (at your option) any later version.
     9  #
    10  # Python X2Go is distributed in the hope that it will be useful,
    11  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  # GNU Affero General Public License for more details.
    14  #
    15  # You should have received a copy of the GNU Affero General Public License
    16  # along with this program; if not, write to the
    17  # Free Software Foundation, Inc.,
    18  # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
    19
    20  """\
    21  L{X2GoClientPrinting} class is one of Python X2Go's public API classes.
    22
    23  Retrieve an instance of this class from your L{X2GoClient} instance.
    24  Use this class in your Python X2Go based applications to access the »printing«
    25  configuration of your X2Go client application.
    26
    27  """
    28  __NAME__ = 'x2goprint-pylib'
    29
    30  # modules
    31  import copy
    32
    33  # Python X2Go modules
    34  import x2go.log as log
    35
    36  # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables)
    37  from x2go.defaults import X2GO_CLIENTPRINTING_DEFAULTS as _X2GO_CLIENTPRINTING_DEFAULTS
    38
    39  from x2go.x2go_exceptions import X2GoNotImplementedYetException
    40
    41 -class X2GoClientPrinting(object):
    42      """\
    43      L{x2go.backends.printing.gconf.X2GoClientPrinting} provides access to the GCONF based configuration
    44      of the X2Go client printing setup.
    45
    46      An instance of L{x2go.backends.printing.gconf.X2GoClientPrinting} is created on each incoming
    47      print job. This facilitates that on every print job the print action for this job is derived
    48      from the »printing« configuration file.
    49
    50      Thus, changes on the file are active for the next incoming print job.
    51
    52      """
    53      _print_action = None
    54      defaultValues = copy.deepcopy(_X2GO_CLIENTPRINTING_DEFAULTS)
    55
    56 -    def __init__(self, defaults=None, logger=None, loglevel=log.loglevel_DEFAULT):
    57          """\
    58          @param defaults: a cascaded Python dicitionary structure with ini file defaults (to override
    59              Python X2Go's hard coded defaults in L{defaults}
    60          @type defaults: C{dict}
    61          @param logger: you can pass an L{X2GoLogger} object to the
    62              L{X2GoPrintAction} constructor
    63          @type logger: C{obj}
    64          @param loglevel: if no L{X2GoLogger} object has been supplied a new one will be
    65              constructed with the given loglevel
    66          @type loglevel: C{int}
    67
    68          """
    69          raise X2GoNotImplementedYetException('GCONF backend support is not implemented yet')
    70