## org.freedesktop.PackageKit

org.freedesktop.PackageKit — PackageKit interface

## Methods

    CanAuthorize(in's'action_id,
    out'u'result)
    CreateTransaction(out'o'object_path)
    GetTimeSinceAction(in'u'role,
    out'u'seconds)
    GetTransactionList(out'ao'transactions)
    StateHasChanged(in's'reason)
    SuggestDaemonQuit()
    GetPackageHistory(in'as'names,
    in'u'count,
    out'a{saa{sv}}'history)
    GetDaemonState(out's'state)
    SetProxy(in's'proxy_http,
    in's'proxy_https,
    in's'proxy_ftp,
    in's'proxy_socks,
    in's'no_proxy,
    in's'pac)
    ClearResults()
    Trigger(in's'action)
    Cancel()
    GetPrepared(out'as'package_ids)

## Signals

    TransactionListChanged('as'transactions)
    RestartSchedule()
    RepoListChanged()
    UpdatesChanged()

## Implemented Interfaces

org.freedesktop.PackageKit implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

## Properties

    'VersionMajor'read'u'
    'VersionMinor'read'u'
    'VersionMicro'read'u'
    'BackendName'read's'
    'BackendDescription'read's'
    'BackendAuthor'read's'
    'Roles'read't'
    'Groups'read't'
    'Filters'read't'
    'MimeTypes'read'as'
    'Locked'read'b'
    'NetworkState'read'u'
    'DistroId'read's'
    'UpdatePrepared'read'b'
    'TriggerAction'read's'

## Description

The root interface is used for interacting with the daemon.

The interface used for interacting with offline actions.

## Details

### CanAuthorize ()

    CanAuthorize (in's'action_id,
    out'u'result)

Allows a client to find out if it would be allowed to authorize an action.

`action_id`: | The action ID, e.g. org.freedesktop.packagekit.system-network-proxy-configure
`result`: | The result, either yes, no or interactive.

### CreateTransaction ()

    CreateTransaction (out'o'object_path)

Creates a new transaction that can have operations done on it. Note: The dameon will automatically destroy this transaction if it is not used after a few minutes.

`object_path`: | The object_path, e.g. /45_dafeca

### GetTimeSinceAction ()

    GetTimeSinceAction (in'u'role,
    out'u'seconds)

This method allows us to query how long since an action has successfully completed.

`role`: | The role enum, e.g. update-system
`seconds`: | The amount of time in seconds

### GetTransactionList ()

    GetTransactionList (out'ao'transactions)

Gets the transaction list of any transactions that are in progress

`transactions`: | A list of transaction ID's

### StateHasChanged ()

    StateHasChanged (in's'reason)

This method suggests to PackageKit that the package backend state may have changed. This allows plugins to the native package manager to suggest that PackageKit drops it's caches.

`reason`: | The reason of the state change. Valid reasons are resume or posttrans. Resume is given a lower priority than posttrans.

### SuggestDaemonQuit ()

    SuggestDaemonQuit ()

Suggests to the daemon that it should quit as soon as possible, for instance if a native package management tool is waiting to be used.

### GetPackageHistory ()

    GetPackageHistory (in'as'names,
    in'u'count,
    out'a{saa{sv}}'history)

Gets the history for a given package name. This uses the internal PackageKit history database and will not return transactions done outside of PackageKit using a distribution native tool.

`names`: | The package names to return history for, e.g. [ colord ].
`count`: | The maximum number of past transactions to return, or 0 for no limit.
`history`: | The list of actions performed on this package. The array may contain the following keys of types: info[uint], user-id[uint], version[string], source[string], timestamp[uint64]. Other keys and values may be added in the future.

### GetDaemonState ()

    GetDaemonState (out's'state)

Gets the debugging state from the daemon. No secure state will be shown, and all information is for reference only.

`state`: | The state of the dameon at this specific moment.

### SetProxy ()

    SetProxy (in's'proxy_http,
    in's'proxy_https,
    in's'proxy_ftp,
    in's'proxy_socks,
    in's'no_proxy,
    in's'pac)

Sets the proxy used by the dameon.

`proxy_http`: | The HTTP proxy, e.g. username:password@server:port.
`proxy_https`: | The HTTPS proxy, e.g. username:password@server:port.
`proxy_ftp`: | The FTP proxy, e.g. username:password@server:port.
`proxy_socks`: | The SOCKS proxy, e.g. username:password@server:port.
`no_proxy`: | The comma seporated list of sites to not use the proxy for, e.g. 127.0.0.1,localmirror.org.
`pac`: | The PAC file for the proxy, e.g. /etc/network/school.pac. Note: Most backends will not be able to use a PAC file.

Callers need the org.freedesktop.packagekit.set-proxy

### ClearResults ()

    ClearResults ()

Clears the offline update results store.

### Trigger ()

    Trigger (in's'action)

Triggers the offline update for next boot.

`action`: | The action to take when finished applying updates, known values are power-off and reboot.

### Cancel ()

    Cancel ()

Cancels the offline update so the next boot procceeds as normal.

### GetPrepared ()

    GetPrepared (out'as'package_ids)

Returns the list of prepared updates.

`package_ids`: | An array of package IDs.

## Signal Details

### The TransactionListChanged signal

    TransactionListChanged ('as'transactions)

The transaction list has changed, because either a transaction has finished or a new transaction created.

`transactions`: | A list of transaction ID's.

### The RestartSchedule signal

    RestartSchedule ()

A system restart has been sceduled

### The RepoListChanged signal

    RepoListChanged ()

This signal is emitted when the repository list has changed

### The UpdatesChanged signal

    UpdatesChanged ()

This signal is emitted when the number of updates has changed

## Property Details

### The "VersionMajor" property

    'VersionMajor'read'u'

The major version number.

### The "VersionMinor" property

    'VersionMinor'read'u'

The minor version number.

### The "VersionMicro" property

    'VersionMicro'read'u'

The micro version number.

### The "BackendName" property

    'BackendName'read's'

The backend name, e.g. "dnf".

### The "BackendDescription" property

    'BackendDescription'read's'

The backend description, e.g. "Yellow Dog Update Modifier".

### The "BackendAuthor" property

    'BackendAuthor'read's'

The backend author, e.g. "Joe Bloggs <joe&blogs.com>".

### The "Roles" property

    'Roles'read't'

The roles the backend supports, e.g. search-name|refresh-cache.

### The "Groups" property

    'Groups'read't'

The groups the backend supports, e.g. accessories|games.

### The "Filters" property

    'Filters'read't'

The filters the backend supports, e.g. installed|newest.

### The "MimeTypes" property

    'MimeTypes'read'as'

The mime-types the backend supports, e.g. ['application/x-rpm;', 'application/x-deb'].

### The "Locked" property

    'Locked'read'b'

Set when the backend is locked and native tools would fail.

### The "NetworkState" property

    'NetworkState'read'u'

Gets the network state from the daemon. This is provided as some clients may not want to use NetworkManager if the system daemon is configured to use something else.

If the system is managed using NetworkManager then the following states are supported: unknown, offline, online, wifi, mobile or wired. If the system is configured for legacy UNIX network fallback, or NetworkManager is not running then the folowing states are supported: unknown, offline or online.

### The "DistroId" property

    'DistroId'read's'

The distribution identification, in the distro;version;arch form e.g. "debian;squeeze/sid;x86_64".

### The "UpdatePrepared" property

    'UpdatePrepared'read'b'

If an update has been prepared and is ready to be triggered.

### The "TriggerAction" property

    'TriggerAction'read's'

The action to take when finished applying updates, known values are power-off, reboot or unset if no offline update is scheduled.