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