Package Manager Qt bindings library public API header. More...
#include <packagemanager.h>
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 | |
PackageManagerPendingFetchWatcher * | fetchCurrentOperationData () |
Fetch current operation (install, upgrade...) data. | |
PackageManagerPendingFetchWatcher * | fetchPackages (const QString &category="") |
Queries for available packages that have not yet been installed. | |
PackageManagerPendingFetchWatcher * | fetchAvailableUpdates (const QString &category="") |
Queries for updates available to installed packages. | |
PackageManagerPendingFetchWatcher * | fetchInstalled () |
Queries for installed packages. | |
PackageManagerPendingFetchWatcher * | fetchPackageDataFile (const QString &filename) |
Queries for meta-data of a local package file. | |
PackageManagerPendingFetchWatcher * | fetchPackageDataRemote (const QString &packagename, const QString &version=QString()) |
Queries for a meta-data of a package from one of configured repositories. | |
PackageManagerPendingFetchWatcher * | fetchPackageDataInstalled (const QString &packagename) |
Queries for meta-data of an installed package. | |
PackageManagerPendingFetchWatcher * | fetchFilesOfInstalledPackage (const QString &packagename) |
Queries for a list of files included in an installed package. | |
PackageManagerPendingFetchWatcher * | fetchPackageDependencyData (const QString &packagename) |
Queries for all dependencies of a package. | |
PackageManagerPendingFetchWatcher * | fetchRestoreStatus () |
Queries for status of a restored content. | |
PackageManagerPendingFetchWatcher * | fetchRestorablePackages () |
Queries for a package list of a restored content. | |
PackageManagerPendingFetchWatcher * | simulateOperation (const QString &operation, const QString &packageidentifier, const QString &version, const QString &flags) |
Simulate method. | |
PackageManagerPendingCallWatcher * | ignoreUpdatePackage (const QString &packagename, const QString &version) |
Adds a package in the ignored update package list. | |
PackageManagerPendingCallWatcher * | refreshPackageCache (const QString &onlyDomain, const QString &flags) |
Refreshes only a cache specified in onlyDomain. | |
PackageManagerPendingCallWatcher * | installFile (const QString &filename) |
Installs a local package file. | |
PackageManagerPendingCallWatcher * | install (const QString &packagename, const QString &version=QString()) |
Installs a package from a configured repository. | |
PackageManagerPendingCallWatcher * | upgrade (const QString &packagename, const QString &version=QString()) |
Upgrades a package from a configured repository. | |
PackageManagerPendingCallWatcher * | restore (const QString &packagename, const QString &version) |
Restores a package from a configured repository. | |
PackageManagerPendingCallWatcher * | ignoreRestorePackage (const QString &packagename) |
Removes a package from the restorable packages list. | |
PackageManagerPendingCallWatcher * | downloadSystemUpgrade (const QString &packagename, const QString &version=QString()) |
Downloads a system package from a configured repository. | |
PackageManagerPendingCallWatcher * | upgradeSystem (const QString &packagename, const QString &version=QString()) |
Upgrades a system package from a configured repository. | |
PackageManagerPendingCallWatcher * | uninstall (const QString &packagename) |
Uninstalls an installed package. | |
PackageManagerPendingCallWatcher * | upgradeAll () |
Upgrades all packages that currently have a newer version available. | |
PackageManagerPendingCallWatcher * | cancelOperation (const QString &operation, const QString &packagename, const QString &version) |
Cancel the current operation. | |
PackageManagerPendingCallWatcher * | installFileUi (const QString &filename) |
Installs a local package file and shows relevant dialogs. | |
PackageManagerPendingCallWatcher * | installPackageUi (const QString &packagename, const QString &version="", const QString &origin="", const QString &flags="") |
Installs a package from remote repository and shows any relevant dialogs. | |
PackageManagerPendingCallWatcher * | uninstallUi (const QString &packagename) |
Uninstalls a package shows relevant dialogs. | |
PackageManagerPendingCallWatcher * | upgradeAllUi () |
Upgrades all packages that currently have a newer version available. | |
PackageManagerPendingCallWatcher * | restoreUi (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. | |
PackageManagerPendingCallWatcher * | refreshPackageCacheUi (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. |
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:
This enum contains all possible error codes used by Package Manager.
PackageManager::~PackageManager | ( | ) |
Destructs the interface wrapper.
PackageManagerPendingCallWatcher* PackageManager::cancelOperation | ( | const QString & | operation, | |
const QString & | packagename, | |||
const QString & | version | |||
) | [slot] |
Cancel the current operation.
operation | The operation to be cancelled. | |
packagename | A package name | |
version | A package version |
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.
packagename | A system package name. Case-sensitive. | |
version | A system package version (optional). |
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.
category | Optional category filter. | |
refresh | Optionally clients may choose to refresh package cache. |
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.
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:
The following keys are present when Operation is one of {Install, Upgrade, Uninstall, DownloadSystemUpgrade, SystemUpgrade, Refresh, Restore}:
The following keys are present when Operation is one of {Install, InstallFile, Upgrade, Uninstall, DownloadSystemUpgrade, SystemUpgrade, Restore}:
When Operation is UpgradeAll, the following keys may be present:
Required Aegis token: none.
PackageManagerPendingFetchWatcher* PackageManager::fetchFilesOfInstalledPackage | ( | const QString & | packagename | ) | [slot] |
Queries for a list of files included in an installed package.
packagename | Package name. Case-sensitive. |
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.
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.
filename | Full path and name of the file. |
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.
packagename | Package name. Case-sensitive. |
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.
name | Package name. Case-sensitive. | |
version | Optional version specifier. |
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.
packagename | Package name. Case-sensitive. |
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.
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.
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.
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.
packagename | A package to be removed. |
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.
packagename | A package to be ignored. | |
version | A version of the package to be ignored. |
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.
packagename | Package name. Case-sensitive. | |
version | Package version (optional). |
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.
filename | Full path and name of the file. |
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.
filename | Full path and name of the file. |
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.
packagename | Package name. Case-sensitive. | |
version | Optional version specifier. | |
origin | Optional repository domain identifier. | |
flags | Additional flags. |
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.
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.
onlyDomain | Domain to be refreshed | |
flags | Currently only "clearignored" supported, which clears ignored packages list. |
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.
origin | Optionally restricts refresh to only specified Origin/Domain | |
flags | Optional flags. Currently only "clearignored" supported. |
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.
packagename | Restorable package name. Case-sensitive. | |
version | Restorable package version. |
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.
packagename | Package name. Case-sensitive. | |
version | Optional version specifier. Newest version if not specified. |
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.
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.
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.
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.
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.
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.
packagename | A package name. Case-sensitive. |
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.
packagename | Package name. Case-sensitive. |
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.
packagename | Package name. Case-sensitive. | |
version | Package version (optional). |
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.
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.
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.
packagename | A system package name. Case-sensitive. | |
version | A system package version (optional) |
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