epoc32/include/app/cpbkidlefinder.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 cpbkidlefinder.h
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *      Abstract Phonebook entry interface.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkIdleFinder_H__
       
    21 #define __CPbkIdleFinder_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>    // CBase
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CIdleFinder;
       
    28 class CContactItemFieldDef;
       
    29 class CContactIdArray;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Phonebook idle finder class. Wrapper for Contact Model's CIdleFinder.
       
    35  * @see CIdleFinder.
       
    36  */
       
    37 class CPbkIdleFinder : public CBase
       
    38 	{
       
    39     public:  // Constructors and destructors
       
    40         /**
       
    41          * Constructor. Not exported because objects of this class are created
       
    42          * only by CPbkContactEngine.
       
    43          *
       
    44          * @param aFinder   Contact Model idle finder object. This takes 
       
    45          *                  ownership of aFinder.
       
    46          * @param aFieldDef Field defintion passed to aFinder. This takes
       
    47          *                  ownership of aFieldDef.
       
    48          */
       
    49         CPbkIdleFinder(CIdleFinder* aFinder, CContactItemFieldDef* aFieldDef);
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CPbkIdleFinder();
       
    55 	    
       
    56     public:  // CIdleFinder interface
       
    57         /**
       
    58          * Tests whether a search is complete.
       
    59          * @return ETrue if complete, EFalse if not.
       
    60          * @see CIdleFinder::IsCompelete().
       
    61          */
       
    62 	    IMPORT_C TBool IsComplete() const;
       
    63 
       
    64         /**
       
    65          * Gives access and ownership of the contact ids found in the search.
       
    66          * @return Contacts id's found in the search.
       
    67          * @see CIdleFinder::TakeContactIds().
       
    68          */
       
    69 	    IMPORT_C CContactIdArray* TakeContactIds();
       
    70 
       
    71         /**
       
    72          * Check for errors when search is complete.
       
    73          * @return Error code. KErrNone if no errors occurred during the search.
       
    74          * @see CIdleFinder::Error().
       
    75          */
       
    76 	    IMPORT_C TInt Error() const;
       
    77 
       
    78     public:  // Additional interface
       
    79         /**
       
    80          * Returns the CIdleFinder passed to constructor. Ownership not
       
    81          * transferred.
       
    82          * @return Symbian Contacts model Idle finder object. NULL if not set.
       
    83          */ 
       
    84         IMPORT_C CIdleFinder* IdleFinder() const;
       
    85 
       
    86         /**
       
    87          * Returns the CContactItemFieldDef passed to constructor. Ownership
       
    88          * not transferred.
       
    89          * @return Symbian Contacts model contact item field definition. NULL 
       
    90          *         if not set.
       
    91          */ 
       
    92         IMPORT_C CContactItemFieldDef* FieldDef() const;
       
    93     
       
    94     private:  // Data
       
    95 		/// Own: idle finder object
       
    96         CIdleFinder* iFinder;
       
    97 		/// Own: field definition (array of field types)
       
    98         CContactItemFieldDef* iFieldDef;
       
    99     };
       
   100 
       
   101 
       
   102 #endif // __CPbkIdleFinder_H__
       
   103 
       
   104 // End of File