Permalink
Browse files

[launchermodel] Rename install -> updating in D-Bus API

  • Loading branch information...
1 parent ab2e8df commit 1ffe9f57faed26759cc011f747a23345b7240d15 @thp thp committed Mar 11, 2014
View
@@ -14,7 +14,7 @@
*
* \section methods Methods
*
- * \subsection installstarted installStarted(string packageName, string label, string iconPath, string desktopFile)
+ * \subsection updatingstarted updatingStarted(string packageName, string label, string iconPath, string desktopFile)
*
* Notifies Lipstick of a install/update/uninstall action that has just
* started. Depending on the UI used, this should be visualized with a spinner
@@ -32,28 +32,28 @@
* the .desktop file that belongs to this package. Can be left empty, in which
* case Lipstick tries to determine the right filename from \c packageName.
*
- * Between \c installStarted and \c installFinished, the launcher does not
+ * Between \c updatingStarted and \c updatingFinished, the launcher does not
* react to taps in the usual way. Instead, a Signal is sent, so that interested
* applications (e.g. a package manager) can show the progress in its window.
*
- * \subsection installprogress installProgress(string packageName, int32 progress)
+ * \subsection updatingprogress updatingProgress(string packageName, int32 progress)
*
* Notifies Lipstick that the progress of a install/update/uninstall action that
- * has been previously started with \c installStarted has changed. Depending on
+ * has been previously started with \c updatingStarted has changed. Depending on
* the UI used, this can be used to display a progress bar on the icon, or show
* the installation progress as text label.
*
- * - \c packageName must be the package name, as in \c installStarted
+ * - \c packageName must be the package name, as in \c updatingStarted
* - \c progress must be the progress value in percent, ranging from 0 to 100.
* If the progress is outside of this range, it is expected that the UI hides
* any previously-set progress and shows the progress as indeterminate.
*
- * \subsection installfinished installFinished(string packageName)
+ * \subsection updatingfinished updatingFinished(string packageName)
*
* Notifies Lipstick that the install/update/uninstall action has finished, and
* that the progress indicator can be removed from the icon again.
*
- * - \c packageName must be the package name, as in \c installStarted
+ * - \c packageName must be the package name, as in \c updatingStarted
*
* \section signals Signals
*
@@ -64,7 +64,7 @@
* during the installation, and - when emitted - show the installation progress
* of the given package to the user.
*
- * \subsection showinstallprogress showInstallProgress(string packageName)
+ * \subsection showupdatingprogress showUpdatingProgress(string packageName)
*
* Emitted when the user taps on a launcher that is currently being updated.
* The package manager is expected to open a view with the current install
@@ -75,6 +75,6 @@
* uninstallation or upgrade, the package manager has to take care of launching
* the app on behalf of Lipstick.
*
- * - \c packageName The package name, as passed in to \c installStarted
+ * - \c packageName The package name, as passed in to \c updatingStarted
*
*/
@@ -42,20 +42,20 @@ LauncherDBus::~LauncherDBus()
void LauncherDBus::requestLaunch(QString packageName)
{
- emit showInstallProgress(packageName);
+ emit showUpdatingProgress(packageName);
}
-void LauncherDBus::installStarted(QString packageName, QString label, QString iconPath, QString desktopFile)
+void LauncherDBus::updatingStarted(QString packageName, QString label, QString iconPath, QString desktopFile)
{
- m_model->installStarted(packageName, label, iconPath, desktopFile, message().service());
+ m_model->updatingStarted(packageName, label, iconPath, desktopFile, message().service());
}
-void LauncherDBus::installProgress(QString packageName, int progress)
+void LauncherDBus::updatingProgress(QString packageName, int progress)
{
- m_model->installProgress(packageName, progress, message().service());
+ m_model->updatingProgress(packageName, progress, message().service());
}
-void LauncherDBus::installFinished(QString packageName)
+void LauncherDBus::updatingFinished(QString packageName)
{
- m_model->installFinished(packageName, message().service());
+ m_model->updatingFinished(packageName, message().service());
}
@@ -39,12 +39,12 @@ class LauncherDBus : public QObject, protected QDBusContext
void requestLaunch(QString packageName);
public slots:
- void installStarted(QString packageName, QString label, QString iconPath, QString desktopFile);
- void installProgress(QString packageName, int progress);
- void installFinished(QString packageName);
+ void updatingStarted(QString packageName, QString label, QString iconPath, QString desktopFile);
+ void updatingProgress(QString packageName, int progress);
+ void updatingFinished(QString packageName);
signals:
- void showInstallProgress(QString packageName);
+ void showUpdatingProgress(QString packageName);
private:
LauncherModel *m_model;
@@ -338,10 +338,10 @@ static QString desktopFileFromPackageName(const QString &packageName)
return QString(LAUNCHER_APPS_PATH) + packageName + ".desktop";
}
-void LauncherModel::installStarted(const QString &packageName, const QString &label,
+void LauncherModel::updatingStarted(const QString &packageName, const QString &label,
const QString &iconPath, QString desktopFile, const QString &serviceName)
{
- LAUNCHER_DEBUG("Installation started:" << packageName << label
+ LAUNCHER_DEBUG("Update started:" << packageName << label
<< iconPath << desktopFile);
// Remember which service notified us about this package, so we can
@@ -359,7 +359,7 @@ void LauncherModel::installStarted(const QString &packageName, const QString &la
item = packageInModel(packageName);
}
- // Calling installStarted on an existing temporary icon should
+ // Calling updatingStarted on an existing temporary icon should
// update the internal state of the temporary icon (and if the
// .desktop file exists, make the icon non-temporary).
if (item && item->isTemporary()) {
@@ -393,10 +393,10 @@ void LauncherModel::installStarted(const QString &packageName, const QString &la
item->setPackageName(packageName);
}
-void LauncherModel::installProgress(const QString &packageName, int progress,
+void LauncherModel::updatingProgress(const QString &packageName, int progress,
const QString &serviceName)
{
- LAUNCHER_DEBUG("Installation progress:" << packageName << progress);
+ LAUNCHER_DEBUG("Update progress:" << packageName << progress);
QString expectedServiceName = _packageNameToDBusService[packageName];
if (expectedServiceName != serviceName) {
@@ -414,10 +414,10 @@ void LauncherModel::installProgress(const QString &packageName, int progress,
item->setIsUpdating(true);
}
-void LauncherModel::installFinished(const QString &packageName,
+void LauncherModel::updatingFinished(const QString &packageName,
const QString &serviceName)
{
- LAUNCHER_DEBUG("Installation finished:" << packageName);
+ LAUNCHER_DEBUG("Update finished:" << packageName);
QString expectedServiceName = _packageNameToDBusService[packageName];
if (expectedServiceName != serviceName) {
@@ -471,8 +471,8 @@ void LauncherModel::onServiceUnregistered(const QString &serviceName)
}
foreach (const QString &packageName, packagesToRemove) {
- LAUNCHER_DEBUG("Fabricating installFinished for" << packageName);
- installFinished(packageName, serviceName);
+ LAUNCHER_DEBUG("Fabricating updatingFinished for" << packageName);
+ updatingFinished(packageName, serviceName);
}
}
@@ -63,10 +63,10 @@ private slots:
QStringList iconDirectories() const;
void setIconDirectories(QStringList);
- void installStarted(const QString &packageName, const QString &label,
+ void updatingStarted(const QString &packageName, const QString &label,
const QString &iconPath, QString desktopFile, const QString &serviceName);
- void installProgress(const QString &packageName, int progress, const QString &serviceName);
- void installFinished(const QString &packageName, const QString &serviceName);
+ void updatingProgress(const QString &packageName, int progress, const QString &serviceName);
+ void updatingFinished(const QString &packageName, const QString &serviceName);
void requestLaunch(const QString &packageName);
View
@@ -23,10 +23,10 @@
#define LIPSTICK_DBUS_LAUNCHER_MODEL_PATH "/LauncherModel"
#define LIPSTICK_DBUS_LAUNCHER_MODEL_INTERFACE "org.nemomobile.lipstick.LauncherModel"
-#define LIPSTICK_DBUS_LAUNCHER_MODEL_INSTALL_STARTED "installStarted"
-#define LIPSTICK_DBUS_LAUNCHER_MODEL_INSTALL_PROGRESS "installProgress"
-#define LIPSTICK_DBUS_LAUNCHER_MODEL_INSTALL_FINISHED "installFinished"
-#define LIPSTICK_DBUS_LAUNCHER_MODEL_SHOW_INSTALL_PROGRESS "showInstallProgress"
+#define LIPSTICK_DBUS_LAUNCHER_MODEL_UPDATING_STARTED "updatingStarted"
+#define LIPSTICK_DBUS_LAUNCHER_MODEL_UPDATING_PROGRESS "updatingProgress"
+#define LIPSTICK_DBUS_LAUNCHER_MODEL_UPDATING_FINISHED "updatingFinished"
+#define LIPSTICK_DBUS_LAUNCHER_MODEL_SHOW_UPDATING_PROGRESS "showUpdatingProgress"
#define LIPSTICK_DBUS_WINDOW_MODEL_PATH "/WindowModel"

0 comments on commit 1ffe9f5

Please sign in to comment.