#include <applicationpackagemonitor.h>
List of all members.
Signals |
void | downloadProgress (const QString &packageExtraPath, const QString &packageName, int bytesLoaded, int bytesTotal, bool packageRemovable) |
void | installProgress (const QString &packageExtraPath, const QString &packageName, int percentage, bool packageRemovable) |
void | operationSuccess (const QString &packageExtraPath, const QString &packageName, bool packageRemovable) |
void | operationError (const QString &packageExtraPath, const QString &packageName, const QString &error, bool packageRemovable) |
void | installExtraEntryRemoved (const QString &desktopEntryPath) |
void | updatePackageName (const QString &desktopEntryPath, const QString &packageName) |
void | packageUninstall (const QString &desktopEntryPath, const QString &packageName, bool packageRemovable) |
Public Member Functions |
| ApplicationPackageMonitor () |
virtual | ~ApplicationPackageMonitor () |
void | updatePackageStates () |
QString | packageName (const QString &dekstopEntryPath) |
Static Public Attributes |
static const QString | INSTALLER_EXTRA_FOLDER = "installer-extra/" |
| Installer extra folder path.
|
Detailed Description
ApplicationPackageMonitor listens dbus signals from Package Manager and watches installer-extra folder to receive info on package installation states and signaling relevant changes.
Some events may be communicated through both dbus signal and changes in desktop entries. This can lead to same package having multiple signals for same event (like progress error). Signal listener is responsible for handling such cases.
Constructor & Destructor Documentation
ApplicationPackageMonitor::ApplicationPackageMonitor |
( |
|
) |
|
ApplicationPackageMonitor::~ApplicationPackageMonitor |
( |
|
) |
[virtual] |
Member Function Documentation
void ApplicationPackageMonitor::downloadProgress |
( |
const QString & |
packageExtraPath, |
|
|
const QString & |
packageName, |
|
|
int |
bytesLoaded, |
|
|
int |
bytesTotal, |
|
|
bool |
packageRemovable | |
|
) |
| | [signal] |
Status of download progress of package being installed.
- Parameters:
-
| desktopEntryName | is name of desktop entry file. |
| packageName | name of the package |
| bytesLoaded | is current amount of bytes downloaded. |
| bytesTotal | is size of downloading package in bytes. |
| packageRemovable | is package removable |
void ApplicationPackageMonitor::installExtraEntryRemoved |
( |
const QString & |
desktopEntryPath |
) |
[signal] |
Notifes about removal of install extra desktop entry.
- Parameters:
-
| desktopEntryPath | path of removed install extra file. |
void ApplicationPackageMonitor::installProgress |
( |
const QString & |
packageExtraPath, |
|
|
const QString & |
packageName, |
|
|
int |
percentage, |
|
|
bool |
packageRemovable | |
|
) |
| | [signal] |
Status of install progress of package being installed.
- Parameters:
-
| desktopEntryName | is name of preliminary desktop entry file under installer-extra/. |
| packageName | name of the package |
| percentage | is install completion level. |
| packageRemovable | is package removable |
void ApplicationPackageMonitor::operationError |
( |
const QString & |
packageExtraPath, |
|
|
const QString & |
packageName, |
|
|
const QString & |
error, |
|
|
bool |
packageRemovable | |
|
) |
| | [signal] |
Notifies about error in installing and downloading package.
- Parameters:
-
| desktopEntryName | is name of preliminary desktop entry file under installer-extra/. |
| packageName | name of the package |
| error | is string format description of error occured. |
| packageRemovable | is package removable |
void ApplicationPackageMonitor::operationSuccess |
( |
const QString & |
packageExtraPath, |
|
|
const QString & |
packageName, |
|
|
bool |
packageRemovable | |
|
) |
| | [signal] |
Notifies about success in installing a package.
- Parameters:
-
| desktopEntryName | is name of the installed desktop entry file. |
| packageName | name of the package |
| packageRemovable | is package removable |
QString ApplicationPackageMonitor::packageName |
( |
const QString & |
dekstopEntryPath |
) |
|
Returns package name from desktop entry. Returns empty QString if desktop entry is not found.
- Parameters:
-
| desktopEntryPath | is the path of the desktop entry |
- Returns:
- package name of desktop entry
void ApplicationPackageMonitor::packageUninstall |
( |
const QString & |
desktopEntryPath, |
|
|
const QString & |
packageName, |
|
|
bool |
packageRemovable | |
|
) |
| | [signal] |
Notifies that package is being uninstalled.
- Parameters:
-
| desktopEntryPath | path that specifies the package. |
| packageName | name of the package |
| packageRemovable | is package removable |
void ApplicationPackageMonitor::updatePackageName |
( |
const QString & |
desktopEntryPath, |
|
|
const QString & |
packageName | |
|
) |
| | [signal] |
Notifies about a need to update package name.
- Parameters:
-
| desktopEntryPath | path that specifies the package. |
| packageName | name of the package |
void ApplicationPackageMonitor::updatePackageStates |
( |
|
) |
|
Emit's state signals for packages in relevat states.
(eg. emits operationError() for all the packages in 'broken' state)
Member Data Documentation
Installer extra folder path.
The documentation for this class was generated from the following files: