contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserversession.h
branchRCL_3
changeset 14 15e4dd19031c
parent 0 79c6a41cd166
child 19 edd621764147
--- a/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserversession.h	Mon Mar 15 12:41:53 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserversession.h	Wed Mar 31 22:04:35 2010 +0300
@@ -1,20 +1,19 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Server Session
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  *
-*/
-
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Server Session
+ *
+ */
 
 #ifndef C_CCPSERVERSESSION_H
 #define C_CCPSERVERSESSION_H
@@ -51,12 +50,12 @@
     /**
      * Two-phased constructor.
      */
-    static CCPServerSession* NewL( TPointersForSession& aPasser );
+    static CCPServerSession* NewL(TPointersForSession& aPasser);
 
     /**
      * Two-phased constructor.
      */
-    static CCPServerSession* NewLC( TPointersForSession& aPasser );
+    static CCPServerSession* NewLC(TPointersForSession& aPasser);
 
     /**
      * Destroy the object and release all memory objects
@@ -71,14 +70,14 @@
      * @param aMessage message from client (containing requested operation 
      * and any data)
      */
-    void ServiceL( const RMessage2& aMessage );
+    void ServiceL(const RMessage2& aMessage);
 
     /**
      * Selects correct function from message
      * @param aMessage message from client (containing requested operation 
      * and any data)
      */
-    void DispatchMessageL( const RMessage2& aMessage, TBool& aPanicedClient );
+    void DispatchMessageL(const RMessage2& aMessage, TBool& aPanicedClient);
 
 private:
     // New methods
@@ -91,69 +90,84 @@
     /**
      * Perform the second phase construction of a CCPServerSession object
      */
-    void ConstructL( TPointersForSession& aPasser );
+    void ConstructL(TPointersForSession& aPasser);
 
     /**
      * Add Data request
      * @param Message from client
      */
-    void AddDataL( const RMessage2& aMessage );
+    void AddDataL(const RMessage2& aMessage);
 
     /**
      * Specific add data request - data is not actually added to database
      * but notification is send.
      * @param Message from client
      */
-    void AddDataNonPersistentL( const RMessage2& aMessage );
+    void AddDataNonPersistentL(const RMessage2& aMessage);
 
     /**
      * Get data request - first phase
      * @param Message from client
      */
-    void GetListSizeL( const RMessage2& aMessage );
+    void GetListSizeL(const RMessage2& aMessage);
 
     /**
      * Get data request - second phase
      * @param Message from client
      */
-    void GetListDataL( const RMessage2& aMessage );
+    void GetListDataL(const RMessage2& aMessage);
 
     /**
      * Remove data request
      * @param Message from client
      */
-    void RemoveDataL( const RMessage2& aMessage );
+    void RemoveDataL(const RMessage2& aMessage);
 
     /**
      * Executes action request
      * @param Message from client
      */
-    void ExecuteActionL( const RMessage2& aMessage );
+    void ExecuteActionL(const RMessage2& aMessage);
+
+    /**
+     * Executes actions and sends notifications
+     * @param aMap input map from client
+     * @param aEnableCache indicates if action data should be cached
+     * @param aOptions command options
+     */
+    void ExecuteActionL(const CCPLiwMap* aMap,
+            TBool aEnableCache, TUint aOptions);
+    
+    /**
+     * Executes multiple actions request
+     * @param Message from client
+     */
+    void ExecuteMultipleActionsL(const RMessage2& aMessage);
 
     /**
      * Executes action request
      * @param aActionParams list with actions
      */
-    void ExecuteL( const CLiwGenericParamList& aActionParams );
+    void ExecuteL(const CLiwGenericParamList& aActionParams);
 
     /**
      * Register for notification request
      * @param Message from client
      */
-    void RegisterObserverL( const RMessage2& aMessage );
+    void RegisterObserverL(const RMessage2& aMessage);
 
     /**
      * Adds new observer
      * @param Message from client
      */
-    void AddObserverL( const RMessage2& aMessage );
+    void AddObserverL(const RMessage2& aMessage);
 
     /**
      * Removes observer
      * @param Message from client
      */
-    void RemoveObserverL( const RMessage2& aMessage );    
-    
+    void RemoveObserverL(const RMessage2& aMessage);
+
     /**
      * Unregister from notification request
      * @param Message from client
@@ -164,7 +178,7 @@
      * Send information about change in database to client
      * @param Message from client
      */
-    void GetChangeInfoDataL( const RMessage2& aMessage );
+    void GetChangeInfoDataL(const RMessage2& aMessage);
 
     /**
      * Converts CLiwGenericParamList to descriptor and
@@ -172,22 +186,22 @@
      * @param Message to complete 
      * @param Parameters for message
      */
-    void ExternalizeAndWriteToClientL( const RMessage2& aMessage,
-        const CLiwGenericParamList* outParamList );
-    
-     /**
-      * Unpacks message from client to map
-      * @param Message to complete 
-      * @return CCPLiwMap with data from client
-      */
-    CCPLiwMap* UnpackFromClientLC( const RMessage2& aMessage );
+    void ExternalizeAndWriteToClientL(const RMessage2& aMessage,
+            const CLiwGenericParamList* outParamList);
 
-     /**
-      * Send notification
-      * @param aNotificationList
-      */
-    void SendNotificationL( CCPLiwMap* aMap,
-    		CLiwDefaultList* aNotificationList ); 
+    /**
+     * Unpacks message from client to map
+     * @param Message to complete 
+     * @return CCPLiwMap with data from client
+     */
+    CCPLiwMap* UnpackFromClientLC(const RMessage2& aMessage);
+
+    /**
+     * Send notification
+     * @param aNotificationList
+     */
+    void SendNotificationL(CCPLiwMap* aMap,
+            CLiwDefaultList* aNotificationList);
 
     /**
      * Get and Execute Activate or Deactivate action from the DB 
@@ -195,14 +209,29 @@
      */
     void GetAndExecuteActionL( CCPLiwMap* aMap, CLiwDefaultList* aNotificationList,
     		TBool aInsertTrigger = EFalse );
-    
+
     /**
      * Get Server Lock
      * @return ETrue if aMessege cannot be processed
      * because Backup or Restore is running 
      **/
-    TBool GetServerLock( const RMessage2& aMessage );
-       
+    TBool GetServerLock(const RMessage2& aMessage);
+
+    /**
+     * Unpacks data for ExecuteMultipleActions from client
+     * @param Message from client
+     * @return list containing input data from the client
+     **/
+    CLiwGenericParamList* UnpackForMultiExecuteLC(const RMessage2& aMessage);
+
+    /**
+     * Checks map validity of input data and returns list 
+     * that can be used to call execute
+     * @param aMaps input data
+     * @return list containing input maps for Execute
+     **/
+    CLiwDefaultList* CheckValidityLC(const CLiwList* aMaps);
+    
 private:
 
     /*