<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">

<!--
 Copyright (C) 2015 Peter Hatina <phatina@redhat.com>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General
 Public License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 Boston, MA 02111-1307, USA.
-->

  <!-- ********************************************************************** -->

  <!--
      org.freedesktop.UDisks2.Manager.BTRFS:
      @short_description: BTRFS add-on to the manager singleton
      @since: 2.1.3

      Additional interface with BTRFS specifics for top-level manager
      singleton object located at the object path
      <literal>/org/freedesktop/UDisks2/Manager</literal>.
  -->
  <interface name="org.freedesktop.UDisks2.Manager.BTRFS">
    <!-- prereq: org.freedesktop.UDisks2.Manager -->

    <!--
        CreateVolume:
        @devices: An array of object paths to objects implementing the #org.freedesktop.UDisks2.Block interface.
        @label: The label for the new volume.
        @data_level: The RAID level for the new volume.
        @md_level: The RAID level for metadata.
        @options: Additional options.
        @since: 2.3.0

        Creates a new volume from @devices.

        No additional options are currently defined.

        <emphasis>Changed in version 2.7.0.</emphasis>
    -->
    <method name="CreateVolume">
      <arg name="devices" type="ao" direction="in"/>
      <arg name="label" type="s" direction="in"/>
      <arg name="data_level" type="s" direction="in"/>
      <arg name="md_level" type="s" direction="in"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

  </interface>

  <!-- ********************************************************************** -->

  <!--
      org.freedesktop.UDisks2.Filesystem.BTRFS:
      @short_description: BTRFS filesystem interface exported on block objects
      @since: 2.1.3

      This interface is used for #org.freedesktop.UDisks2.Block devices that
      has been filtered through BTRFS plugin.
  -->
  <interface name="org.freedesktop.UDisks2.Filesystem.BTRFS">
    <!-- prereq: org.freedesktop.UDisks2.Filesystem -->

    <!--
        AddDevice:
        @device: Object path of a device to be added to BTRFS volume.
        @options: Additional options.
        @since: 2.3.0

        Adds the @device to the volume.

        No additional options are currently defined.

        <emphasis>Changed in version 2.7.0.</emphasis>
    -->
    <method name="AddDevice">
      <arg name="device" type="o" direction="in"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        RemoveDevice:
        @device: Object path of a device to be removed from BTRFS volume.
        @options: Additional options.
        @since: 2.3.0

        Removes the @device from the volume.

        No additional options are currently defined.

        <emphasis>Changed in version 2.7.0.</emphasis>
    -->
    <method name="RemoveDevice">
      <arg name="device" type="o" direction="in"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        CreateSubvolume:
        @name: Name of a new subvolume.
        @options: Additional options.
        @since: 2.1.3

        Creates a new subvolume.

        No additional options are currently defined.
    -->
    <method name="CreateSubvolume">
      <arg name="name" direction="in" type="s"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        RemoveSubvolume:
        @name: Name of the subvolume to be deleted.
        @options: Additional options.
        @since: 2.1.3

        Deletes a subvolume.

        No additional options are currently defined.
    -->
    <method name="RemoveSubvolume">
      <arg name="name" direction="in" type="s"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        GetSubvolumes:
        @snapshots_only: True if to list only snapshot subvolumes; False otherwise.
        @subvolumes: Structure containing subvolume id, parent_id and path.
        @subvolumes_cnt: The number of returned elements.
        @options: Additional options.
        @since: 2.1.3

        Returns a list of subvolumes.

        No additional options are currently defined.
    -->
    <method name="GetSubvolumes">
      <arg name="snapshots_only" direction="in" type="b"/>
      <arg name="subvolumes" direction="out" type="a(tts)"/>
      <arg name="subvolumes_cnt" direction="out" type="i"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        CreateSnapshot:
        @source: Name of the source subvolume.
        @dest: Name for the new snapshot volume.
        @ro: True if the snapshot should be read-only; False otherwise.
        @options: Additional options.
        @since: 2.1.3

        Creates a snapshot.

        No additional options are currently defined.
    -->
    <method name="CreateSnapshot">
      <arg name="source" direction="in" type="s"/>
      <arg name="dest" direction="in" type="s"/>
      <arg name="ro" direction="in" type="b"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        Repair:
        @options: Additional options.
        @since: 2.3.0

        Checks and repairs btrfs volume.

        No additional options are currently defined.
    -->
    <method name="Repair">
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        Resize:
        @size: Requested new size in Bytes.
        @options: Additional options.
        @since: 2.3.0

        Resizes the volume.

        No additional options are currently defined.
    -->
    <method name="Resize">
      <arg name="size" type="t" direction="in"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        SetLabel:
        @label: New label.
        @options: Additional options.
        @since: 2.1.3

        Sets a new label for the given volume.

        No additional options are currently defined.
    -->
    <method name="SetLabel">
      <arg name="label" direction="in" type="s"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        GetDefaultSubvolumeID:
        @options: Additional options.
        @since: 2.11.0

        Returns the default subvolume id.

        No additional options are currently defined.
    -->
    <method name="GetDefaultSubvolumeID">
      <arg name="id" direction="out" type="u"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        SetDefaultSubvolumeID:
        @id: New default subvolume id.
        @options: Additional options.
        @since: 2.11.0

        Sets the default subvolume id.

        No additional options are currently defined.
    -->
    <method name="SetDefaultSubvolumeID">
      <arg name="id" direction="in" type="u"/>
      <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <property name="label" type="s" access="read"/>
    <property name="uuid" type="s" access="read"/>
    <property name="num_devices" type="t" access="read"/>
    <property name="used" type="t" access="read"/>
  </interface>
</node>
