idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp
branchRCL_3
changeset 15 ff572dfe6d86
parent 9 f966699dea19
child 38 79311d856354
--- a/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp	Fri Feb 19 22:42:37 2010 +0200
+++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/src/wmunittest_plugin.cpp	Fri Mar 12 15:41:49 2010 +0200
@@ -22,6 +22,7 @@
 #include <stiftestinterface.h>
 #include <bautils.h>
 #include <aknsskininstance.h>
+#include <utf.h>
 #include "wmunittest.h"
 // components to test
 #include "wmplugin.h"
@@ -47,7 +48,8 @@
 const TInt KLogoPath = 102;
 const TInt KCanBeAdded = 103;
 const TInt KCanBeRemoved = 104;
-
+const TInt KPublisherId = 105;
+const TInt KType = 106;
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -98,7 +100,7 @@
 TInt CWmUnitTest::PluginDeactivateL( CStifItemParser& /*aItem*/ )
     {
     if ( iWmPlugin == 0 ) User::Leave( KErrArgument );
-    iWmPlugin->CloseView();
+    iWmPlugin->DeActivate();
     _RETURN("PluginActivateL End", KErrNone);
     }
 
@@ -123,6 +125,11 @@
     return KErrNone;
     }
 
+TInt CWmUnitTest::WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray )
+    {
+    return KErrNone;
+    }
+
 TInt CWmUnitTest::ViewListL( CHsContentInfoArray& /*aArray*/ )
     {
     return KErrNone;
@@ -165,12 +172,12 @@
 
 TInt CWmUnitTest::ActiveViewL( CHsContentInfo& /*aInfo*/ )
     {
-    return 0;
+    return KErrNone;
     }
 
 TInt CWmUnitTest::ActiveAppL( CHsContentInfo& /*aInfo*/ )
     {
-    return 0;
+    return KErrNone;
     }
 
 
@@ -236,6 +243,14 @@
             { info->SetCanBeAdded( s2b(*iChangeValue) ); }
         else if ( iChangeType == KCanBeRemoved )
             { info->SetCanBeRemoved( s2b(*iChangeValue) ); }
+        else if ( iChangeType == KPublisherId )
+            { info->SetPublisherIdL( *iChangeValue ); }
+        else if ( iChangeType == KType )
+            {
+            TBuf8<128> buf;
+            CnvUtfConverter::ConvertFromUnicodeToUtf8( buf, *iChangeValue );
+            info->SetTypeL( buf ); 
+            }
         }
     }