messagingappbase/smartmessaging/wmlbc/inc/WmlItemEngine.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     Item Engine owns the setting items.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CWMLITEMENGINE_H
       
    22 #define CWMLITEMENGINE_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CParsedField;
       
    29 class CWmlSubItemBase;
       
    30 class CAknWaitDialog;
       
    31 class MProgressDialogCallback;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * CWmlItemEngine owns the individual setting items.
       
    37 * It provides methods for manipulating them.
       
    38 */
       
    39 NONSHARABLE_CLASS( CWmlItemEngine )
       
    40 : public CBase
       
    41     {
       
    42     public: // construction / destruction
       
    43 
       
    44         /**
       
    45         * First stage constructor.
       
    46         */
       
    47         static CWmlItemEngine* NewL();
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         */  
       
    52         ~CWmlItemEngine();
       
    53     
       
    54     public:
       
    55 
       
    56         /**
       
    57         * Create the item arrays.
       
    58         * @param aParseFields reference to the parsedfields array.
       
    59         */
       
    60         void CreateItemArraysL( const CArrayPtrSeg<CParsedField>& aParsedFields );
       
    61 
       
    62     public:
       
    63                 
       
    64       
       
    65         /**
       
    66         * Get the bookmark count.
       
    67         * @return Number of Bookmark setting items.
       
    68         */
       
    69         TInt BookmarkCount() const;
       
    70 
       
    71         /**
       
    72         * Get the Current item.
       
    73         * @return reference to the current item.
       
    74         */
       
    75         CWmlSubItemBase& CurrentItem() const;
       
    76 
       
    77         /**
       
    78         * Set the current item.
       
    79         * @param aIndex index of the current item.
       
    80         */
       
    81         void SetCurrentItem( const TInt aIndex );
       
    82 
       
    83         void SaveCurrentItemL();
       
    84 
       
    85     private:
       
    86         
       
    87         /**
       
    88         * The second phase constructor.
       
    89         */        
       
    90         void ConstructL();
       
    91 
       
    92 		/**
       
    93 		* Checks the available disk space.
       
    94 		* If the current disk space is below critical level
       
    95 		* leaves with KErrDiskFull
       
    96 		*/
       
    97 		void CheckDiskSpaceL();
       
    98 
       
    99     private: // Data
       
   100         
       
   101         /// Pointer to the current item
       
   102         CWmlSubItemBase* iCurrentItem;
       
   103         
       
   104     private:
       
   105 
       
   106         /// This arrays own the objects.
       
   107         CArrayPtrSeg<CWmlSubItemBase>* iBMArray;
       
   108 
       
   109         // This indexes point to to corresponding array.
       
   110         TInt iCurrentBMIndex;
       
   111 
       
   112         /// Pointer to the itemarray.
       
   113         CArrayPtrSeg<CWmlSubItemBase>* iItemArray;
       
   114 
       
   115 		/// Current operation state
       
   116 		TInt iOperationState;
       
   117 
       
   118         /// Pointer to the wait dialog.
       
   119         CAknWaitDialog* iWaitDialog;
       
   120 
       
   121 		/// Pointer to dialog callback object.
       
   122 		MProgressDialogCallback* iDialogCallback;
       
   123     };
       
   124 
       
   125 #endif // CWMLITEMENGINE_H
       
   126 
       
   127 // End of file