<?xml version="1.0" encoding="utf-8"?>

<creole>

    <files>
        <file filelist='cups' name='/etc/bareos/bareosfichiers.d/cups.conf' source='bareos-cups.conf' mkdir='True'/>
    </files>

    <containers>
        <!-- FIXME 2.4 : a new container for cups ? -->
        <container name='fichier' id='12'>
            <package>eole-cups-pkg</package>
            <service servicelist='cups'>cups</service>
            <service servicelist='cups'>cups-browsed</service>
            <service_access service='cups'>
                <port>631</port>
            </service_access>
            <file filelist='cups' name='/etc/cups/cupsd.conf'/>
            <file filelist='cups' name='/etc/cups/cups-browsed.conf'/>
            <file filelist='cups' name='/etc/cups/cups-files.conf'/>
            <file filelist='cups' name='/etc/cups/cups-pdf.conf'/>
            <file filelist='cups' name='/etc/cups/client.conf' source='cups-client.conf'/>
            <file filelist='cups' name='/etc/pam.d/cups'/>
            <file filelist='cups' name='/etc/default/cups' source='cups.default'/>
            <file filelist='cups' name='/etc/apparmor.d/local/usr.sbin.cupsd' />
        </container>
    </containers>

    <variables>

        <family name='services'>
            <variable name='activer_cups' type='oui/non' description="Activer le serveur d'impression CUPS" >
                <value>oui</value>
            </variable>
        </family>

        <family name='cups' mode='expert' icon='print'>
            <variable name="cups_pdf" type="oui/non" description="Activation de l'imprimante virtuelle PDF">
                <value>oui</value>
            </variable>
            <variable name="cups_pdf_name" type="string" description="Nom de l'imprimante virtuelle PDF">
                <value>PDF</value>
            </variable>
            <variable name="cups_pdf_shared" type="string" description="L'imprimante virtuelle PDF est partagée">
                <value>true</value>
            </variable>
            <variable name='cups_loglevel' type='string' description='Niveau de log'>
                <value>warn</value>
            </variable>
            <variable name='cups_browsing' type='on/off' description='Activer la récupération des informations des imprimantes distantes'>
                <value>on</value>
            </variable>
            <variable name='cups_maxcopies' type='number' description="Nombre maximum de copies qu'un utilisateur peut effectuer pour un travail d'impression">
                <value>100</value>
            </variable>
            <variable name='cups_maxjobs' type='number' description='Nombre maximum de travaux simultanés'>
                <value>500</value>
            </variable>
            <variable name='cups_maxclients' type='number' description='Nombre maximum de clients simultanés'>
                <value>100</value>
            </variable>
            <variable name='cups_preservejobhistory' type='string' description="Conserver l'historique des demandes d'impression">
                <value>Yes</value>
            </variable>
            <variable name='cups_preservejobfiles' type='string' description='Conserver les fichiers après impression'>
                <value>No</value>
            </variable>
            <variable name='cups_autopurgejobs' type='string' description="Purger automatiquement l'historique des travaux">
                <value>No</value>
            </variable>
            <variable name='cups_printcap' type='oui/non' description="Générer le fichier printcap">
                <value>non</value>
            </variable>
            <variable name='cups_lp' type='oui/non' description="Charger le module d'impression d'imprimante sur port parallèle (incompatible avec les conteneurs)">
                <value>non</value>
            </variable>

        </family>

        <separators/>

    </variables>

    <constraints>
        <check name='valid_regexp' target='cups_pdf_name'>
            <param>^[A-Za-z0-9_-]*$</param>
            <param name='err_msg'>Seuls les caractères alphanumériques, _ et - sont autorisés</param>
        </check>
        <check name='valid_enum' target='cups_pdf_shared'>
            <param>['true','false']</param>
        </check>
        <check name='valid_enum' target='cups_loglevel'>
            <param>['alert','crit','debug2','debug','emerg','error','info','none','notice','warn']</param>
        </check>
        <check name='valid_enum' target='cups_preservejobhistory'>
            <param>['Yes','No']</param>
        </check>
        <check name='valid_enum' target='cups_preservejobfiles'>
            <param>['Yes','No']</param>
        </check>
        <check name='valid_enum' target='cups_autopurgejobs'>
            <param>['Yes','No']</param>
        </check>

        <condition name='disabled_if_in' source='cups_pdf'>
            <param>non</param>
            <target type='variable'>cups_pdf_name</target>
            <target type='variable'>cups_pdf_shared</target>
        </condition>

        <condition name='disabled_if_in' source='activer_cups'>
            <param>non</param>
            <target type='filelist'>cups</target>
            <target type='servicelist'>cups</target>
            <target type='family'>cups</target>
        </condition>

    </constraints>

    <help>
        <variable name='activer_cups'>Le Common Unix Printing System (CUPS) est un système modulaire d'impression informatique pour les systèmes d'exploitation Unix et assimilés</variable>
        <family name='cups'>Paramétrage avancé du serveur d'impression CUPS</family>
    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
