<?xml version="1.0" encoding="utf-8"?>
<creole>
    <containers>
        <container name="dns">
            <file name='/etc/bind/safesearch.config' filelist="safesearch"/>
            <file name_type="SymLinkOption" name='safesearch_file' filelist="safesearch" rm="True" source="db.safesearch"/>
        </container>
    </containers>
    <variables>
        <family name='mode restreint' icon='adjust'>
            <variable name='google_moderate' type='oui/non' description='Forcer le "mode restreint" pour les recherches Google'/>
            <variable name='youtube_moderate' type='oui/non' description='Forcer le "mode restreint" pour les vidéos Youtube'/>
            <variable name='bing_moderate' type='oui/non' description='Forcer le "mode restreint" pour les recherches Bing'/>
            <variable name='duckduckgo_moderate' type='oui/non' description='Forcer le "mode restreint" pour les recherches Duckduckgo'/>
            <variable name='qwant_moderate' type='oui/non' description='Forcer le "mode restreint" pour les recherches Qwant'/>
            <variable name='dns_moderate' type='oui/non' description='Forcer le "mode restreint"'/>
            <variable name='eole_dns' type='oui/non' description='Le serveur DNS est un eole-dns'/>
            <variable name='safesearch_file' type='filename' description='Fichier de destination des domaines du mode restreint' multi="True"/>
        </family>
    </variables>
    <constraints>
        <auto name="calc_multi_condition" target="dns_moderate">
            <param>oui</param>
            <param name='operator'>OR</param>
            <param type="eole" name="condition_1">google_moderate</param>
            <param type="eole" name="condition_2">youtube_moderate</param>
            <param type="eole" name="condition_3">bing_moderate</param>
            <param type="eole" name="condition_4">duckduckgo_moderate</param>
            <param type="eole" name="condition_5">qwant_moderate</param>
        </auto>
        <condition name="disabled_if_not_in" source="activer_bind" fallback="True">
            <param>oui</param>
            <target type="filelist">safesearch</target>
            <target type="family">mode_restreint</target>
        </condition>
        <condition name="disabled_if_in" source="google_moderate">
            <param>non</param>
            <target type="filelist">safesearch</target>
        </condition>
        <auto name="calc_multi_condition" target="eole_dns">
            <param>variable_not_present</param>
            <param type="eole" name='condition_1' optional="True">activer_bind</param>
            <param name='condition_2'>variable_not_present</param>
            <param name='match'>non</param>
            <param name='mismatch'>oui</param>
        </auto>
        <auto name="calc_multi_condition" target="safesearch_file">
            <param>oui</param>
            <param type="eole" name='condition_1'>eole_dns</param>
            <param name='match'>/etc/eole/db.safesearch</param>
            <param name='mismatch'>/etc/bind/db.safesearch</param>
        </auto>
    </constraints>
    <help>
        <family name='mode restreint'>Configuration des restrictions de navigation</family>
    </help>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->

