epoc32/include/app/TVPbkStoreContactAnalyzer.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:  VPbk store contact analyzer.
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef TVPBKStORECONTACTANALYZER_H
williamr@4
    20
#define TVPBKStORECONTACTANALYZER_H
williamr@4
    21
williamr@4
    22
//  INCLUDES
williamr@4
    23
#include <e32def.h>
williamr@4
    24
williamr@4
    25
//  VPbk includes
williamr@4
    26
#include <VPbkFieldTypeSelectorFactory.h>
williamr@4
    27
williamr@4
    28
// FORWARD DECLARATIONS
williamr@4
    29
class CVPbkContactManager;
williamr@4
    30
class MVPbkStoreContact;
williamr@4
    31
class MVPbkContactFieldSelector;
williamr@4
    32
class MVPbkFieldTypeList;
williamr@4
    33
class MVPbkBaseContactFieldCollection;
williamr@4
    34
class MVPbkBaseContactField;
williamr@4
    35
class CVPbkFieldTypeSelector;
williamr@4
    36
class MVPbkFieldTypeSelector;
williamr@4
    37
class MVPbkFieldType;
williamr@4
    38
class TVPbkFieldTypeSelector;
williamr@4
    39
williamr@4
    40
// CLASS DECLARATION
williamr@4
    41
williamr@4
    42
/**
williamr@4
    43
 * VPbk store contact analyzer.
williamr@4
    44
 */
williamr@4
    45
class TVPbkStoreContactAnalyzer
williamr@4
    46
    {
williamr@4
    47
    public: // Constructors and destructor
williamr@4
    48
williamr@4
    49
        /**
williamr@4
    50
         * Constructor.
williamr@4
    51
         *
williamr@4
    52
         * @param aContactManager   Virtual Phonebook contact manager.
williamr@4
    53
         * @param aContact          Store contact.
williamr@4
    54
         */
williamr@4
    55
        IMPORT_C TVPbkStoreContactAnalyzer(
williamr@4
    56
                const CVPbkContactManager& aContactManager,
williamr@4
    57
                const MVPbkStoreContact* aContact );
williamr@4
    58
williamr@4
    59
    public: // Interface
williamr@4
    60
williamr@4
    61
        /**
williamr@4
    62
         * Analyses if the contact has a field with type specified
williamr@4
    63
         * in aFieldTypeSelector.
williamr@4
    64
         *
williamr@4
    65
         * @param aFieldTypeSelector    Predefined field type selector.
williamr@4
    66
         * @param aStartIndex   Starts looking up the specified field from
williamr@4
    67
         *                      this field index.
williamr@4
    68
         * @param aContact      The contact to analyze. If NULL the contact
williamr@4
    69
         *                      got from the constructor is used.
williamr@4
    70
         * @return  Field index if contact has field specified in aResId,
williamr@4
    71
         *          otherwise KErrNotFound.
williamr@4
    72
         */
williamr@4
    73
        IMPORT_C TInt HasFieldL(
williamr@4
    74
                VPbkFieldTypeSelectorFactory::TVPbkFieldTypeSelector aFieldTypeSelector,
williamr@4
    75
                TInt aStartIndex = 0,
williamr@4
    76
                const MVPbkStoreContact* aContact = NULL ) const;
williamr@4
    77
        
williamr@4
    78
        /**
williamr@4
    79
         * Analyses if the contact has a action type with type specified
williamr@4
    80
         * in aActionTypeSelector.
williamr@4
    81
         *
williamr@4
    82
         * @param aActionTypeSelector   Predefined contact action type selector.
williamr@4
    83
         * @param aStartIndex   Starts looking up the specified field from
williamr@4
    84
         *                      this field index.
williamr@4
    85
         * @param aContact      The contact to analyze. If NULL the contact
williamr@4
    86
         *                      got from the constructor is used.
williamr@4
    87
         * @return  Field index if contact has field specified in aResId,
williamr@4
    88
         *          otherwise KErrNotFound.
williamr@4
    89
         */
williamr@4
    90
        IMPORT_C TInt HasFieldL(
williamr@4
    91
                VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aActionTypeSelector,
williamr@4
    92
                TInt aStartIndex = 0,
williamr@4
    93
                const MVPbkStoreContact* aContact = NULL ) const;
williamr@4
    94
williamr@4
    95
        /**
williamr@4
    96
         * Analyses if the contact supports field with type specified
williamr@4
    97
         * in aFieldTypeSelector.
williamr@4
    98
         *
williamr@4
    99
         * @param aFieldTypeSelector    Predefined field type selector.
williamr@4
   100
         * @param aContact      The contact to analyze. If NULL the
williamr@4
   101
         *                      contact got from constructor is used.
williamr@4
   102
         * @return  ETrue if the field type is supported by the contact,
williamr@4
   103
         *          otherwise EFalse.
williamr@4
   104
         */
williamr@4
   105
        IMPORT_C TBool IsFieldTypeSupportedL(
williamr@4
   106
                VPbkFieldTypeSelectorFactory::TVPbkFieldTypeSelector aFieldTypeSelector,
williamr@4
   107
                const MVPbkStoreContact* aContact = NULL ) const;
williamr@4
   108
williamr@4
   109
        /**
williamr@4
   110
         * Analyses if the contact supports action types with type specified
williamr@4
   111
         * in aActionTypeSelector.
williamr@4
   112
         *
williamr@4
   113
         * @param aActionTypeSelector    Predefined contact action type selector.
williamr@4
   114
         * @param aContact      The contact to analyze. If NULL the
williamr@4
   115
         *                      contact got from constructor is used.
williamr@4
   116
         * @return  ETrue if the action type is supported by the contact,
williamr@4
   117
         *          otherwise EFalse.
williamr@4
   118
         */
williamr@4
   119
        IMPORT_C TBool IsFieldTypeSupportedL(
williamr@4
   120
                VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aActionTypeSelector,
williamr@4
   121
                const MVPbkStoreContact* aContact = NULL ) const;
williamr@4
   122
williamr@4
   123
        /**
williamr@4
   124
         * Checks if the aFieldType is same as specified in aFieldTypeSelector.
williamr@4
   125
         * Returns ETrue is same, otherwise EFalse.
williamr@4
   126
         *
williamr@4
   127
         * @param aFieldType   The field type to check.
williamr@4
   128
         * @param aFieldTypeSelector   Predefined field type selector.
williamr@4
   129
         * @return  ETrue if the field type is included.
williamr@4
   130
         */
williamr@4
   131
        IMPORT_C TBool IsFieldTypeIncludedL(
williamr@4
   132
                const MVPbkFieldType& aFieldType,
williamr@4
   133
                VPbkFieldTypeSelectorFactory::TVPbkFieldTypeSelector aFieldTypeSelector ) const;
williamr@4
   134
williamr@4
   135
        /**
williamr@4
   136
         * Checks if the aFieldType is same as specified in aActionTypeSelector.
williamr@4
   137
         * Returns ETrue is same, otherwise EFalse.
williamr@4
   138
         *
williamr@4
   139
         * @param aFieldType   The field type to check.
williamr@4
   140
         * @param aActionTypeSelector   Predefined field type selector.
williamr@4
   141
         * @return  ETrue if the field type is included.
williamr@4
   142
         */
williamr@4
   143
        IMPORT_C TBool IsFieldTypeIncludedL(
williamr@4
   144
                const MVPbkFieldType& aFieldType,
williamr@4
   145
                VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aActionTypeSelector ) const;
williamr@4
   146
williamr@4
   147
        /**
williamr@4
   148
         * Checks if the aField's field type is same as specified in
williamr@4
   149
         * aFieldTypeSelector. Returns ETrue is same, otherwise EFalse.
williamr@4
   150
         *
williamr@4
   151
         * @param aField       The field whose type to check.
williamr@4
   152
         * @param aFieldTypeSelector       Selector's resource id.
williamr@4
   153
         * @return  ETrue if the field type is included.
williamr@4
   154
         */
williamr@4
   155
        IMPORT_C TBool IsFieldTypeIncludedL(
williamr@4
   156
                const MVPbkBaseContactField& aField,
williamr@4
   157
                VPbkFieldTypeSelectorFactory::TVPbkFieldTypeSelector aFieldTypeSelector ) const;
williamr@4
   158
williamr@4
   159
        /**
williamr@4
   160
         * Checks if the aField's field type is same as specified in
williamr@4
   161
         * aActionTypeSelector. Returns ETrue is same, otherwise EFalse.
williamr@4
   162
         *
williamr@4
   163
         * @param aField       The field whose type to check.
williamr@4
   164
         * @param aActionTypeSelector       Selector's resource id.
williamr@4
   165
         * @return  ETrue if the field type is included.
williamr@4
   166
         */
williamr@4
   167
        IMPORT_C TBool IsFieldTypeIncludedL(
williamr@4
   168
                const MVPbkBaseContactField& aField,
williamr@4
   169
                VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aActionTypeSelector ) const;
williamr@4
   170
williamr@4
   171
    private: // Implementation
williamr@4
   172
        TVPbkStoreContactAnalyzer();
williamr@4
   173
williamr@4
   174
    private: // Data
williamr@4
   175
        /// Ref: Virtual Phonebook contact manager
williamr@4
   176
        const CVPbkContactManager& iContactManager;
williamr@4
   177
        /// Ref: The contact to analyze
williamr@4
   178
        const MVPbkStoreContact* iContact;
williamr@4
   179
    };
williamr@4
   180
williamr@4
   181
#endif // TVPBKStORECONTACTANALYZER_H
williamr@4
   182
williamr@4
   183
// End of File