menucontentsrv/srvinc/menusrveng.h
branchRCL_3
changeset 23 ace62b58f4b2
parent 0 79c6a41cd166
equal deleted inserted replaced
22:1b207dd38b72 23:ace62b58f4b2
    36 class CMcsSatMonitor;
    36 class CMcsSatMonitor;
    37 class CMcsDrmHandler;
    37 class CMcsDrmHandler;
    38 class CMcsCacheHandler;
    38 class CMcsCacheHandler;
    39 class CMcsChildrenHandler;
    39 class CMcsChildrenHandler;
    40 class CMcsRunningAppsHandler;
    40 class CMcsRunningAppsHandler;
    41 class CMcsSuiteHandler;
       
    42 class CMcsGetlistHandler;
    41 class CMcsGetlistHandler;
    43 /**
    42 /**
    44 * In release code the macro must be undefined and application 
    43 * In release code the macro must be undefined and application
    45 * scanning must be enabled!
    44 * scanning must be enabled!
    46 * Define the macro only for testing purposes!
    45 * Define the macro only for testing purposes!
    47 */
    46 */
    48 #undef __TEST_DISABLE_APPSCAN
    47 #undef __TEST_DISABLE_APPSCAN
    49 
    48 
   124     * Remove a session. Safe to call if not added.
   123     * Remove a session. Safe to call if not added.
   125     * When no more sessions remain dependent on this object, timed
   124     * When no more sessions remain dependent on this object, timed
   126     * self-deletion is scheduled.
   125     * self-deletion is scheduled.
   127     */
   126     */
   128     void RemoveSession( CMenuSrvSession* aSession );
   127     void RemoveSession( CMenuSrvSession* aSession );
   129     
   128 
   130     
   129 
   131     /**
   130     /**
   132     * Get attribute name list.
   131     * Get attribute name list.
   133     * @since S60 v5.0
   132     * @since S60 v5.0
   134     * @param aList Attribute name list.
   133     * @param aList Attribute name list.
   135     * @throws System-wide error codes if an error occurs.
   134     * @throws System-wide error codes if an error occurs.
   136     * @panic None.
   135     * @panic None.
   137     * 
   136     *
   138     */
   137     */
   139     void GetAttributeListL(
   138     void GetAttributeListL(
   140   		  TInt aId,
   139   		  TInt aId,
   141   		  RArray<TPtrC>& aList );
   140   		  RArray<TPtrC>& aList );
   142     
   141 
   143     /**
   142     /**
   144     * Get attribute value.
   143     * Get attribute value.
   145     * @since S60 v5.0
   144     * @since S60 v5.0
   146     * @param aAttrName Attribute name.
   145     * @param aAttrName Attribute name.
   147     * @param aAttrExists Will be set to indicate whether attribute exists
   146     * @param aAttrExists Will be set to indicate whether attribute exists
   148     * or not.
   147     * or not.
   149     * @return Attribute value. Empty string if attribute does not exist.
   148     * @return Attribute value. Empty string if attribute does not exist.
   150     */
   149     */
   151     TPtrC GetAttributeL( TInt aId, const TDesC& aAttrName, TBool& aAttrExists );
   150     TPtrC GetAttributeL( TInt aId, const TDesC& aAttrName, TBool& aAttrExists );
   152 
   151 
   153     void GetAttributeL( TInt aId, const TDesC& aAttrName, 
   152     void GetAttributeL( TInt aId, const TDesC& aAttrName,
   154         TBool& aAttrExists, TDes& aAttrVal );
   153         TBool& aAttrExists, TDes& aAttrVal );
   155 
   154 
   156     //TODO: Add comment
       
   157     TBool InstalledSuiteExist( const TDesC& aSuiteName );
       
   158     
       
   159     //TODO: Add comment
       
   160     void GetSuiteAttribute( const TDesC& aSuiteName, const TDesC& aAttrName, 
       
   161             TBool& aAttrExists, TDes& aAttrVal );
       
   162     
       
   163      /**
   155      /**
   164      * Get array of running apps 
   156      * Get array of running apps
   165      * 
   157      *
   166      */
   158      */
   167     void GetRunningAppsL(  RArray<TUid>& aArray );
   159     void GetRunningAppsL(  RArray<TUid>& aArray );
   168 
   160 
   169     
   161 
   170     /**
   162     /**
   171      * Fetches children count for a folder
   163      * Fetches children count for a folder
   172      */
   164      */
   173     TUint GetChildrenCountL( TInt aId );
   165     TUint GetChildrenCountL( TInt aId );
   174     
   166 
   175     /**
   167     /**
   176     * Builds output list for GetList operation and returns result
   168     * Builds output list for GetList operation and returns result
   177     * @param aSerializedInput serialized list with input parameters
   169     * @param aSerializedInput serialized list with input parameters
   178     * 	for GetList operation
   170     * 	for GetList operation
   179     * @return size of output list
   171     * @return size of output list
   183     /**
   175     /**
   184     * Returns serialized list containing result of GetList oepration
   176     * Returns serialized list containing result of GetList oepration
   185     * @return serialized output list
   177     * @return serialized output list
   186     */
   178     */
   187     TPtrC8 GetListDataL( );
   179     TPtrC8 GetListDataL( );
   188     
   180 
   189     /**
   181     /**
   190     * Closes output buffer.
   182     * Closes output buffer.
   191     */
   183     */
   192     void CloseOutputBuffer( );
   184     void CloseOutputBuffer( );
   193     
   185 
   194     /**
   186     /**
   195     * Cleans attribute cache. Used in case of no memory.
   187     * Cleans attribute cache. Used in case of no memory.
   196     */
   188     */
   197     void CleanAttributeCache( );
   189     void CleanAttributeCache( );
   198 
   190 
   199 private:    // from MMenuEngObserver
   191 private:    // from MMenuEngObserver
   200 
   192 
   201 
   193 
   202     void GetExtendedAttributesL( TInt aId, const TDesC& aAttrName, 
   194     void GetExtendedAttributesL( TInt aId, const TDesC& aAttrName,
   203         TBool& aAttrExists, TDes& aAttrVal );
   195         TBool& aAttrExists, TDes& aAttrVal );
   204     
   196 
   205     void AddToCacheL( TInt aId, const TDesC& aAttrName, TDes& aAttrVal );
   197     void AddToCacheL( TInt aId, const TDesC& aAttrName, TDes& aAttrVal );
   206     
   198 
   207 
   199 
   208     /**
   200     /**
   209     * Fetches an application native attribute value. 
   201     * Fetches an application native attribute value.
   210     * @param aId item id.
   202     * @param aId item id.
   211     * @param aAttrExists ETrue if attribute exist.
   203     * @param aAttrExists ETrue if attribute exist.
   212     * @param aAttrVal attribute value.
   204     * @param aAttrVal attribute value.
   213     */
   205     */
   214     void ApplicationNativeAttributeL(
   206     void ApplicationNativeAttributeL(
   215     		TInt aId, 
   207     		TInt aId,
   216     		TBool & aAttrExists,
   208     		TBool & aAttrExists,
   217     		TDes & aAttrVal );
   209     		TDes & aAttrVal );
   218     
   210 
   219     /**
   211     /**
   220     * Engine event. Dispatch events to all dependent sessions.
   212     * Engine event. Dispatch events to all dependent sessions.
   221     * @param aFolder Events relate to this folder. May be 0.
   213     * @param aFolder Events relate to this folder. May be 0.
   222     * @param aEvents Events.
   214     * @param aEvents Events.
   223     */
   215     */
   226     /**
   218     /**
   227     * Unrecoverable engine error. Dispatch to all dependent sessions.
   219     * Unrecoverable engine error. Dispatch to all dependent sessions.
   228     * @param aErr Error code.
   220     * @param aErr Error code.
   229     */
   221     */
   230     void EngineError( TInt aErr );
   222     void EngineError( TInt aErr );
   231     
   223 
   232     /**
   224     /**
   233      * Engine tree reload event.
   225      * Engine tree reload event.
   234      * Run appscanner again.
   226      * Run appscanner again.
   235      */
   227      */
   236     void EngineTreeReloaded();
   228     void EngineTreeReloaded();
   237     /**
   229     /**
   238     * Fetches an attribute value from the caption info attributes
   230     * Fetches an attribute value from the caption info attributes
   239     */
   231     */
   240     void CaptionInfoL( TInt aId, const TDesC& aAttrName, 
   232     void CaptionInfoL( TInt aId, const TDesC& aAttrName,
   241         TBool& aExists, TDes& aAttrVal );
   233         TBool& aExists, TDes& aAttrVal );
   242     
   234 
   243 	
   235 
   244     /**
   236     /**
   245     * Fetches an attribute value from the skin icon info attributes
   237     * Fetches an attribute value from the skin icon info attributes
   246     */
   238     */
   247     void SkinInfoL( TInt aId, TInt aSelect, TBool& aExists, TDes& aAttrVal  );
   239     void SkinInfoL( TInt aId, TInt aSelect, TBool& aExists, TDes& aAttrVal  );
   248     
   240 
   249     /**
   241     /**
   250     * Fetches the DRM protection attribute value
   242     * Fetches the DRM protection attribute value
   251     */
   243     */
   252     void AppDrmProtectionL( TInt aId, TBool& aExists, TDes& aAttrVal );
   244     void AppDrmProtectionL( TInt aId, TBool& aExists, TDes& aAttrVal );
   253     
   245 
   254     /**
   246     /**
   255     * Fetches an attribute value from the caption info attributes for application
   247     * Fetches an attribute value from the caption info attributes for application
   256     */
   248     */
   257     TPtrC AppCaptionInfoL( const CMenuEngObject& aEngObj,
   249     TPtrC AppCaptionInfoL( const CMenuEngObject& aEngObj,
   258         const TDesC& aAttrName, TBool& aExists );
   250         const TDesC& aAttrName, TBool& aExists );
   259 
   251 
   260     /**
   252     /**
   261      * Fetches the children_count attribute value (for folders)
   253      * Fetches the children_count attribute value (for folders)
   262      */
   254      */
   263     void FolderChildrenCountL( TInt aId, TBool& aExists, TDes& aAttrVal );
   255     void FolderChildrenCountL( TInt aId, TBool& aExists, TDes& aAttrVal );
   264     
   256 
   265     /**
   257     /**
   266     * Fetches the running status for application and folder
   258     * Fetches the running status for application and folder
   267     */
   259     */
   268     void GetAppRunningL( TInt aId, TBool& aExists, TDes& aAttrVal );
   260     void GetAppRunningL( TInt aId, TBool& aExists, TDes& aAttrVal );
   269     
   261 
   270     /**
   262     /**
   271     * Appends extended attributes to attributes list
   263     * Appends extended attributes to attributes list
   272     */
   264     */
   273     void AppendExtendedAttrributesL(
   265     void AppendExtendedAttrributesL(
   274     		const TDesC& aType,  
   266     		const TDesC& aType,
   275     		RArray<TPtrC>& aList );
   267     		RArray<TPtrC>& aList );
   276 
   268 
   277 
   269 
   278 private:    // Data
   270 private:    // Data
   279 
   271 
   288     CMcsSatMonitor* iMcsSatMonitor;
   280     CMcsSatMonitor* iMcsSatMonitor;
   289     CMcsDrmHandler* iDrmHander;
   281     CMcsDrmHandler* iDrmHander;
   290     CMcsRunningAppsHandler* iRunningAppsHandler;//own
   282     CMcsRunningAppsHandler* iRunningAppsHandler;//own
   291     CMcsCacheHandler* iCacheHandler;
   283     CMcsCacheHandler* iCacheHandler;
   292     CMcsChildrenHandler* iChildrenHandler;
   284     CMcsChildrenHandler* iChildrenHandler;
   293     CMcsSuiteHandler* iSuiteHandler;
       
   294     CMcsGetlistHandler* iGetlistHandler;
   285     CMcsGetlistHandler* iGetlistHandler;
   295     };
   286     };
   296 
   287 
   297 #ifdef __TEST_DISABLE_APPSCAN
   288 #ifdef __TEST_DISABLE_APPSCAN
   298 #pragma message("Undefine __TEST_DISABLE_APPSCAN !")
   289 #pragma message("Undefine __TEST_DISABLE_APPSCAN !")