homescreensrv_plat/sapi_contentpublishing/src/cpclient.cpp
branchRCL_3
changeset 51 15e4dd19031c
parent 18 bd874ee5e5e2
child 74 edd621764147
--- a/homescreensrv_plat/sapi_contentpublishing/src/cpclient.cpp	Mon Mar 15 12:41:53 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/src/cpclient.cpp	Wed Mar 31 22:04:35 2010 +0300
@@ -96,6 +96,7 @@
     CLiwGenericParamList& aOutParamList )
     {
     CP_DEBUG( _L8("CCPClient::GetListL()") );
+    CP_EXTENDED_DEBUG( "GetListL()" , aInParamList );
     CheckMapL( aInParamList, KFilter );
     CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList );
     inMapForServer->PushL( );
@@ -113,6 +114,7 @@
                       TUint aCmdOptions )
     {
     CP_DEBUG( _L8("CCPClient::AddL()") );
+    CP_EXTENDED_DEBUG( "Add()" , aInParamList );
     CheckMapL( aInParamList, KItem );
     CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList ) ;
     inMapForServer->PushL( );
@@ -128,6 +130,7 @@
 void CCPClient::DeleteL( const CLiwGenericParamList& aInParamList )
     {
     CP_DEBUG( _L8("CCPClient::DeleteL()") );
+    CP_EXTENDED_DEBUG( "Delete()" , aInParamList );
     CheckMapL( aInParamList, KData );
     CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList );
     inMapForServer->PushL( );
@@ -144,6 +147,7 @@
     const CLiwGenericParamList& aInParamList, TInt32 aTransactionId )
     {
     CP_DEBUG( _L8("CCPClient::RegisterObserverL()") );
+    CP_EXTENDED_DEBUG( "RegisterObserver()" , aInParamList );
     CheckMapL( aInParamList, KFilter );
     CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList );
     inMapForServer->PushL( );
@@ -163,6 +167,7 @@
 void CCPClient::UnregisterObserversL( const CLiwGenericParamList& aInParamList )
     {
     CP_DEBUG( _L8("CCPClient::UnregisterObservers()") );
+    CP_EXTENDED_DEBUG( "UnregisterObservers()" , aInParamList );
     if ( !iActiveNotifier )
         {
         User::Leave( KErrNotFound );
@@ -198,7 +203,8 @@
 void CCPClient::ExecuteActionL( const CLiwGenericParamList& aInParamList,
         TUint aCmdOptions)
     {
-    CP_DEBUG( _L8("CCPClient::RegisterObserverL()") );
+    CP_DEBUG( _L8("CCPClient::ExecuteActionL()") );
+    CP_EXTENDED_DEBUG( "ExecuteAction()" , aInParamList );
     CheckMapL( aInParamList, KFilter );
     CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList );
     inMapForServer->PushL( );
@@ -211,6 +217,19 @@
 // 
 // -----------------------------------------------------------------------------
 //    
+void CCPClient::ExecuteMultipleActionsL(
+        const CLiwGenericParamList& aInParamList, TUint aCmdOptions)
+    {
+    CP_DEBUG( _L8("CCPClient::ExecuteMultipleActionsL()") );
+    CP_EXTENDED_DEBUG( "ExecuteMultipleActionsL()" , aInParamList );
+    CheckMultiExecuteInputParamsL(aInParamList);
+    iServerClient.ExecuteMultipleActionsL( aInParamList, aCmdOptions );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//    
 void CCPClient::CheckMapL( const CLiwGenericParamList& aInParamList, 
         const TDesC8& aKey )
     {
@@ -225,3 +244,20 @@
             }
         }
     }
+
+// -----------------------------------------------------------------------------
+//
+// --------------- --------------------------------------------------------------
+//
+void CCPClient::CheckMultiExecuteInputParamsL(
+        const CLiwGenericParamList& aList)
+    {
+    const TLiwGenericParam* param = NULL;
+    TInt pos(0);
+    param = aList.FindFirst(pos, KFilters);
+    User::LeaveIfError(pos); //leaves if not found
+    if (param->Value().TypeId() != LIW::EVariantTypeList)
+        {
+        User::Leave(KErrBadName);
+        }
+    }