00001 /* 00002 * ============================================================================ 00003 * Name : CPbkContactIter.h 00004 * Part of : PbkEng.dll 00005 * 00006 * Description: 00007 * Phonebook contact iterator 00008 * Version: 00009 * 00010 * Copyright (C) 2002 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================ 00020 */ 00021 00022 #ifndef __CPbkContactIter_H__ 00023 #define __CPbkContactIter_H__ 00024 00025 // INCLUDES 00026 #include <e32base.h> // CBase 00027 #include <cntdb.h> // TContactIter 00028 00029 // FORWARD DECLARATIONS 00030 class CPbkContactEngine; 00031 class CPbkContactItem; 00032 class CContactItem; 00033 00034 // CLASS DECLARATION 00035 00040 class CPbkContactIter : public CBase 00041 { 00042 public: // Constructors and destructor 00051 IMPORT_C static CPbkContactIter* NewL 00052 (CPbkContactEngine& aEngine, TBool aUseMinimalRead=EFalse); 00053 00063 IMPORT_C static CPbkContactIter* NewLC 00064 (CPbkContactEngine& aEngine, TBool aUseMinimalRead=EFalse); 00065 00069 ~CPbkContactIter(); 00070 00071 public: // interface 00076 IMPORT_C TContactItemId FirstL(); 00077 00082 IMPORT_C TContactItemId NextL(); 00083 00087 IMPORT_C void Reset(); 00088 00093 IMPORT_C CPbkContactItem* CurrentL() const; 00094 00101 IMPORT_C CPbkContactItem* GetCurrentL() const; 00102 00103 __DECLARE_TEST; 00104 00105 private: // Implementation 00106 CPbkContactIter(CPbkContactEngine& aEngine, TBool aUseMinimalRead); 00107 CContactItem* ReadPhonebookContactL(TContactItemId aId); 00108 00109 private: // Data 00111 CPbkContactEngine& iEngine; 00113 TContactIter iCmIter; 00115 mutable CContactItem* iCurrentItem; 00117 mutable CPbkContactItem* iCurrentPbkItem; 00119 const TBool iUseMinimalRead; 00120 }; 00121 00122 00123 // __CPbkContactIter_H__ 00124 #endif 00125 00126 // End of File