IMPSengine/imapi/Inc/cntdbreader.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2005 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: Contact DB reader class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IMAPI_CNTDBREADER_H
       
    21 #define IMAPI_CNTDBREADER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <E32BASE.H>
       
    25 #include <badesca.h>
       
    26 #include <cntdef.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CContactIdArray;
       
    30 class CContactDatabase;
       
    31 class CWVIDCache;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Contact DB reader class
       
    37 *  Reads the contact DB for WV user IDs
       
    38 *
       
    39 *  @lib imclient.dll
       
    40 *  @since 3.0
       
    41 */
       
    42 class CContactDBReader : public CBase
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CContactDBReader* NewL();
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CContactDBReader();
       
    55 
       
    56     public: // New functions
       
    57 
       
    58         /**
       
    59         * Fetches the WV IDs for the given Contact Model IDs
       
    60         * @since S60 3.0
       
    61         * @param aContactArray List of the Contact Model IDs
       
    62         * @param aWVUserIDs List of the corresponding WV IDs
       
    63         */
       
    64         void ReadWVIdsL(
       
    65             const CContactIdArray& aContactArray,
       
    66             CDesCArray& aWVUserIds );
       
    67 
       
    68         /**
       
    69         * Fetches the WV ID for the given Contact Model ID
       
    70         * If WV ID not present then leaves with KErrNotFound
       
    71         * @since S60 3.0
       
    72         * @param aContactArray List of the Contact Model IDs
       
    73         * @param aWVUserIDs List of the corresponding WV IDs
       
    74         */
       
    75         void GetWVIdL(
       
    76             const TContactItemId& aConatctId,
       
    77             CDesCArray& aWVUserIds );
       
    78 
       
    79 
       
    80     private:
       
    81 
       
    82         /**
       
    83         * C++ default constructor.
       
    84         */
       
    85         CContactDBReader();
       
    86 
       
    87         /**
       
    88         * By default Symbian 2nd phase constructor is private.
       
    89         */
       
    90         void ConstructL();
       
    91 
       
    92     private:    // Data
       
    93         CContactDatabase*   iContactDB;
       
    94 
       
    95     };
       
    96 
       
    97 #endif      // IMAPI_CNTDBREADER_H   
       
    98 
       
    99 
       
   100 // End of File