email/imum/Utils/Inc/IMSPageResourceControl.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  IMSPageResourceControl.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIMSPageResourceControl_H
       
    20 #define CIMSPageResourceControl_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CONSTANTS
       
    26 // MACROS
       
    27 // FUNCTION PROTOTYPES
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 // DATA TYPES
       
    31 enum TIMSPageResource
       
    32     {
       
    33     EIPRRadioButton = 0,
       
    34     EIPRCheckbox,
       
    35     EIPRText,
       
    36     EIPRNumber,
       
    37     EIPRScNumber,
       
    38     EIPRSecret,
       
    39     EIPRMultiLine,
       
    40     EIPRLastPage
       
    41     };
       
    42 
       
    43 typedef CArrayFixFlat<TInt> CResourceStack;
       
    44 typedef CArrayPtrFlat<CResourceStack> CResourceStackArray;
       
    45 
       
    46 // CLASS DECLARATION
       
    47 
       
    48 /**
       
    49 *
       
    50 *  @lib
       
    51 *  @since Series60 3.0
       
    52 */
       
    53 NONSHARABLE_CLASS( CIMSPageResourceControl ): public CBase
       
    54     {
       
    55     public:  // Constructors and destructor
       
    56 
       
    57         /**
       
    58         * Creates object from CIMSPageResourceControl and leaves it to cleanup stack
       
    59         * @since S60 3.1
       
    60         * @return, Constructed object
       
    61         */
       
    62         static CIMSPageResourceControl* NewLC();
       
    63 
       
    64         /**
       
    65         * Create object from CIMSPageResourceControl
       
    66         * @since S60 3.1
       
    67         * @return, Constructed object
       
    68         */
       
    69         static CIMSPageResourceControl* NewL();
       
    70 
       
    71         /**
       
    72         * Destructor
       
    73         * @since S60 3.1
       
    74         */
       
    75         virtual ~CIMSPageResourceControl();
       
    76 
       
    77     public: // New functions
       
    78 
       
    79         /**
       
    80         *
       
    81         * @since S60 3.1
       
    82         */
       
    83         void PushResourceL(
       
    84             const TInt aType,
       
    85             const TInt aPageResource );
       
    86 
       
    87         /**
       
    88         *
       
    89         * @since S60 3.1
       
    90         */
       
    91         TInt Resource(
       
    92             const TInt aType,
       
    93             const TBool aRemove = ETrue );
       
    94 
       
    95         /**
       
    96         *
       
    97         * @since S60 3.1
       
    98         */
       
    99         TInt Count( const TInt aType );
       
   100 
       
   101         /**
       
   102         *
       
   103         * @since S60 3.1
       
   104         */
       
   105         CResourceStack* CreateStackL( const TInt aPageResource );
       
   106 
       
   107         /**
       
   108         *
       
   109         * @since S60 3.1
       
   110         */
       
   111         TInt operator[]( const TInt aType );
       
   112 
       
   113     public: // Functions from base classes
       
   114 
       
   115     protected:  // Constructors
       
   116 
       
   117         /**
       
   118         * Default constructor for classCIMSPageResourceControl
       
   119         * @since S60 3.1
       
   120         * @return, Constructed object
       
   121         */
       
   122         CIMSPageResourceControl();
       
   123 
       
   124         /**
       
   125         * Symbian 2-phase constructor
       
   126         * @since S60 3.1
       
   127         */
       
   128         void ConstructL();
       
   129 
       
   130     protected:  // New virtual functions
       
   131     protected:  // New functions
       
   132     protected:  // Functions from base classes
       
   133 
       
   134     private:  // New virtual functions
       
   135     private:  // New functions
       
   136 
       
   137         // TOOLS
       
   138 
       
   139         /**
       
   140         *
       
   141         * @since S60 3.1
       
   142         */
       
   143         CResourceStack& Stack( const TInt aType );
       
   144 
       
   145     private:  // Functions from base classes
       
   146 
       
   147     public:     // Data
       
   148     protected:  // Data
       
   149     private:    // Data
       
   150         CResourceStackArray*    iPageResources;
       
   151     };
       
   152 
       
   153 #endif //  CIMSPageResourceControl_H
       
   154 
       
   155 // End of File