CPbkContactIter Class Reference

API published in: S60 1st Ed
API deprecated in: S60 5th Ed

Link against: pbkeng.lib

Capability Information

Required Capabilities

ReadUserData WriteUserData


#include <cpbkcontactiter.h>

Detailed Description

Phonebook contact iterator.

Only iterates through recognised Phonebook contact cards, not groups or templates. NextL jumps over any other contacts.


Public Member Functions

  ~CPbkContactIter ()
  Destructor.
IMPORT_C TContactItemId  FirstL ()
  Intializes the iterator to the first Phonebook contact.
IMPORT_C TContactItemId  NextL ()
  Advances the iterator to the next Phonebook contact.
IMPORT_C void  Reset ()
  Resets the iterator to null state.
IMPORT_C CPbkContactItem CurrentL () const
  Returns the current Phonebook contact, NULL if none.
IMPORT_C CPbkContactItem GetCurrentL () const
  Returns the current Phonebook contact, NULL if none.

Static Public Member Functions

static IMPORT_C CPbkContactIter NewL (CPbkContactEngine &aEngine, TBool aUseMinimalRead=EFalse)
  Creates a new instace of this class.
static IMPORT_C CPbkContactIter NewLC (CPbkContactEngine &aEngine, TBool aUseMinimalRead=EFalse)
  Same as NewL but leaves the created object on the cleanup stack.

Data Fields

  __DECLARE_TEST

Constructor & Destructor Documentation

CPbkContactIter::~CPbkContactIter  ) 
 

Destructor.


Member Function Documentation

IMPORT_C CPbkContactItem* CPbkContactIter::CurrentL  )  const
 

Returns the current Phonebook contact, NULL if none.

Returns:
The contact item the iterator is currently pointing at.
IMPORT_C TContactItemId CPbkContactIter::FirstL  ) 
 

Intializes the iterator to the first Phonebook contact.

Returns:
Id of the first Phonebook contact, KNullContactId if none found.
IMPORT_C CPbkContactItem* CPbkContactIter::GetCurrentL  )  const
 

Returns the current Phonebook contact, NULL if none.

Caller is responsible for deleting the contact, thus ownership of the contact item is passed to the client.

Returns:
The contact item the iterator is currently pointing at.
static IMPORT_C CPbkContactIter* CPbkContactIter::NewL CPbkContactEngine aEngine,
TBool  aUseMinimalRead = EFalse
[static]
 

Creates a new instace of this class.

Parameters:
aEngine  Phonebook engine whose contacts to iterate.
aUseMinimalRead  Use ReadMinimalContactL instead of ReadContactL to read the contacts.
Returns:
Contact iterator instance.
static IMPORT_C CPbkContactIter* CPbkContactIter::NewLC CPbkContactEngine aEngine,
TBool  aUseMinimalRead = EFalse
[static]
 

Same as NewL but leaves the created object on the cleanup stack.

Creates a new instace of this class.

Parameters:
aEngine  Phonebook engine whose contacts to iterate.
aUseMinimalRead  Use ReadMinimalContactL instead of ReadContactL to read the contacts.
Returns:
Contact iterator instance.
IMPORT_C TContactItemId CPbkContactIter::NextL  ) 
 

Advances the iterator to the next Phonebook contact.

Returns:
Id of the next Phonebook contact, KNullContactId if none found.
IMPORT_C void CPbkContactIter::Reset  ) 
 

Resets the iterator to null state.


Field Documentation

CPbkContactIter::__DECLARE_TEST
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top