Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef APPLICATIONPACKAGEMONITORLISTENER_H 00021 #define APPLICATIONPACKAGEMONITORLISTENER_H 00022 00023 #include <QObject> 00024 #include "launcherbuttonmodel.h" 00025 00026 class ApplicationPackageMonitor; 00027 00032 class ApplicationPackageMonitorListener : public QObject 00033 { 00034 Q_OBJECT 00035 00036 public: 00040 ApplicationPackageMonitorListener(); 00044 virtual ~ApplicationPackageMonitorListener(); 00045 00049 void updatePackageStates(); 00050 00052 static bool isInstallerExtraEntry(const QString &desktopEntryPath); 00054 static QString toInstallerExtraEntryPath(const QString &entryPath); 00056 static QString toApplicationsEntryPath(const QString &entryPath); 00057 00058 signals: 00059 00063 void packageStateChanged(const QString &desktopEntryPath, const QString &packageName, LauncherButtonModel::State state, int progress, bool packageRemovable); 00064 00068 void installExtraEntryRemoved(const QString &desktopEntryPath); 00069 00076 void updatePackageName(const QString &desktopEntryPath, const QString &packageName); 00077 00078 public slots: 00079 00089 void setDownloadProgress(const QString& desktopEntryPath, const QString &packageName, int bytesLoaded, int bytesTotal, bool packageRemovable); 00090 00099 void setInstallProgress(const QString& desktopEntryPath, const QString &packageName, int percentage, bool packageRemovable); 00100 00108 void setOperationSuccess(const QString& desktopEntryPath, const QString &packageName, bool packageRemovable); 00109 00118 void setOperationError(const QString& desktopEntryPath, const QString &packageName, const QString& error, bool packageRemovable); 00119 00120 00128 void setPackageUninstall(const QString &desktopEntryPath, const QString &packageName, bool packageRemovable); 00129 00130 private: 00132 QSharedPointer<ApplicationPackageMonitor> packageMonitor; 00133 00134 #ifdef UNIT_TEST 00135 friend class Ut_ApplicationPackageMonitorListener; 00136 #endif 00137 00138 }; 00139 00140 #endif
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |