src/hbcore/theme/hbthemeclient_symbian_p.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
child 23 e6ad4ef83b23
--- a/src/hbcore/theme/hbthemeclient_symbian_p.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbcore/theme/hbthemeclient_symbian_p.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -223,8 +223,8 @@
  *
  * Returns the shared css(stylesheet) information
 */
-HbCss::StyleSheet *HbThemeClientPrivate::getSharedStyleSheet(
-        const QString &fileName, HbLayeredStyleLoader::LayerPriority priority)
+HbCss::StyleSheet *HbThemeClientPrivate::getSharedStyleSheet(const QString &fileName, 
+            HbLayeredStyleLoader::LayerPriority priority, bool &fileExists)
 {
     if ( !clientConnected ) {
         return 0;
@@ -238,7 +238,6 @@
     HbSharedStyleSheetInfo stylesheetInfo;
     TPckg<HbSharedStyleSheetInfo> sharedInfo(stylesheetInfo);
 
-    //TInt fileOffset = -1;
     TIpcArgs args(&fileDes, &layerPriority, &sharedInfo);
 
 #ifdef THEME_SERVER_TRACES
@@ -255,11 +254,41 @@
             styleSheet = HbMemoryUtils::getAddress<HbCss::StyleSheet>(
                 HbMemoryManager::SharedMemory, stylesheetInfo.offset);
         }
+        fileExists = stylesheetInfo.fileExists;
     }
     return styleSheet;
 }
 
 /**
+ * HbThemeClientPrivate::getSharedMissedHbCss()
+ *
+ * Returns a pointer to the list in shared memory of CSS files for classes
+ * starting with 'hb' which the theme server attempted to load and found
+ * the file does not exist
+ */
+HbVector<uint> *HbThemeClientPrivate::getSharedMissedHbCss()
+{
+    if (!clientConnected) {
+        return 0;
+    }
+
+    HbVector<uint> *list(0);
+
+    HbSharedMissedHbCssInfo missedListInfo;
+    TPckg<HbSharedMissedHbCssInfo> listInfo(missedListInfo);
+    TIpcArgs args(&listInfo);
+    TInt err = SendReceive(EMissedHbCssLookup, args);
+
+    if (KErrNone == err) {
+        if (missedListInfo.offset >= 0) {
+            list = HbMemoryUtils::getAddress<HbVector<uint> >(
+                HbMemoryManager::SharedMemory, missedListInfo.offset);
+        }
+    }
+    return list;
+}
+
+/**
  * HbThemeClientPrivate::getSharedEffect()
  *
  * Returns the shared effect information
@@ -437,7 +466,7 @@
  * Returns the layout definition for the given file name,layout name,section name
 */
 HbWidgetLoader::LayoutDefinition *HbThemeClientPrivate::getSharedLayoutDefs(
-        const QString &fileName, const QString &layout, const QString &section)
+        const QString &fileName, const QString &layout, const QString &section, bool &fileExists)
 {
     if ( !clientConnected ) {
         return 0;
@@ -461,6 +490,7 @@
             layoutDef = HbMemoryUtils::getAddress<HbWidgetLoader::LayoutDefinition>(
                     HbMemoryManager::SharedMemory, widgetmlInfo.offset);
         }
+        fileExists = widgetmlInfo.fileExists;
     }
     return layoutDef;
 }