<?xml version="1.0" encoding="UTF-8"?>
<!--
  SPDX-License-Identifier: LGPL-2.1-or-later
  SPDX-FileCopyrightText: 2019 Endless Mobile, Inc.
  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="com.endlessm.ParentalControls.SessionLimits">

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

    <annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn"
      value="com.endlessm.ParentalControls.SessionLimits.ChangeOwn"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ReadOwn"
      value="com.endlessm.ParentalControls.SessionLimits.ReadOwn"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny"
      value="com.endlessm.ParentalControls.SessionLimits.ChangeAny"/>
    <annotation name="org.freedesktop.Accounts.Authentication.ReadAny"
      value="com.endlessm.ParentalControls.SessionLimits.ReadAny"/>

    <!--
      LimitType:

      The type of session limit applied to the user, as an enumerated flag type.
      Currently, the following values are supported, but more values may be
      added in future.
       - `0`: No filter enabled. The user is not limited in the times or
         durations of their sessions.
       - `1 << 0`: Daily schedule. The user is limited to using the computer
         between a fixed start and end time each day, as set in the
         `DailySchedule` property.
       - `1 << 1`: Daily limit. The user is limited to using the computer for a
         maximum number of seconds each day, as set in the `DailyLimit`
         property.
    -->
    <property name="LimitType" type="u" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/>
    </property>

    <!--
      DailySchedule:

      A daily schedule to limit the user’s computer use. This is a two-tuple of
      a start time and an end time, both given as the number of seconds since
      midnight. The end time must be greater than the start time, and must be
      ≤ 86400 (the number of seconds in a day). There is no handling of leap
      seconds.

      This property will be used if `LimitType` contains `1 << 0`, but it must
      be set to a valid value regardless.
    -->
    <property name="DailySchedule" type="(uu)" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="(0, 86400)"/>
    </property>

    <!--
      DailyLimit:

      A daily time limit to limit the user’s computer use. This is the total
      number of seconds the user is allowed to have an active session each day.

      This property will be used if `LimitType` contains `1 << 1`, but it must
      be set to a valid value regardless.
    -->
    <property name="DailyLimit" type="u" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/>
    </property>

    <!--
      ActiveExtension:

      Details of a time limit extension which currently applies to the user’s
      computer use, if applicable. This is a two-tuple of a time at which the
      extension was granted (as the number of seconds since the Unix epoch), and
      a duration (in seconds) for which session time limits will not apply to
      the user. The end time is the sum of the two numbers, and once this time
      has passed the property is essentially unset.

      The default unset value is `(0, 0)`.

      This property will be used if `LimitType` is non-zero, but it must be set
      to a valid value regardless.
    -->
    <property name="ActiveExtension" type="(tu)" access="readwrite">
      <annotation name="org.freedesktop.Accounts.DefaultValue" value="(0, 0)"/>
    </property>
  </interface>
</node>
