<?xml version="1.0" encoding="UTF-8"?>
<!--
  SPDX-License-Identifier: GPL-2.0-or-later
  SPDX-FileCopyrightText: 2025 GNOME Foundation, Inc.
-->
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.freedesktop.Malcontent.WebFilter">

    <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/>

    <annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn"
      value="org.freedesktop.Malcontent.WebFilter.ChangeOwn"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ReadOwn"
      value="org.freedesktop.Malcontent.WebFilter.ReadOwn"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny"
      value="org.freedesktop.Malcontent.WebFilter.ChangeAny"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ReadAny"
      value="org.freedesktop.Malcontent.WebFilter.ReadAny"/>

    <!--
      FilterType:

      The type of web filter applied to the user, as an enumerated type.

      Currently, the following values are supported, but more values may be
      added in future.
       - `0`: No filter enabled. The user’s web access is not filtered.
       - `1`: Blocklist. Websites are allowed by default unless they’re listed
         in one of the `BlockLists` or the `CustomBlockList`. The allow lists
         specified by `AllowLists` and `CustomAllowList` override the block
         lists.
       - `2`: Allowlist. Websites are blocked by default unless they’re listed
         in one of the `AllowLists` or the `CustomAllowList`. The block lists
         specified by `BlockLists` and `CustomBlockList` are ignored.
    -->
    <property name="FilterType" type="u" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/>
    </property>

    <!--
      BlockLists:

      A dictionary mapping IDs to URIs of block lists to use.

      The IDs are arbitrary non-empty ASCII strings, used to allow user
      interfaces to consistently present each block list in the same place
      in the UI, even if the URI for it changes over time. Examples of IDs could
      be `gambling`, `adult-content` and `custom`.

      This may be empty. If `FilterType` is `2` (allow list), the block lists
      specified here will be ignored.
    -->
    <property name="BlockLists" type="a{ss}" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="{}"/>
    </property>

    <!--
      CustomBlockList:

      A block list which is defined inline as a list of domain names.

      Domain names are matched exactly (no prefix matching, globbing or regular
      expressions).

      This may be empty. If non-empty, it’s treated as if it were another list
      in `BlockLists`.
    -->
    <property name="CustomBlockList" type="as" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
    </property>

    <!--
      AllowLists:

      A dictionary mapping IDs to URIs of allow lists to use.

      The semantics of IDs for this property are identical to those of
      `BlockLists`.

      This may be empty. The allow lists always take priority over `BlockLists`,
      and are effective even if `FilterType` is `2` (allow list).
    -->
    <property name="AllowLists" type="a{ss}" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="{}"/>
    </property>

    <!--
      CustomAllowList:

      A allow list which is defined inline as a list of domain names.

      Domain names are matched exactly (no prefix matching, globbing or regular
      expressions).

      This may be empty. If non-empty, it’s treated as if it were another list
      in `AllowLists`.
    -->
    <property name="CustomAllowList" type="as" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
    </property>

    <!--
      ForceSafeSearch:

      Whether to force well-known websites to use their ‘safe search’ options.

      For example, this forces search engines to use safe search, and YouTube to
      use its restricted mode.
    -->
    <property name="ForceSafeSearch" type="b" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="false"/>
    </property>
  </interface>
</node>
