phonebookui/Phonebook2/ServerApplication/src/TPbk2ServerMessageDataRetriever.cpp
branchRCL_3
changeset 57 2666d9724c76
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/phonebookui/Phonebook2/ServerApplication/src/TPbk2ServerMessageDataRetriever.cpp	Mon Jun 21 15:24:27 2010 +0300
+++ b/phonebookui/Phonebook2/ServerApplication/src/TPbk2ServerMessageDataRetriever.cpp	Thu Jul 15 18:22:55 2010 +0300
@@ -64,6 +64,7 @@
 const TInt KAddressSelectFilterBuffer( 2 );
 const TInt KContactViewFilterBuffer( 3 );
 const TInt KTitlePaneTextPosition( 4 );
+const TInt KStatusPaneIdPosition( 5 );
 const TInt KDefaultPrioritiesPosition( 2 );
 const TInt KOrientationType( 5 );
 
@@ -511,6 +512,7 @@
 
         CleanupStack::PopAndDestroy( &readStream );
         CleanupStack::PopAndDestroy( configuration );
+        
         }
 
     return titlePaneText;
@@ -910,5 +912,41 @@
         }
     return orientationType;
     }
+
+// --------------------------------------------------------------------------
+// TPbk2ServerMessageDataRetriever::GetStatusPaneIdL
+// --------------------------------------------------------------------------
+//
+TInt TPbk2ServerMessageDataRetriever::GetStatusPaneIdL
+        ( const RMessage2& aMessage ) const
+    {
+    TInt statusPaneId( 0 );
+    HBufC8* statusPaneIdInText = NULL;
+    TInt length = aMessage.GetDesLengthL( KConfigurationPackageSlot );
+    
+    if ( length > 0 )
+        {
+        HBufC8* configuration = HBufC8::NewLC( length );
+        TPtr8 ptr = configuration->Des();
+        aMessage.ReadL( KConfigurationPackageSlot, ptr );
+        RDesReadStream readStream( ptr );
+        readStream.PushL();
+
+        TRAPD( error, Pbk2IPCPackage::InternalizeL
+            ( statusPaneIdInText, readStream, KStatusPaneIdPosition ) );        
+        
+        if ( KErrNone == error && statusPaneIdInText )
+            {
+            TLex8 aLex(*statusPaneIdInText);        
+            error = aLex.Val( statusPaneId );
+            delete statusPaneIdInText;
+            }
+            
+        CleanupStack::PopAndDestroy( &readStream );
+        CleanupStack::PopAndDestroy( configuration );
+        }
+
+    return statusPaneId;
+    }
     
 // End of File