idlehomescreen/nativeuicontroller/src/ainotifierrenderer.cpp
branchRCL_3
changeset 9 f966699dea19
parent 0 f72a12da539e
--- a/idlehomescreen/nativeuicontroller/src/ainotifierrenderer.cpp	Tue Feb 02 00:04:13 2010 +0200
+++ b/idlehomescreen/nativeuicontroller/src/ainotifierrenderer.cpp	Fri Feb 19 22:42:37 2010 +0200
@@ -15,23 +15,31 @@
 *
 */
 
+// System includes 
+#include <e32property.h>
 
-#include <e32property.h>
+// User includes
+#include <hscontentpublisher.h>
+#include <hspublisherinfo.h>
 #include <activeidle2domainpskeys.h>
-#include <aipropertyextension.h>
-
 #include <AiNativeUi.rsg>
-
 #include "ainotifierrenderer.h"
 #include "ainativeuiplugins.h"
 
 using namespace AiNativeUiController;
 
+// Constants
+
 // 1-minute timeout before showing soft notification
 const TInt KNetworkLostTimeout = 60*1000000;
 
 // ======== MEMBER FUNCTIONS ========
 
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::NewLC()
+//
+// ----------------------------------------------------------------------------
+//
 CAiNotifierRenderer* CAiNotifierRenderer::NewLC()
     {
     CAiNotifierRenderer* self = new( ELeave ) CAiNotifierRenderer;
@@ -40,30 +48,48 @@
     return self;
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::~CAiNotifierRenderer()
+//
+// ----------------------------------------------------------------------------
+//
 CAiNotifierRenderer::~CAiNotifierRenderer()
     {
     delete iSoftNotifier;
     delete iTimer;
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::CAiNotifierRenderer()
+//
+// ----------------------------------------------------------------------------
+//
 CAiNotifierRenderer::CAiNotifierRenderer()
     {
     }
 
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::ConstructL()
+//
+// ----------------------------------------------------------------------------
+//
 void CAiNotifierRenderer::ConstructL()
     {
     iSoftNotifier = CAknSoftNotifier::NewL();
     iTimer = CPeriodic::NewL( CActive::EPriorityStandard );
     }
 
-void CAiNotifierRenderer::DoPublishL( MAiPropertyExtension& aPlugin,
-                                    TInt aContent,
-                                    TInt aResource,
-                                    TInt /*aIndex*/  )
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::DoPublishL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiNotifierRenderer::DoPublishL( CHsContentPublisher& aPlugin,
+    TInt aContent, TInt aResource, TInt /*aIndex*/ )                                                                       
     {
-    if( aPlugin.PublisherInfoL()->iUid == KDeviceStatusPluginUid )
+    const THsPublisherInfo& info( aPlugin.PublisherInfo() );
+    
+    if( info.Uid() == KDeviceStatusPluginUid )
     	{
 	    switch( aContent )
 	        {
@@ -90,7 +116,7 @@
 	            User::Leave( KErrNotFound );
 	            break;
 	            }
-	        };
+	        }
     	}
     else
    		{
@@ -98,8 +124,13 @@
    		}
     }
 
-void CAiNotifierRenderer::DoCleanL( MAiPropertyExtension& /*aPlugin*/,
-                                    TInt aContent )
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::DoCleanL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiNotifierRenderer::DoCleanL( CHsContentPublisher& /*aPlugin*/,
+    TInt aContent )
     {
     switch( aContent )
         {
@@ -114,30 +145,47 @@
             User::Leave( KErrNotFound );
             break;
             }
-        };
-
+        }
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::AddNotification()
+//
+// ----------------------------------------------------------------------------
+//
 void CAiNotifierRenderer::AddNotification( TAknSoftNotificationType aType )
     {
-    TRAP_IGNORE( iSoftNotifier->AddNotificationL( aType, 1 ); );
+    TRAP_IGNORE( iSoftNotifier->AddNotificationL( aType, 1 ) );
     }
 
-void CAiNotifierRenderer::RemoveNotification( TAknSoftNotificationType aType)
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::RemoveNotification()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiNotifierRenderer::RemoveNotification( TAknSoftNotificationType aType )
     {
     TRAP_IGNORE( iSoftNotifier->CancelSoftNotificationL( aType ); );
     }
 
-TInt CAiNotifierRenderer::NWLostDelayCallBack(TAny* aParam)
+// ----------------------------------------------------------------------------
+// CAiNotifierRenderer::NWLostDelayCallBack()
+//
+// ----------------------------------------------------------------------------
+//
+TInt CAiNotifierRenderer::NWLostDelayCallBack( TAny* aParam )
     {
-    CAiNotifierRenderer* self = reinterpret_cast<CAiNotifierRenderer *> (aParam);
-    if ( self )
+    CAiNotifierRenderer* self = 
+        reinterpret_cast< CAiNotifierRenderer* >( aParam );
+    
+        if ( self )
         {
         self->iTimer->Cancel();
         self->AddNotification( ESelectNetworkNotification );
         }
+        
     return KErrNone;
     }
 
+// End of file