homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp
changeset 55 03646e8da489
parent 46 23b5d6a29cce
child 61 2b1b11a301d2
--- a/homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp	Thu May 27 12:46:08 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp	Fri Jun 11 13:30:16 2010 +0300
@@ -37,6 +37,15 @@
     \class HsWidgetComponentRegistry
     \ingroup group_hsdomainmodel
     \brief Homescreen widget component registry.
+
+    Homescreen widget component registry keeps track of packages from which is(are) 
+    created widget(s) to homescreen page(s). Registry updates its content
+    when the installation package is uninstalled/updated or installation location is( or is not)
+	available (media attached/detached). Registry takes care of package registration/unregistration
+	to Qt service framework.
+    
+    Events for all above cases are get from Content Storage. Component registry listens
+    changes of Content Storages' entries (CaEntry) via its service class (CaService).
 */
 
 HsWidgetComponentRegistry *HsWidgetComponentRegistry::mInstance = 0;
@@ -64,6 +73,7 @@
 
 /*!
     Returns component object of the given \a uri.
+    Uri is defined in widget manifest file. \see page_widgetsispackage
 */
 HsWidgetComponent *HsWidgetComponentRegistry::component(const QString &uri)
 {
@@ -77,15 +87,15 @@
 }
 
 /*!
-    Requests widget component to emit 'aboutToInstall' signal to free widget resources when uninstalling the widget.
+    Requests widget component to emit 'aboutToUninstall' signal to free widget resources when
+    uninstalling the widget's installation package.
 */
 void HsWidgetComponentRegistry::uninstallComponent(const HsWidgetComponentDescriptor &componentDescriptor)
 {
     HsWidgetComponent *component = mRegistry.value(componentDescriptor.uri);
     if (component) {
         component->emitAboutToUninstall();
-        }
-        
+    }
 }
 
 /*!
@@ -119,7 +129,6 @@
     if (component) {
         component->emitAvailable();
     }
-
 }
 
 /*!
@@ -139,7 +148,7 @@
         mServiceManager.removeService(uri);
         QCoreApplication::removeLibraryPath(rootPath);
         if (component) {
-            // for now support versions without uinstaller
+            // for now support versions without uninstaller
             component->emitAboutToUninstall();
             component->emitUninstalled();
             mRegistry.take(uri)->deleteLater();
@@ -203,4 +212,3 @@
         default: break;     
     }
 }
-