<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
  <interface name="org.freedesktop.PackageKit">

    <!-- ASYNCHRONOUS -->

    <!-- Schedule new jobs -->
    <method name="GetUpdates">
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="RefreshCache">
      <arg type="b" name="force" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="UpdateSystem">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="FindPackages">
      <arg type="s" name="search" direction="in"/>
      <arg type="u" name="depth" direction="in"/> <!-- 0=name, 1=summary, 2=description -->
      <arg type="b" name="installed" direction="in"/>
      <arg type="b" name="available" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="GetDeps">
      <arg type="s" name="package" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="GetDescription"> <!-- orders Description signals for the package -->
      <arg type="s" name="package" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="RemovePackage">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="package" direction="in"/>
      <arg type="b" name="allow_deps" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>
    <method name="InstallPackage">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="package" direction="in"/>
      <arg type="u" name="job" direction="out"/>
    </method>

    <!-- state has changed, we want to broadcast this to all jobs -->
    <signal name="JobStatusChanged">
      <arg type="u" name="job" direction="out"/>
      <arg type="s" name="status" direction="out"/> <!-- invalid,setup,download,install,update,exit -->
      <arg type="s" name="package" direction="out"/>
    </signal>
    <signal name="PercentageChanged">
      <arg type="u" name="job" direction="out"/>
      <arg type="u" name="percentage" direction="out"/>
    </signal>
    <signal name="NoPercentageUpdates"> <!-- if we are not emmitting PercentageChanged, the UI has to spin -->
      <arg type="u" name="job" direction="out"/>
    </signal>
    <signal name="Package">
      <arg type="u" name="job" direction="out"/>
      <arg type="u" name="value" direction="out"/> <!-- installed=1, not-installed=0 | security=1, normal=0 -->
      <arg type="s" name="package" direction="out"/>
      <arg type="s" name="summary" direction="out"/>
    </signal>
    <signal name="Description">
      <arg type="u" name="job" direction="out"/>
      <arg type="s" name="package" direction="out"/>
      <arg type="s" name="version" direction="out"/>
      <arg type="s" name="detail" direction="out"/>
      <arg type="s" name="url" direction="out"/>
    </signal>
    <signal name="Finished">
      <arg type="u" name="job" direction="out"/>
      <arg type="s" name="status" direction="out"/> <!-- success,failed,canceled -->
    </signal>
    <signal name="ErrorCode">
      <arg type="u" name="job" direction="out"/>
      <arg type="s" name="code" direction="out"/> <!-- no-network -->
      <arg type="s" name="details" direction="out"/> <!-- non-localized detail -->
    </signal>


    <!-- SYNCHRONOUS -->

    <!-- Job management -->
    <method name="GetJobList">
      <arg type="au" name="jobs" direction="out"/>
    </method>
    <signal name="JobListChanged">
      <arg type="au" name="jobs" direction="out"/>
    </signal>
    <method name="GetJobStatus"> <!-- throws NoSuchJob -->
      <arg type="u" name="job" direction="in"/>
      <arg type="s" name="status" direction="out"/> <!-- query,download,install,exit -->
      <arg type="s" name="package" direction="out"/>
    </method>
    <method name="CancelJobTry"> <!-- throws NoSuchJob -->
      <arg type="u" name="job" direction="in"/>
    </method>

  </interface>
</node>

