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

<!--
Copyright Contributors to the libdnf project.

This file is part of libdnf: https://github.com/rpm-software-management/libdnf/

Libdnf 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.1 of the License, or
(at your option) any later version.

Libdnf 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 libdnf.  If not, see <https://www.gnu.org/licenses/>.
-->

<node>
<!-- org.rpm.dnf.v0.rpm.Repo:
   @short_description: Interface to RPM repositories
-->
<interface name="org.rpm.dnf.v0.rpm.Repo">
    <!--
        list:
        @options: an array of key/value pairs
        @repositories: array of returned repositories with requested attributes

        Get list of repositories that match to given filters.

        Following options are supported:

            - patterns: list of strings
                any repository with id matching to any of patterns is returned
            - repo_attrs: list of strings
                list of repository attributes that are returned
            - enable_disable: string (default "enabled")
                When set to "enabled" or "disabled", only enabled / disabled repositories are listed. Any other value means all repositories are returned.

        Unknown options are ignored.
    -->
    <method name="list">
        <arg name="options" type="a{sv}" direction="in"/>
        <arg name="repositories" type="aa{sv}" direction="out"/>
    </method>

    <!--
        confirm_key_with_options:
        @key_id: id of the key in question
        @confirmed: whether the key import is confirmed by user
        @options: an array of key/value pairs to modify the call behavior

        Confirm repository OpenPGP key import.

        Following @options are supported:
            - interactive: boolean, default true
                Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

        Unknown options are ignored.
    -->
    <method name="confirm_key_with_options">
        <arg name="key_id" type="s" direction="in"/>
        <arg name="confirmed" type="b" direction="in"/>
        <arg name="options" type="a{sv}" direction="in" />
    </method>

    <!--
        confirm_key:
        @key_id: id of the key in question
        @confirmed: whether the key import is confirmed by user

        Confirm repository OpenPGP key import.

        This is equivalent to call "confirm_key_with_options()" with empty options.
    -->
    <method name="confirm_key">
        <arg name="key_id" type="s" direction="in"/>
        <arg name="confirmed" type="b" direction="in"/>
    </method>

    <!--
        enable_with_options:
        @repo_ids: array of strings containing all repo ids to be enabled
        @options: an array of key/value pairs to modify the call behavior

        Enable repositories based on the list of given ids.

        Following @options are supported:
            - interactive: boolean, default true
                Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

        Unknown options are ignored.
    -->
    <method name="enable_with_options">
        <arg name="repo_ids" type="as" direction="in"/>
        <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        enable:
        @repo_ids: array of strings containing all repo ids to be enabled

        Enable repositories based on the list of given ids.

        This is equivalent to call "enable_with_options()" with empty options.
    -->
    <method name="enable">
        <arg name="repo_ids" type="as" direction="in"/>
    </method>

    <!--
        disable_with_options:
        @repo_ids: array of strings containing all repo ids to be disabled
        @options: an array of key/value pairs to modify the call behavior

        Disable repositories based on the list of given ids.

        Following @options are supported:
            - interactive: boolean, default true
                Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

        Unknown options are ignored.
    -->
    <method name="disable_with_options">
        <arg name="repo_ids" type="as" direction="in"/>
        <arg name="options" type="a{sv}" direction="in"/>
    </method>

    <!--
        disable:
        @repo_ids: array of strings containing all repo ids to be disabled

        Disable repositories based on the list of given ids.

        This is equivalent to call "disable_with_options()" with empty options.
    -->
    <method name="disable">
        <arg name="repo_ids" type="as" direction="in"/>
    </method>

</interface>

</node>
