Public Types | Public Slots | Signals | Public Member Functions | Public Attributes

PackageManager Class Reference

Package Manager Qt bindings library public API header. More...

#include <packagemanager.h>

List of all members.

Public Types

enum  ErrorCode {
  ErrorNone = 0, ErrorDbus, ErrorInternal, ErrorInvalidArgument,
  ErrorCheckUpdatesFailed, ErrorFileNotFound, ErrorInvalidFile, ErrorPackageNotUser,
  ErrorNoCandidate, ErrorPackageNotFound, ErrorPackageVersionNotFound, ErrorPackageNotInstalled,
  ErrorPackageNotCompatible, ErrorDependenciesPreventUninstall, ErrorMissingDependencies, ErrorDownloadFailed,
  ErrorOperationFailed, ErrorUpgradeFailed, ErrorPackageAlreadyInstalled, ErrorPackageAlreadyNewest,
  ErrorNewerVersionInstalled, ErrorRequiresOlderVersionOfDependency, ErrorInvalidOperation, ErrorNoOperation,
  ErrorNotCancelable, ErrorOperationCanceled, ErrorUnknown
}
 

This enum contains all possible error codes used by Package Manager.

More...

Public Slots

PackageManagerPendingFetchWatcherfetchCurrentOperationData ()
 Fetch current operation (install, upgrade...) data.
PackageManagerPendingFetchWatcherfetchPackages (const QString &category="")
 Queries for available packages that have not yet been installed.
PackageManagerPendingFetchWatcherfetchAvailableUpdates (const QString &category="")
 Queries for updates available to installed packages.
PackageManagerPendingFetchWatcherfetchInstalled ()
 Queries for installed packages.
PackageManagerPendingFetchWatcherfetchPackageDataFile (const QString &filename)
 Queries for meta-data of a local package file.
PackageManagerPendingFetchWatcherfetchPackageDataRemote (const QString &packagename, const QString &version=QString())
 Queries for a meta-data of a package from one of configured repositories.
PackageManagerPendingFetchWatcherfetchPackageDataInstalled (const QString &packagename)
 Queries for meta-data of an installed package.
PackageManagerPendingFetchWatcherfetchFilesOfInstalledPackage (const QString &packagename)
 Queries for a list of files included in an installed package.
PackageManagerPendingFetchWatcherfetchPackageDependencyData (const QString &packagename)
 Queries for all dependencies of a package.
PackageManagerPendingFetchWatcherfetchRestoreStatus ()
 Queries for status of a restored content.
PackageManagerPendingFetchWatcherfetchRestorablePackages ()
 Queries for a package list of a restored content.
PackageManagerPendingFetchWatchersimulateOperation (const QString &operation, const QString &packageidentifier, const QString &version, const QString &flags)
 Simulate method.
PackageManagerPendingCallWatcherignoreUpdatePackage (const QString &packagename, const QString &version)
 Adds a package in the ignored update package list.
PackageManagerPendingCallWatcherrefreshPackageCache (const QString &onlyDomain, const QString &flags)
 Refreshes only a cache specified in onlyDomain.
PackageManagerPendingCallWatcherinstallFile (const QString &filename)
 Installs a local package file.
PackageManagerPendingCallWatcherinstall (const QString &packagename, const QString &version=QString())
 Installs a package from a configured repository.
PackageManagerPendingCallWatcherupgrade (const QString &packagename, const QString &version=QString())
 Upgrades a package from a configured repository.
PackageManagerPendingCallWatcherrestore (const QString &packagename, const QString &version)
 Restores a package from a configured repository.
PackageManagerPendingCallWatcherignoreRestorePackage (const QString &packagename)
 Removes a package from the restorable packages list.
PackageManagerPendingCallWatcherdownloadSystemUpgrade (const QString &packagename, const QString &version=QString())
 Downloads a system package from a configured repository.
PackageManagerPendingCallWatcherupgradeSystem (const QString &packagename, const QString &version=QString())
 Upgrades a system package from a configured repository.
PackageManagerPendingCallWatcheruninstall (const QString &packagename)
 Uninstalls an installed package.
PackageManagerPendingCallWatcherupgradeAll ()
 Upgrades all packages that currently have a newer version available.
PackageManagerPendingCallWatchercancelOperation (const QString &operation, const QString &packagename, const QString &version)
 Cancel the current operation.
PackageManagerPendingCallWatcherinstallFileUi (const QString &filename)
 Installs a local package file and shows relevant dialogs.
PackageManagerPendingCallWatcherinstallPackageUi (const QString &packagename, const QString &version="", const QString &origin="", const QString &flags="")
 Installs a package from remote repository and shows any relevant dialogs.
PackageManagerPendingCallWatcheruninstallUi (const QString &packagename)
 Uninstalls a package shows relevant dialogs.
PackageManagerPendingCallWatcherupgradeAllUi ()
 Upgrades all packages that currently have a newer version available.
PackageManagerPendingCallWatcherrestoreUi (const QString &packagename, const QString &version="")
 Restores a package that has been previously installed.
void showInstallationExceptionUi (const QString &packagename)
 Shows an exception to installed package.
PackageManagerPendingCallWatcherrefreshPackageCacheUi (const QString &origin="", const QString &flags="")
 Refreshes package cache.
void showOperationsPageUi (const QString &operation, const QString &packageidentifier, const QString &version="")
 Starts Package Manager UI application into operations page.
void showUpdatesPageUi ()
 Starts Package Manager UI application into updates page.
void showRestorePageUi ()
 Starts Package Manager UI application into restore page.
void showDetailsPageUi (const QString &type, const QString &packagename, const QString &version)
 Starts Package Manager UI application into details page.
void showInstalledPageUi (const QString &packageidentifier)
 Starts Package Manager UI application into installations page.

Signals

void operationComplete (const QString &operation, const QString &packagename, const QString &version, const QString &result, const bool need_reboot)
 A signal that is emitted when a package operation is finished.
void downloadProgress (const QString &operation, const QString &packagename, const QString &version, int already, int total)
 A signal that is emitted multiple times when a package is being downloaded.
void operationStarted (const QString &operation, const QString &packagename, const QString &version)
 A signal that is emitted once for a package operation when the operation starts.
void operationProgress (const QString &operation, const QString &packagename, const QString &version, int percentage)
 A signal that is emitted multiple times during a package operation.
void packageListUpdated (const bool updates_changed)
 A signal that is emitted after a cache refresh.
void operationAborted (const QString &operation, const QString &packageidentifier, const QString &version, const QString &reason)
 A signal that is emitted when operation precheck fails.
void packageIgnored (const QString &type, const QString &packagename, const QString &version)
 A signal that is emitted when package is ignored.

Public Member Functions

 PackageManager ()
 Constructs Package Manager D-Bus interface wrapper.
 ~PackageManager ()
 Destructs the interface wrapper.

Public Attributes

int callTimeout
 A D-Bus call timeout in milliseconds. Default is 24h.

Detailed Description

Package Manager Qt bindings library public API header.

PackageManager interface class provides Qt style wrapping for D-Bus methods exposed by Package Manager application. Any application calling a wrapped D-Bus method should connect to a dbusError signal of the PackageManagerPendingCallWatcher transaction pointer returned. All provided methods are asynchronous. Any D-Bus call with a return value are wrapped to a separate waiting thread that generates a signal when reply value is returned.

Package Manager application contains three separate binaries with D-Bus interfaces. This class wraps all of them to allow seamless usage of whatever functionality is desired. The interfaces consists of:

Methods provided by this class can roughly be divided into four categories:


Member Enumeration Documentation

This enum contains all possible error codes used by Package Manager.

Enumerator:
ErrorNone 

No error.

ErrorDbus 

D-Bus error (such as no connection to interface).

ErrorInternal 

Unrecoverable error caused by platform tools.

ErrorInvalidArgument 

Invalid argument was passed to a method.

ErrorCheckUpdatesFailed 

No network connection to refresh repository cache.

ErrorFileNotFound 

Specified file does not exist.

ErrorInvalidFile 

Specified file is not in supported format.

ErrorPackageNotUser 

Specified package is not user package.

ErrorNoCandidate 

Package exists in cache but was not found on repository. It might have been removed.

ErrorPackageNotFound 

There is no package with the specified name.

ErrorPackageVersionNotFound 

Specified version of the package does not exist.

ErrorPackageNotInstalled 

There is no package with the specified name installed.

ErrorPackageNotCompatible 

Package is incompatible with the device.

ErrorDependenciesPreventUninstall 

Some other package depends on the package.

ErrorMissingDependencies 

Some of the packages needed by the specified package could not be found.

ErrorDownloadFailed 

Download of one or more packages failed.

ErrorOperationFailed 

Operation started but failed before finishing.

ErrorUpgradeFailed 

Upgrade operation started but failed before finishing.

ErrorPackageAlreadyInstalled 

Specified package is already installed.

ErrorPackageAlreadyNewest 

Newest version of the specified package is already installed.

ErrorNewerVersionInstalled 

Trying to install older version of a package that is currently installed.

ErrorRequiresOlderVersionOfDependency 

Trying to install a package that requires another package to be downgraded.

ErrorInvalidOperation 

Invalid operation requested.

ErrorNoOperation 

No ongoing operations.

ErrorNotCancelable 

Operation is not in a cancelable state.

ErrorOperationCanceled 

Operation was canceled.

ErrorUnknown 

An unspecified error occured.


Constructor & Destructor Documentation

PackageManager::~PackageManager (  ) 

Destructs the interface wrapper.

Note:
Destroying this class has no effect in ongoing package operations.

Member Function Documentation

PackageManagerPendingCallWatcher* PackageManager::cancelOperation ( const QString &  operation,
const QString &  packagename,
const QString &  version 
) [slot]

Cancel the current operation.

Parameters:
operation The operation to be cancelled.
packagename A package name
version A package version
Returns:
Pointer to watcher class, ownership not returned.

Sends a syncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will cancel the current operation matching to operation, packagename and version. If there is no operation going on Package Manager will cancel a failed package installation with specified package and version. In that case operation must be one of the following: Install, Upgrade or InstallFile. Package Manager will send an operationCompleted signal if the removal was successful.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

void PackageManager::downloadProgress ( const QString &  operation,
const QString &  packagename,
const QString &  version,
int  already,
int  total 
) [signal]

A signal that is emitted multiple times when a package is being downloaded.

Contains amount of currently transfered bytes as well as the total amount of bytes to be transferred.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::downloadSystemUpgrade ( const QString &  packagename,
const QString &  version = QString() 
) [slot]

Downloads a system package from a configured repository.

Parameters:
packagename A system package name. Case-sensitive.
version A system package version (optional).
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress signals and finally one operationComplete signal, containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not transferred.

package-managerpackagemanager_private

PackageManagerPendingFetchWatcher* PackageManager::fetchAvailableUpdates ( const QString &  category = ""  )  [slot]

Queries for updates available to installed packages.

Parameters:
category Optional category filter.
refresh Optionally clients may choose to refresh package cache.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, a dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QList< QMap<QString, QVariant> >&) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchCurrentOperationData (  )  [slot]

Fetch current operation (install, upgrade...) data.

Returns:
Pointer to watcher class, ownership not returned.

The result is a key-value map. If no operation is in progress, the map is empty.

During an operation the following keys are always present:

  • Operation: {Install, InstallFile, Upgrade, UpgradeAll, Uninstall, DownloadSystemUpgrade, SystemUpgrade, Refresh, Restore}

The following keys are present when Operation is one of {Install, Upgrade, Uninstall, DownloadSystemUpgrade, SystemUpgrade, Refresh, Restore}:

  • DownloadCurrentBytes (int64): Already downloaded bytes (-1 before download is started, 0..DownloadTotalBytes during download)
  • DownloadTotalBytes (int64): Total bytes to download (-1 before download is started)

The following keys are present when Operation is one of {Install, InstallFile, Upgrade, Uninstall, DownloadSystemUpgrade, SystemUpgrade, Restore}:

  • Name: Target package name
  • Version: Target package version
  • OperationProgressPct (int): -1 before actual package operation, 0..100 during operation.

When Operation is UpgradeAll, the following keys may be present:

  • PendingPackages: String list of packages yet to be upgraded in the operation. Each string is in format "Name=Version".
  • RejectedPackages: List of rejected packages. These packages have a update available, but are not updated. Each entry in the list is a string of the form "Name=Version=Error".

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchFilesOfInstalledPackage ( const QString &  packagename  )  [slot]

Queries for a list of files included in an installed package.

Parameters:
packagename Package name. Case-sensitive.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QStringList& fileList) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchInstalled (  )  [slot]

Queries for installed packages.

Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QList< QMap<QString, QVariant> >&) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchPackageDataFile ( const QString &  filename  )  [slot]

Queries for meta-data of a local package file.

Parameters:
filename Full path and name of the file.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QMap<QString, QVariant>& package) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchPackageDataInstalled ( const QString &  packagename  )  [slot]

Queries for meta-data of an installed package.

Parameters:
packagename Package name. Case-sensitive.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QMap<QString, QVariant>& package) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchPackageDataRemote ( const QString &  packagename,
const QString &  version = QString() 
) [slot]

Queries for a meta-data of a package from one of configured repositories.

Parameters:
name Package name. Case-sensitive.
version Optional version specifier.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QMap<QString, QVariant>& package) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchPackageDependencyData ( const QString &  packagename  )  [slot]

Queries for all dependencies of a package.

Parameters:
packagename Package name. Case-sensitive.
Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QList< QMap<QString, QVariant> >&) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchPackages ( const QString &  category = ""  )  [slot]

Queries for available packages that have not yet been installed.

Returns:
Pointer to watcher class, ownership not returned.
Parameters:
category Optional category filter.

If query fails due to a D-Bus error, a dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QList< QMap<QString, QVariant> >&) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchRestorablePackages (  )  [slot]

Queries for a package list of a restored content.

Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QList< QMap<QString, QVariant> >& data) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::fetchRestoreStatus (  )  [slot]

Queries for status of a restored content.

Returns:
Pointer to watcher class, ownership not returned.

If query fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QString& data) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::ignoreRestorePackage ( const QString &  packagename  )  [slot]

Removes a package from the restorable packages list.

Parameters:
packagename A package to be removed.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, the removal can be assumed as succeeded.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::ignoreUpdatePackage ( const QString &  packagename,
const QString &  version 
) [slot]

Adds a package in the ignored update package list.

Parameters:
packagename A package to be ignored.
version A version of the package to be ignored.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, the addition can be assumed as succeeded.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::install ( const QString &  packagename,
const QString &  version = QString() 
) [slot]

Installs a package from a configured repository.

Parameters:
packagename Package name. Case-sensitive.
version Package version (optional).
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress and operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited *

PackageManagerPendingCallWatcher* PackageManager::installFile ( const QString &  filename  )  [slot]

Installs a local package file.

Parameters:
filename Full path and name of the file.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and start signalling operationProgress signals and finally one operationComplete signal, containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::installFileUi ( const QString &  filename  )  [slot]

Installs a local package file and shows relevant dialogs.

Parameters:
filename Full path and name of the file.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager_install_ui. If the call itself fails, dbusError will be emitted by PackageManagerPendingCallWatcher. If not, installation UI will determine if the user needs to be presented with any security or dependency related questions and show the necessary dialogs before calling similar method of com.nokia.package_manager interface. After the operation has finished, if there were any errors, an error dialog will be shown on top of currently active applications.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::installPackageUi ( const QString &  packagename,
const QString &  version = "",
const QString &  origin = "",
const QString &  flags = "" 
) [slot]

Installs a package from remote repository and shows any relevant dialogs.

Parameters:
packagename Package name. Case-sensitive.
version Optional version specifier.
origin Optional repository domain identifier.
flags Additional flags.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager_install_ui. If the call itself fails, dbusError will be emitted by PackageManagerPendingCallWatcher. If not, installation UI will determine if the user needs to be presented with any security or dependency related questions or refresh the cache and show the necessary dialogs before calling install or update method of com.nokia.package_manager interface. If there was any errors before operationStarted signal was sent, a modal error or exception dialog will be shown to the user. After that signal, exceptions are only shown if PM operations page is open or if the user later manually taps the package from launcher (applications) or from PM UI list.

If the operation is not accepted by the user or there is a fatal error preventing the operation, operationAborted will be emitted. Otherwise operationComplete will be emitted when the operation finishes. Signal operationStarted will be sent before operationComplete and any progress signals are sent if the operation actually starts (no preinstallation exceptions). PackageManagerPendingCallWatcher should only be used until one of these operationX signals is sent.

If Version not given, the latest available version will be installed. If origin is given, package will only be installed if available from this repository.

Flags field contains comma separated list of optional parameters. Currently two flags are supported. To automatically show Package Manager operations page to display progress of requested operation, give "showoperationspage" as the string. The other option is to not show the 'Preparing operation' dialog while cache update is performed, by giving value "nocacheupdatedialog".

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

void PackageManager::operationAborted ( const QString &  operation,
const QString &  packageidentifier,
const QString &  version,
const QString &  reason 
) [signal]

A signal that is emitted when operation precheck fails.

If operation is aborted during precheck phase for any reason (including fatal errors, user cancellation and not accepting confirmation dialogs), this signal is sent so that the calling application would know that the operation has failed.

Parameter reason will contain additional information and currently it may contain either error code sent by MW or one of these values: "Cancelled" or "Busy".

Required Aegis token: none.

void PackageManager::operationComplete ( const QString &  operation,
const QString &  packagename,
const QString &  version,
const QString &  result,
const bool  need_reboot 
) [signal]

A signal that is emitted when a package operation is finished.

Contains information about a single package operations. If result is an empty string, the operation was successfull. If not, it will contain an error code.

Required Aegis token: none.

void PackageManager::operationProgress ( const QString &  operation,
const QString &  packagename,
const QString &  version,
int  percentage 
) [signal]

A signal that is emitted multiple times during a package operation.

Contains operation information as well as progress of the operation.

Note:
When a package is downloaded before the operation, percentage is frozen to zero until the download is finished.

Required Aegis token: none.

void PackageManager::operationStarted ( const QString &  operation,
const QString &  packagename,
const QString &  version 
) [signal]

A signal that is emitted once for a package operation when the operation starts.

Contains operation information.

Required Aegis token: none.

void PackageManager::packageIgnored ( const QString &  type,
const QString &  packagename,
const QString &  version 
) [signal]

A signal that is emitted when package is ignored.

Contains information of package. Value of type can be "Update" or "Restore".

Required Aegis token: none.

void PackageManager::packageListUpdated ( const bool  updates_changed  )  [signal]

A signal that is emitted after a cache refresh.

Any applications displaying catalogues of available packages or updates should refetch their data from Package Manager.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::refreshPackageCache ( const QString &  onlyDomain,
const QString &  flags 
) [slot]

Refreshes only a cache specified in onlyDomain.

Parameters:
onlyDomain Domain to be refreshed
flags Currently only "clearignored" supported, which clears ignored packages list.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emits operationStarted signal and finally one operationComplete signal, containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::refreshPackageCacheUi ( const QString &  origin = "",
const QString &  flags = "" 
) [slot]

Refreshes package cache.

Parameters:
origin Optionally restricts refresh to only specified Origin/Domain
flags Optional flags. Currently only "clearignored" supported.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager_install_ui. If the call itself fails, dbusError will be emitted by PackageManagerPendingCallWatcher. If Package Manager is busy the operationAborted signal will be emitted with error "Busy" and a busy dialog will be shown. If neither of the mentioned errors occure, the protected refreshPackageCache method from com.nokia.package_manager interface will be called and the backend will give the usual operationStarted and operationComplete signals.

Flags field contains comma separated list of optional parameters. Currently only one flag is supported. To restore any ignored updates, give "clearignored" as the string.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::restore ( const QString &  packagename,
const QString &  version 
) [slot]

Restores a package from a configured repository.

Parameters:
packagename Restorable package name. Case-sensitive.
version Restorable package version.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress and operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::restoreUi ( const QString &  packagename,
const QString &  version = "" 
) [slot]

Restores a package that has been previously installed.

Parameters:
packagename Package name. Case-sensitive.
version Optional version specifier. Newest version if not specified.
Returns:
Pointer to watcher class, ownership not returned.

Works exactly like installPackageUi except that this only installs packages that are to be restored.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

void PackageManager::showDetailsPageUi ( const QString &  type,
const QString &  packagename,
const QString &  version 
) [slot]

Starts Package Manager UI application into details page.

Parameters:
type Type of package. Case-insensitive. Possible values are: Upgrade(Update works too), Installed and Restore.
packageidentifier Package name. Case-sensitive. For file based installations,
version Version specifier.

Sends a syncronous D-Bus method call to com.nokia.package_manager_ui. If call succeeds, details page will be shown for specified package. If type is Upgrade and specified package is not found, updates page is shown instead. If type is invalid or Installed/Restore and package is not found, nothing happens with this call.

Required Aegis token: none.

void PackageManager::showInstallationExceptionUi ( const QString &  packagename  )  [slot]

Shows an exception to installed package.

Parameters:
packagename Package name. Case-sensitive.

Shows any tracked exception for the installation. Does nothing if no exception is tracked.

Required Aegis token: none.

void PackageManager::showInstalledPageUi ( const QString &  packageidentifier  )  [slot]

Starts Package Manager UI application into installations page.

Parameters:
packageidentifier Package name. Case-sensitive. Optional.

Sends a syncronous D-Bus method call to com.nokia.package_manager_ui. If call succeeds, installations page will be shown. If packageidentifier is given, installations page opens with given package focused.

void PackageManager::showOperationsPageUi ( const QString &  operation,
const QString &  packageidentifier,
const QString &  version = "" 
) [slot]

Starts Package Manager UI application into operations page.

Parameters:
operation Operation name. Case-insensitive. Same operation strings as operation signals contain.
packageidentifier Package name or filename for file based oeprations. Case-sensitive. Mandatory.
version Version specifier (not required for all operation types).

Sends a syncronous D-Bus method call to com.nokia.package_manager_ui. If call succeeds, operations page will be shown with progress of the specified operation. The page will close itself automatically when operation is complete.

Required Aegis token: none.

void PackageManager::showRestorePageUi (  )  [slot]

Starts Package Manager UI application into restore page.

Sends a syncronous D-Bus method call to com.nokia.package_manager_ui. If call succeeds, restore page will be shown. When invoked through a D-Bus, a cache update will always be done by restore page on entry.

Required Aegis token: none.

void PackageManager::showUpdatesPageUi (  )  [slot]

Starts Package Manager UI application into updates page.

Sends a syncronous D-Bus method call to com.nokia.package_manager_ui. If call succeeds, updates page will be shown.

Required Aegis token: none.

PackageManagerPendingFetchWatcher* PackageManager::simulateOperation ( const QString &  operation,
const QString &  packageidentifier,
const QString &  version,
const QString &  flags 
) [slot]

Simulate method.

Returns:
Pointer to watcher class, ownership not returned.

If method fails due to a D-Bus error, dbusError signal is generated by PackageManagerPendingFetchWatcher. If query is handled by the middleware, fetched data is returned with dataFetched(const QMap<QString, QVariant>& data) signal.

Ownership of PackageManagerPendingFetchWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::uninstall ( const QString &  packagename  )  [slot]

Uninstalls an installed package.

Parameters:
packagename A package name. Case-sensitive.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::uninstallUi ( const QString &  packagename  )  [slot]

Uninstalls a package shows relevant dialogs.

Parameters:
packagename Package name. Case-sensitive.
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager_install_ui. If the call itself fails, dbusError will be emitted by PackageManagerPendingCallWatcher. If not, installation UI will determine if the user needs to be presented with any security or dependency related questions and show the necessary dialogs before calling similar method of com.nokia.package_manager interface. After the operation has finished, if there were any errors, an error dialog will be shown on top of currently active applications.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::upgrade ( const QString &  packagename,
const QString &  version = QString() 
) [slot]

Upgrades a package from a configured repository.

Parameters:
packagename Package name. Case-sensitive.
version Package version (optional).
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress and operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::upgradeAll (  )  [slot]

Upgrades all packages that currently have a newer version available.

Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress and operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Each package is upgraded separately, one at the time. I.e. package B will begin to be downloaded (and later installed) only after package A has been downloaded and installed. In case of error(s), operation is not aborted and each error will be emitted with a separate operationComplete signal.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

package-managerpackagemanager_limited

PackageManagerPendingCallWatcher* PackageManager::upgradeAllUi (  )  [slot]

Upgrades all packages that currently have a newer version available.

Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager_install_ui. If the call itself fails, dbusError will be emitted by PackageManagerPendingCallWatcher. If not, installation UI will determine if the user needs to be presented with any security or dependency related questions and show the necessary dialogs before calling similar method of com.nokia.package_manager interface. After the operation has finished, if there were any errors, an error dialog will be shown on top of currently active applications.

Ownership of PackageManagerPendingCallWatcher pointer is not returned.

Required Aegis token: none.

PackageManagerPendingCallWatcher* PackageManager::upgradeSystem ( const QString &  packagename,
const QString &  version = QString() 
) [slot]

Upgrades a system package from a configured repository.

Parameters:
packagename A system package name. Case-sensitive.
version A system package version (optional)
Returns:
Pointer to watcher class, ownership not returned.

Sends an asyncronous D-Bus method call to com.nokia.package_manager. If the call itself fails, a dbusError signal will be emitted by PackageManagerPendingCallWatcher. If not, Package Manager will begin the operation and emit an operationStarted signal. After that Package Manager starts signalling downloadProgress and operationProgress signals and finally operationComplete signal(s), containing information whether the operation succeeded or failed.

Ownership of PackageManagerPendingCallWatcher pointer is not transferred.

package-managerpackagemanager_private


The documentation for this class was generated from the following file: