phonebookengines/VirtualPhonebook/VPbkSimStore/inc/CSupportedFieldTypes.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
child 85 38bb213f60ba
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  A vpbk field type list that contains sim supported types
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VPBKSIMSTORE_CSUPPORTEDFIELDTYPES_H
       
    21 #define VPBKSIMSTORE_CSUPPORTEDFIELDTYPES_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <MVPbkFieldType.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 struct TVPbkGsmStoreProperty;
       
    29 struct TVPbkUSimStoreProperty;  
       
    30 
       
    31 namespace VPbkSimStore {
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CFieldTypeMappings;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  A vpbk field type list that contains sim supported types
       
    40 *
       
    41 */
       
    42 NONSHARABLE_CLASS( CSupportedFieldTypes ): 
       
    43         public CBase,
       
    44         public MVPbkFieldTypeList
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47         
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         * @param aSimStoreProperty sim store properties
       
    51         * @return a new instance of this class
       
    52         */
       
    53         static CSupportedFieldTypes* NewL(
       
    54             const CFieldTypeMappings& aFieldTypeMappings,
       
    55             TVPbkGsmStoreProperty& aSimStoreProperty );
       
    56         /**
       
    57         * Two-phased constructor.
       
    58         * @param aSimStoreProperty sim store properties
       
    59         * @return a new instance of this class
       
    60         */
       
    61         static CSupportedFieldTypes* NewL(
       
    62             const CFieldTypeMappings& aFieldTypeMappings,
       
    63             TVPbkGsmStoreProperty& aSimStoreProperty,
       
    64             TVPbkUSimStoreProperty& aUSimStoreProperty ); 
       
    65         
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CSupportedFieldTypes();
       
    70 
       
    71     public: // Functions from base classes
       
    72 
       
    73         /**
       
    74         * From MVPbkFieldTypeList
       
    75         */
       
    76         TInt FieldTypeCount() const;
       
    77 
       
    78         /**
       
    79         * From MVPbkFieldTypeList
       
    80         */
       
    81         const MVPbkFieldType& FieldTypeAt( TInt aIndex ) const;
       
    82 
       
    83         /**
       
    84         * From MVPbkFieldTypeList
       
    85         */
       
    86         TBool ContainsSame( const MVPbkFieldType& aFieldType ) const;
       
    87 
       
    88         /**
       
    89         * From MVPbkFieldTypeList
       
    90         */
       
    91         TInt MaxMatchPriority() const;
       
    92 
       
    93         /**
       
    94         * From MVPbkFieldTypeList
       
    95         */
       
    96         const MVPbkFieldType* FindMatch
       
    97             ( const TVPbkFieldVersitProperty& aMatchProperty,
       
    98               TInt aMatchPriority ) const;
       
    99 
       
   100         /**
       
   101         * From MVPbkFieldTypeList
       
   102         */
       
   103         const MVPbkFieldType* FindMatch
       
   104             ( TVPbkNonVersitFieldType aNonVersitType ) const;
       
   105 
       
   106         /**
       
   107          * from MVPbkFieldTypeList
       
   108          */
       
   109         const MVPbkFieldType* Find(
       
   110                 TInt aFieldTypeResId) const;
       
   111         
       
   112     private:
       
   113         /**
       
   114         * C++ default constructor.
       
   115         */
       
   116         CSupportedFieldTypes();
       
   117 
       
   118         /**
       
   119         * By default Symbian 2nd phase constructor is private.
       
   120         */
       
   121         void ConstructL( const CFieldTypeMappings& aFieldTypeMappings,
       
   122             TVPbkGsmStoreProperty& aSimStoreProperty,
       
   123             TVPbkUSimStoreProperty* aUSimStoreProperty = NULL ); 
       
   124 
       
   125     private:    // Data
       
   126         ///Ref: An array for the supported types. Doesn't own types
       
   127         RPointerArray<const MVPbkFieldType> iSupportedTypes;
       
   128 
       
   129     };
       
   130 } // namespace VPbkSimStore
       
   131 #endif      // VPBKSIMSTORE_CSUPPORTEDFIELDTYPES_H
       
   132             
       
   133 // End of File