contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserverdatamanager.h
branchRCL_3
changeset 19 edd621764147
parent 14 15e4dd19031c
equal deleted inserted replaced
16:b276298d5729 19:edd621764147
    51     ~CCPDataManager();
    51     ~CCPDataManager();
    52 
    52 
    53     /**
    53     /**
    54      * Two-phased constructor.
    54      * Two-phased constructor.
    55      */
    55      */
    56     static CCPDataManager* NewL( TBool aTBool = EFalse );
    56     static CCPDataManager* NewL(TLiwVariant& aDataMapCache, TBool aTBool =
       
    57             EFalse);
    57 
    58 
    58     /**
    59     /**
    59      * Two-phased constructor.
    60      * Two-phased constructor.
    60      */
    61      */
    61     static CCPDataManager* NewLC( TBool aTBool = EFalse );
    62     static CCPDataManager* NewLC(TLiwVariant& aDataMapCache, TBool aTBool =
       
    63             EFalse);
    62 
    64 
    63     /**
    65     /**
    64      * Add a new data to database
    66      * Add a new data to database
    65      *
    67      *
    66      * @param aData Data to be added.
    68      * @param aData Data to be added.
   134     void CloseDatabase();
   136     void CloseDatabase();
   135     /**
   137     /**
   136      * Open database 
   138      * Open database 
   137      * @return 
   139      * @return 
   138      */
   140      */
   139     void OpenDatabaseL();
   141     void OpenDatabaseL(TLiwVariant& aDataMapCache);
   140 
   142 
   141 private:
   143 private:
   142     // methods
   144     // methods
   143 
   145 
   144     /**
   146     /**
   147     CCPDataManager();
   149     CCPDataManager();
   148 
   150 
   149     /**
   151     /**
   150      * Standard 2nd phase constructor.
   152      * Standard 2nd phase constructor.
   151      */
   153      */
   152     void ConstructL( TBool aTBool );
   154     void ConstructL( TLiwVariant& aDataMapCache, TBool aTBool );
   153 
   155 
   154     /**
   156     /**
   155      * Fetches action bound to provided trigger.
   157      * Fetches action bound to provided trigger.
   156      *
   158      *
   157      * @param aOutParamList of all actions
   159      * @param aOutParamList of all actions
   178     
   180     
   179     /**
   181     /**
   180      * Fills aOutParamList with parameters for action.
   182      * Fills aOutParamList with parameters for action.
   181      *
   183      *
   182      * @param aOutParamList parsed list of items
   184      * @param aOutParamList parsed list of items
   183      * @param aParamList list of items from data base
   185      * @param aActionMap action map from the database
   184      * @param aActionTrigger action trigger
   186      * @param aActionTrigger action trigger
   185      */
   187      */
   186     void FillActionParamListL(
   188     void FillActionParamListL(
   187     		CLiwGenericParamList & aOutParamList, 
   189     		CLiwGenericParamList & aOutParamList, 
   188     		const TLiwGenericParam* aParam,
   190             const CLiwDefaultMap* aActionMap,
   189     		const CLiwDefaultList* aActionTriggers);
   191     		const CLiwDefaultList* aActionTriggers);
   190 
   192 
   191      /**
   193      /**
   192      * Creates map for GetList request - publisher, content_type
   194      * Creates map for GetList request - publisher, content_type
   193      * and content_id are copied from aMap to returned map
   195      * and content_id are copied from aMap to returned map
   206     TBool GetActivateInfoL( const CCPLiwMap* aMap );
   208     TBool GetActivateInfoL( const CCPLiwMap* aMap );
   207     
   209     
   208     /**
   210     /**
   209     * Builds change info list based on query result to database
   211     * Builds change info list based on query result to database
   210     * @param aMap - map containing parameters needed to build change info list
   212     * @param aMap - map containing parameters needed to build change info list
   211     * @param aParam - param from getlist result 
   213     * @param aParam - param from getlist result     
       
   214     * @param aActionMap - action map from a database 
   212     * @param aChangeInfoList - output list containing change info list sent
   215     * @param aChangeInfoList - output list containing change info list sent
   213     * as notification
   216     * as notification
   214     */
   217     */
   215     void BuildChangeInfoL( 
   218     void BuildChangeInfoL( 
   216     		const CCPLiwMap* aMap, 
   219     		const CCPLiwMap* aMap, 
   217     		const CLiwDefaultList* aActionTriggers,
   220     		const CLiwDefaultList* aActionTriggers,
   218     		const TLiwGenericParam* aParam,	
   221     		const TLiwGenericParam* aParam,	
       
   222     		const CLiwDefaultMap* aActionMap,
   219     		CLiwDefaultList* aChangeInfoList );
   223     		CLiwDefaultList* aChangeInfoList );
       
   224   
   220     /**
   225     /**
   221     * Builds change info list when query to database returned nothing
   226     * Builds change info list when query to database returned nothing
   222     * @param aMap - map containing parameters needed to build change info list
   227     * @param aMap - map containing parameters needed to build change info list
   223     * @param aChangeInfoList - output list containing change info list sent
   228     * @param aChangeInfoList - output list containing change info list sent
   224     * as notification
   229     * as notification
   280     /*
   285     /*
   281      * Action data cache
   286      * Action data cache
   282      * Own.
   287      * Own.
   283      */
   288      */
   284     CCPActionDataCache* iActionDataCache;
   289     CCPActionDataCache* iActionDataCache;
   285 
       
   286     
   290     
   287 #ifdef CONTENT_PUBLISHER_DEBUG
   291 #ifdef CONTENT_PUBLISHER_DEBUG
   288     CCPDebug* iDebug;
   292     CCPDebug* iDebug;
   289 #endif
   293 #endif
   290     };
   294     };