idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h
branchRCL_3
changeset 14 15e4dd19031c
parent 1 844b978f8d5e
child 16 b276298d5729
equal deleted inserted replaced
12:502e5d91ad42 14:15e4dd19031c
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 #ifndef CMCSPLUGINSETTINGSBKMLIST_H
    19 #ifndef CMCSPLUGINSETTINGSBKMLIST_H
    20 #define CMCSPLUGINSETTINGSBKMLIST_H
    20 #define CMCSPLUGINSETTINGSBKMLIST_H
    21 
    21 
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include <bamdesca.h>               // For MDesCArray
    23 #include <bamdesca.h>               // For MDesCArray
    24 #include <favouritesdbobserver.h>   // For MFavouritesDbObserver
       
    25 #include <favouritesdb.h>           // For RFavouritesDb
    24 #include <favouritesdb.h>           // For RFavouritesDb
    26 #include <favouritesitemlist.h>     // For CFavouritesItemList
       
    27 #include <mcsmenu.h>                // For MenuContentService
    25 #include <mcsmenu.h>                // For MenuContentService
    28 
    26 #include <propertymap.h>
    29 class CActiveFavouritesDbNotifier;
    27 
    30 class CAiScutSettingsItem;
       
    31 class CMCSPluginSettingsModel;
       
    32 class CMCSPluginWatcher;
       
    33 struct TSettingItem;
    28 struct TSettingItem;
    34 /**
    29 /**
    35  *  @ingroup group_mcsplugin
    30  *  @ingroup group_mcsplugin
    36  *
    31  *
    37  * Bookmark list for settings listbox
    32  * Bookmark list for settings listbox
   108      * @since S60 v3.2
   103      * @since S60 v3.2
   109      * @param aIndex Index of the bookmark in the list
   104      * @param aIndex Index of the bookmark in the list
   110      * @param aParams On return, the bookmark parameters
   105      * @param aParams On return, the bookmark parameters
   111      * @param aCaption On return, the bookmark caption
   106      * @param aCaption On return, the bookmark caption
   112      * @return KErrNotFound if the bookmark cannot be found, KErrNone otherwise
   107      * @return KErrNotFound if the bookmark cannot be found, KErrNone otherwise
   113      */
   108      */    
   114     //TInt GetDataByIndex(TInt aIndex, TPtrC& aParams, TPtrC& aCaption) const;
       
   115     
       
   116     TSettingItem FindItemL( 
   109     TSettingItem FindItemL( 
   117         RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties );
   110         RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties );
   118     
   111 
   119     /**
       
   120      * Remove menu item
       
   121      * 
       
   122      * @param aIndex 
       
   123      */
       
   124     void RemoveMenuItemL( TInt aIndex );
       
   125 
   112 
   126 protected:
   113 protected:
   127 
   114 
   128 private:
   115 private:
   129 
   116 
   143      * @since S60 v3.2
   130      * @since S60 v3.2
   144      * @param aBkmInfo Bookmark information object
   131      * @param aBkmInfo Bookmark information object
   145      */
   132      */
   146     void AddBookmarkL( const TDesC&  aUid, const TDesC& aCaption, 
   133     void AddBookmarkL( const TDesC&  aUid, const TDesC& aCaption, 
   147         const TDesC& aUrl, TBookmarkType aType );
   134         const TDesC& aUrl, TBookmarkType aType );
   148 
       
   149     /**
       
   150      * Updates the bookmark list
       
   151      *
       
   152      * @since S60 v3.2
       
   153      */
       
   154     void UpdateBkmListL();
       
   155 
   135 
   156     /**
   136     /**
   157      * Get bookmarks from favourites
   137      * Get bookmarks from favourites
   158      */
   138      */
   159     void GetBookmarksFromFavouritesL();
   139     void GetBookmarksFromFavouritesL();
   182      * @param aUrl
   162      * @param aUrl
   183      * @return pointer to the CMenuItem object
   163      * @return pointer to the CMenuItem object
   184      */
   164      */
   185     CMenuItem* MCSMenuItemL( const TDesC& aUid,const TDesC& aName,
   165     CMenuItem* MCSMenuItemL( const TDesC& aUid,const TDesC& aName,
   186         const TDesC& aUrl );
   166         const TDesC& aUrl );
   187 
       
   188     /**
       
   189      * GetMCSPluginFolderIdL
       
   190      * 
       
   191      * @return TInt
       
   192      */
       
   193     TInt GetMCSPluginFolderIdL();
       
   194 
       
   195     /**
       
   196      * UpdateMenuItemsRefCountL
       
   197      * 
       
   198      * @param aItem
       
   199      * @param aValueToAdd
       
   200      * @return TInt
       
   201      */
       
   202     TInt UpdateMenuItemsRefCountL( CMenuItem* aItem, TInt aValueToAdd );
       
   203 
       
   204 
   167 
   205 private:
   168 private:
   206 
   169 
   207     /**
   170     /**
   208      * Nested class to store individual bookmark list items
   171      * Nested class to store individual bookmark list items
   287          * @param aUid
   250          * @param aUid
   288          * @param aCaption
   251          * @param aCaption
   289          */
   252          */
   290         void ConstructL( const TDesC&  aUid, const TDesC& aCaption);
   253         void ConstructL( const TDesC&  aUid, const TDesC& aCaption);
   291 
   254 
   292     private:  // data
       
   293 
       
   294 
       
   295     };
   255     };
   296 
   256 
   297 private:  // data
   257 private:  // data
   298 
   258 
   299     /**
   259     /**
   300      * List of bookmark items
   260      * List of bookmark items
   301      * Own.
   261      * Own.
   302      */
   262      */
   303     RPointerArray<CBkmListItem> iListItems;
   263     RPointerArray<CBkmListItem> iListItems;
   304 
   264 
   305     // Runtime created CMenuItems must be stored, because those are refered 
   265     /**
       
   266      * Runtime created CMenuItems must be stored,
       
   267      * because those are refered later, own.  
       
   268      */
   306     RPointerArray<CMenuItem> iMenuItems;
   269     RPointerArray<CMenuItem> iMenuItems;
   307 
   270 
   308     /**
   271     /**
   309      * A flag indicating if the bookmark list should observe changes
       
   310      */
       
   311     TBool iObserving;
       
   312 
       
   313     /**
       
   314      * Bookmark database session.
   272      * Bookmark database session.
   315      * Own.
   273      * Own.
   316      */
   274      */
   317     RFavouritesSession iBookmarkSess;
   275     RFavouritesSession iBookmarkSess;
   318 
   276 
   322      */
   280      */
   323     RFavouritesDb iBookmarkDb;
   281     RFavouritesDb iBookmarkDb;
   324 
   282 
   325     /**
   283     /**
   326      * iMenu
   284      * iMenu
       
   285      * Own.
   327      */
   286      */
   328     RMenu iMenu;
   287     RMenu iMenu;
   329 
       
   330     /**
       
   331      * Save watcher
       
   332      */
       
   333 
       
   334     CMCSPluginWatcher* iSaveWatcher;
       
   335 
       
   336     /**
       
   337      * Update watcher
       
   338      */
       
   339     CMCSPluginWatcher* iUpdateWatcher;
       
   340 
       
   341     /**
       
   342      * Remove watcher
       
   343      */
       
   344     CMCSPluginWatcher* iRemoveWatcher;
       
   345 
       
   346     /**
       
   347      * MCS plugin folder ID
       
   348      */
       
   349     TInt iMCSPluginFolderId;
       
   350 
       
   351 };
   288 };
   352 
   289 
   353 #endif // CMCSPLUGINSETTINGSBKMLIST_H
   290 #endif // CMCSPLUGINSETTINGSBKMLIST_H
   354 
   291 
   355 // End of File.
   292 // End of File.