CPbkContactEngine 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 <cpbkcontactengine.h>

Detailed Description

The main entrypoint to the Phonebook contact engine.

The Phonebook contact engine builds on top of the Symbian Contacts model and implements platform specific functionality and policies that can be reused and followed by clients to implement functionality that is better integrated to the platform functionality. Functionality like contact field typing is implemented by this engine.


Public Types

enum   TPbkNameOrder { EPbkNameOrderLastNameFirstName = 0, EPbkNameOrderFirstNameLastName, EPbkNameOrderNotDefined }

Public Member Functions

  ~CPbkContactEngine ()
  Destructor.
IMPORT_C CContactDatabase &  Database ()
  Returns the underlying CContactDatabase object.
IMPORT_C const CPbkFieldsInfo FieldsInfo ()
  Returns the field type info array.
IMPORT_C RFs &  FsSession () const
  Returns an open file server session.
IMPORT_C CPbkContactItem CreateEmptyContactL ()
  Returns a new contact card with default fields.
IMPORT_C TContactItemId  AddNewContactL (CPbkContactItem &aContact, TBool aImmediateNotify=EFalse)
  Adds a new contact to the contact database.
IMPORT_C TContactItemId  DuplicateContactL (TContactItemId aId, TBool aImmediateNotify=EFalse)
  Duplicates a contact in the database.
IMPORT_C CPbkContactItem ReadContactL (TContactItemId aContactId, const CPbkFieldIdArray *aFieldTypes=NULL)
  Reads a contact and returns a phonebook contact item.
IMPORT_C CPbkContactItem ReadContactLC (TContactItemId aContactId, const CPbkFieldIdArray *aFieldTypes=NULL)
  Same as ReadContactL, but leaves the returned contact item on the cleanup stack.
IMPORT_C CPbkContactItem ReadMinimalContactLC (TContactItemId aContactId)
  Same as ReadContactLC but reads only minimal information.
IMPORT_C CPbkContactIter CreateContactIteratorLC (TBool aUseMinimalRead=EFalse)
  Returns a Phonebook contact iterator.
IMPORT_C CPbkContactItem OpenContactL (TContactItemId aContactId)
  Opens a contact and returns a phonebook contact item.
IMPORT_C CPbkContactItem OpenContactLCX (TContactItemId aContactId)
  Same as OpenContactL, but leaves a lock record AND the opened contact object on the cleanup stack.
IMPORT_C void  CommitContactL (CPbkContactItem &aContact, TBool aImmediateNotify=EFalse)
  Commit changes to a previously opened contact item into the contact database.
IMPORT_C void  CloseContactL (TContactItemId aContactId)
  Closes a previously opened contact item without saving changes.
IMPORT_C void  DeleteContactL (TContactItemId aContactId, TBool aImmediateNotify=EFalse)
  Deletes a contact item from the database.
IMPORT_C void  DeleteContactsL (const CContactIdArray &aContactIds, TBool aImmediateNotify=EFalse)
  Deletes multiple contact items from the database.
IMPORT_C void  DeleteContactsOnBackgroundL (const CContactIdArray &aContactIds)
  Deletes multiple contacts from the database in an active object -driven asynchronous background process.
IMPORT_C CContactGroup *  CreateContactGroupL (const TDesC &aGroupLabel, TBool aInTransaction=EFalse)
  Creates a new contact group.
IMPORT_C void  AddContactToGroupL (TContactItemId aItemId, TContactItemId aGroupId)
  Adds a Contact to a group.
IMPORT_C void  RemoveContactFromGroupL (TContactItemId aItemId, TContactItemId aGroupId)
  Removes a contact from a group.
IMPORT_C CContactGroup *  ReadContactGroupL (TContactItemId aId)
  Reads a Contact group.
IMPORT_C CContactGroup *  OpenContactGroupL (TContactItemId aId)
  Opens a Contact group for modification.
IMPORT_C CContactGroup *  OpenContactGroupLCX (TContactItemId aId)
  Opens a Contact group for modification.
IMPORT_C void  CommitContactGroupL (CContactGroup &aGroup, TBool aImmediateNotify=EFalse)
  Commits changes to a contact group to the database.
IMPORT_C void  DeleteContactGroupL (TContactItemId aContactId, TBool aImmediateNotify=EFalse)
  Deletes a contact group from the database.
IMPORT_C void  SetFieldAsSpeedDialL (CPbkContactItem &aItem, TInt aFieldIndex, TInt aSpeedDialPosition)
  Sets a speed dial to a contact field.
IMPORT_C TContactItemId  GetSpeedDialFieldL (TInt aSpeedDialPosition, TDes &aPhoneNumber) const
  Returns a speed dial contact.
IMPORT_C void  RemoveSpeedDialFieldL (TContactItemId aContactId, TInt aSpeedDialPosition)
  Removes a speed dial from a contact.
IMPORT_C TBool  IsSpeedDialAssigned (const CPbkContactItem &aItem, TInt aFieldIndex) const
  Returns ETrue if this field has been assigned a speed dial position.
IMPORT_C CContactViewBase &  AllContactsView ()
  Returns a contact view object containing all the contacts in the database.
IMPORT_C CContactViewBase &  AllGroupsViewL ()
  Returns a contact view object containing all the groups in the database.
IMPORT_C CContactViewBase &  FilteredContactsViewL (TInt aFilter)
  Returns a contact view object containing all the contacts in the database that match a filter.
IMPORT_C CPbkContactChangeNotifier CreateContactChangeNotifierL (MPbkContactDbObserver *aObserver)
  Creates and returns a new CPbkContactChangeNotifier for the default contact database.
IMPORT_C HBufC *  GetContactTitleL (const CPbkContactItem &aItem) const
  Gets a title text for a contact or localised text for unnamed contact if contact contains no title.
IMPORT_C HBufC *  GetContactTitleOrNullL (const MPbkFieldDataArray &aContactData)
  Similar to GetContactTitleL but returns NULL if contact contains no title.
IMPORT_C TBool  IsTitleField (TPbkFieldId aFieldId) const
  Returns ETrue if field is one of the fields used in building the contact title.
IMPORT_C MPbkContactNameFormat &  ContactNameFormat () const
IMPORT_C const TDesC &  UnnamedTitle () const
  Returns the localised title text to use for unnamed contacts.
IMPORT_C CContactIdArray *  MatchPhoneNumberL (const TDesC &aNumber, const TInt aMatchLengthFromRight)
  Call-through for new Phone number matching function in 6.2 version of class CContactDatabase.
IMPORT_C CContactIdArray *  FindLC (const TDesC &aText, const CPbkFieldIdArray *aFieldTypes=NULL)
  Searches all contacts in the database for aText.
IMPORT_C CPbkIdleFinder FindAsyncL (const TDesC &aText, const CPbkFieldIdArray *aFieldTypes=NULL, MIdleFindObserver *aObserver=NULL)
  Searches all contacts in the database for aText asynchronously.
IMPORT_C void  SetCompressUi (MPbkCompressUi *aCompressiUi)
IMPORT_C TBool  CheckCompress ()
IMPORT_C void  CompressL ()
IMPORT_C void  CancelCompress ()
IMPORT_C void  CheckFileSystemSpaceAndCompressL ()
IMPORT_C void  SetNameDisplayOrderL (TPbkNameOrder aNameOrder)
IMPORT_C TPbkNameOrder  NameDisplayOrderL ()
IMPORT_C CPbkConstants *  Constants ()
const CPbkSortOrderManager &  SortOrderManager () const
IMPORT_C void  SetNameSeparatorL (TChar aSeparator)
IMPORT_C TChar  NameSeparator () const

Static Public Member Functions

static IMPORT_C CPbkContactEngine NewL (RFs *aFs=NULL)
  Creates a new Phonebook engine object and connects to the default contact database.
static IMPORT_C CPbkContactEngine NewL (const TDesC &aFileName, TBool aReplace=EFalse, RFs *aFs=NULL)
static IMPORT_C CPbkContactEngine ReplaceL (RFs *aFs=NULL)
  Replaces the default contact database and connects to it.
static IMPORT_C CPbkContactEngine Static ()
  Returns the global Phonebook engine instance, NULL if no instance created yet.

Friends

class  CPbkContactChangeNotifier
class  CContactDbConnection
class  CPbkSharedDataObserver

Member Enumeration Documentation

enum CPbkContactEngine::TPbkNameOrder
 
Enumerator:
EPbkNameOrderLastNameFirstName 
EPbkNameOrderFirstNameLastName  Last name then first name order.
EPbkNameOrderNotDefined  undefined name order

Constructor & Destructor Documentation

CPbkContactEngine::~CPbkContactEngine  ) 
 

Destructor.

Destroys this object and closes the contact database connection. REComSession::FinalClose() is called. Notice that FinalClose -call releases resource handles of already destroyed ECom plugins also outside CPbkContactEngine. See REComSession documentation.


Member Function Documentation

IMPORT_C void CPbkContactEngine::AddContactToGroupL TContactItemId  aItemId,
TContactItemId  aGroupId
 

Adds a Contact to a group.

Parameters:
aItemId  Contact to be added to group.
aGroupId  Group where the contact will be added to.
See also:
CContactDatabase::AddContactToGroupL
IMPORT_C TContactItemId CPbkContactEngine::AddNewContactL CPbkContactItem aContact,
TBool  aImmediateNotify = EFalse
 

Adds a new contact to the contact database.

Parameters:
aContact  The new contact item to add.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
Returns:
The id of the new contact item.
See also:
CContactDatabase::AddNewContactL
IMPORT_C CContactViewBase& CPbkContactEngine::AllContactsView  ) 
 

Returns a contact view object containing all the contacts in the database.

Returns:
Contact view containing all the contacts in the database.
See also:
CContactViewBase
IMPORT_C CContactViewBase& CPbkContactEngine::AllGroupsViewL  ) 
 

Returns a contact view object containing all the groups in the database.

Returns:
Contact view containing all the groups in the database.
See also:
CContactViewBase
IMPORT_C void CPbkContactEngine::CancelCompress  ) 
 
IMPORT_C TBool CPbkContactEngine::CheckCompress  ) 
 
IMPORT_C void CPbkContactEngine::CheckFileSystemSpaceAndCompressL  ) 
 
IMPORT_C void CPbkContactEngine::CloseContactL TContactItemId  aContactId  ) 
 

Closes a previously opened contact item without saving changes.

Parameters:
aContactId  Contact item to be closed.
See also:
CContactDatabase::CloseContactL
IMPORT_C void CPbkContactEngine::CommitContactGroupL CContactGroup &  aGroup,
TBool  aImmediateNotify = EFalse
 

Commits changes to a contact group to the database.

Parameters:
aId  Groups id
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
See also:
CContactDatabase::CommitContactL
IMPORT_C void CPbkContactEngine::CommitContactL CPbkContactItem aContact,
TBool  aImmediateNotify = EFalse
 

Commit changes to a previously opened contact item into the contact database.

Parameters:
aContact  Contact item to be updated in the database.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
See also:
CContactDatabase::CommitContactL
IMPORT_C void CPbkContactEngine::CompressL  ) 
 
IMPORT_C CPbkConstants* CPbkContactEngine::Constants  ) 
 
IMPORT_C MPbkContactNameFormat& CPbkContactEngine::ContactNameFormat  )  const
 
IMPORT_C CPbkContactChangeNotifier* CPbkContactEngine::CreateContactChangeNotifierL MPbkContactDbObserver aObserver  ) 
 

Creates and returns a new CPbkContactChangeNotifier for the default contact database.

The returned object attaches aObserver to this engine instance as long as the object exists.

Parameters:
aObserver  Observer to attach to this object.
Returns:
New CPbkContactChangeNotifier object. Caller is responsible of the object.
See also:
CPbkContactChangeNotifier

MPbkContactDbObserver

IMPORT_C CContactGroup* CPbkContactEngine::CreateContactGroupL const TDesC &  aGroupLabel,
TBool  aInTransaction = EFalse
 

Creates a new contact group.

Parameters:
aGroupLabel  Group name.
aInTransaction  See Symbian Contacts Model documentation for CContactDatabase::CreateContactGroupL documentation.
See also:
CContactDatabase::CreateContactGroupL
IMPORT_C CPbkContactIter* CPbkContactEngine::CreateContactIteratorLC TBool  aUseMinimalRead = EFalse  ) 
 

Returns a Phonebook contact iterator.

Parameters:
aUseMinimalRead  If ETrue the iterator will use the Symbian Contacts model CContactDatabase::ReadMinimalContactL, EFalse will read all the contact fields. Default behaviour is to read all fields.
See also:
CPbkContactIter::NewL.

CContactDatabase::ReadMinimalContactL

IMPORT_C CPbkContactItem* CPbkContactEngine::CreateEmptyContactL  ) 
 

Returns a new contact card with default fields.

Returns:
A new empty contact item object.
IMPORT_C CContactDatabase& CPbkContactEngine::Database  ) 
 

Returns the underlying CContactDatabase object.

Use only if this class's API is not enough for your purposes.

Returns:
The underlying Symbian Contacts model CContactDatabase instance.
See also:
CContactDatabase
IMPORT_C void CPbkContactEngine::DeleteContactGroupL TContactItemId  aContactId,
TBool  aImmediateNotify = EFalse
 

Deletes a contact group from the database.

Parameters:
aContactId  Contact group to be deleted.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
See also:
CContactDatabase::DeleteContactL
IMPORT_C void CPbkContactEngine::DeleteContactL TContactItemId  aContactId,
TBool  aImmediateNotify = EFalse
 

Deletes a contact item from the database.

Parameters:
aContactId  Contact item to be deleted.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
See also:
CContactDatabase::DeleteContactL
IMPORT_C void CPbkContactEngine::DeleteContactsL const CContactIdArray &  aContactIds,
TBool  aImmediateNotify = EFalse
 

Deletes multiple contact items from the database.

Parameters:
aContactIds  Contact items to be deleted.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
See also:
CContactDatabase::DeleteContactsL
IMPORT_C void CPbkContactEngine::DeleteContactsOnBackgroundL const CContactIdArray &  aContactIds  ) 
 

Deletes multiple contacts from the database in an active object -driven asynchronous background process.

Parameters:
aContactIds  Contacts to delete.
IMPORT_C TContactItemId CPbkContactEngine::DuplicateContactL TContactItemId  aId,
TBool  aImmediateNotify = EFalse
 

Duplicates a contact in the database.

Parameters:
aId  Id of the contact to duplicate.
aImmediateNotify  Send notification to observers immediately. NOTE: send immediately will result in observers (MPbkContactDbObserver) receiving the event twice!
Returns:
Contact id of the new duplicate.
IMPORT_C const CPbkFieldsInfo& CPbkContactEngine::FieldsInfo  ) 
 

Returns the field type info array.

Returns:
All the Phonebook field types.
See also:
CPbkFieldsInfo
IMPORT_C CContactViewBase& CPbkContactEngine::FilteredContactsViewL TInt  aFilter  ) 
 

Returns a contact view object containing all the contacts in the database that match a filter.

Parameters:
aFilter  Use CContactDatabase::TContactViewFilter.
See also:
CContactViewBase
IMPORT_C CPbkIdleFinder* CPbkContactEngine::FindAsyncL const TDesC &  aText,
const CPbkFieldIdArray *  aFieldTypes = NULL,
MIdleFindObserver *  aObserver = NULL
 

Searches all contacts in the database for aText asynchronously.

Parameters:
aText  Text to search.
aFieldTypes  Phonebook fields types to at least include in the search. If NULL searches all fields.
PLEASE NOTE: The find matches in most cases also other fields than those specified in aFieldTypes. Always loop through the returned contacts to check match in the required fields.
aObserver  Observer for this operation.
Returns:
CPbkIdleFinder object which is used to access the find results when complete. Deleting this object will cancel this asyncronous find operation.
See also:
CContactDatabase::FindAsyncL.

CPbkIdleFinder

IMPORT_C CContactIdArray* CPbkContactEngine::FindLC const TDesC &  aText,
const CPbkFieldIdArray *  aFieldTypes = NULL
 

Searches all contacts in the database for aText.

Parameters:
aText  Text to search.
aFieldTypes  Phonebook fields types to at least include in the search. If NULL searches all fields.
PLEASE NOTE: The find matches in most cases also other fields than those specified in aFieldTypes. Always loop through the returned contacts to check match in the required fields.
Returns:
Array of matching contact IDs.
See also:
CContactDatabase::FindLC.
IMPORT_C RFs& CPbkContactEngine::FsSession  )  const
 

Returns an open file server session.

Returns:
A handle to a file server session.
IMPORT_C HBufC* CPbkContactEngine::GetContactTitleL const CPbkContactItem aItem  )  const
 

Gets a title text for a contact or localised text for unnamed contact if contact contains no title.

Parameters:
aItem  Contact item for which to make the title.
Returns:
A buffer containing the title or unnamed text if no title can be generated. Caller is responsible of deleting the returned buffer.
IMPORT_C HBufC* CPbkContactEngine::GetContactTitleOrNullL const MPbkFieldDataArray aContactData  ) 
 

Similar to GetContactTitleL but returns NULL if contact contains no title.

Uses the MPbkFieldDataArray interface to access the field content.

Parameters:
aContactData  The contact field data array.
Returns:
Contact title, NULL if field array did not contain any fields used to for constructing contact titles.
See also:
CPbkContactEngine::GetContactTitleL
IMPORT_C TContactItemId CPbkContactEngine::GetSpeedDialFieldL TInt  aSpeedDialPosition,
TDes &  aPhoneNumber
const
 

Returns a speed dial contact.

Parameters:
aSpeedDialPosition  Speed dial position number.
aPhoneNumber  Phone number
See also:
CContactDatabase::GetSpeedDialFieldL.
IMPORT_C TBool CPbkContactEngine::IsSpeedDialAssigned const CPbkContactItem aItem,
TInt  aFieldIndex
const
 

Returns ETrue if this field has been assigned a speed dial position.

Parameters:
aItem  contact Item to check for speed dial.
aFieldIndex  Index of the field to check. This is an index into aItem.CardFields().
Returns:
ETrue if Speed dial exitst, EFalse if not.
IMPORT_C TBool CPbkContactEngine::IsTitleField TPbkFieldId  aFieldId  )  const
 

Returns ETrue if field is one of the fields used in building the contact title.

Parameters:
aFieldId  The id of the field.
Returns:
ETrue if aFieldId is type of a field used to build contact titles.
See also:
GetContactTitleL

GetContactTitleOrNullL

IMPORT_C CContactIdArray* CPbkContactEngine::MatchPhoneNumberL const TDesC &  aNumber,
const TInt  aMatchLengthFromRight
 

Call-through for new Phone number matching function in 6.2 version of class CContactDatabase.

If you don't need any other functionality from CPbkContactEngine than this consider using the CContactDatabase API directly. See Symbian Contacts Model documentation for CContactDatabase::MatchPhoneNumberL use.

See also:
CContactDatabase::MatchPhoneNumberL(const TDesC&,const TInt)
IMPORT_C TPbkNameOrder CPbkContactEngine::NameDisplayOrderL  ) 
 
IMPORT_C TChar CPbkContactEngine::NameSeparator  )  const
 
static IMPORT_C CPbkContactEngine* CPbkContactEngine::NewL const TDesC &  aFileName,
TBool  aReplace = EFalse,
RFs *  aFs = NULL
[static]
 
static IMPORT_C CPbkContactEngine* CPbkContactEngine::NewL RFs *  aFs = NULL  )  [static]
 

Creates a new Phonebook engine object and connects to the default contact database.

If the default database does not exist it is created.

Parameters:
aFs  An open file server connection. If !=NULL aFs is used instead of a locally created RFs connection. aFs must remain connected for the lifetime of the returned object.
Returns:
A new instance of this class.
Exceptions:
KErrCorrupt  if the database is corrupted.
IMPORT_C CContactGroup* CPbkContactEngine::OpenContactGroupL TContactItemId  aId  ) 
 

Opens a Contact group for modification.

Parameters:
aId  Groups id
Returns:
Contact group object.
See also:
CContactDatabase::OpenContactL
IMPORT_C CContactGroup* CPbkContactEngine::OpenContactGroupLCX TContactItemId  aId  ) 
 

Opens a Contact group for modification.

Pushes the returned contact group object and a lock item on the cleanup stack.

Parameters:
aId  Groups id
Returns:
Contact group object.
See also:
CContactDatabase::OpenContactLX
IMPORT_C CPbkContactItem* CPbkContactEngine::OpenContactL TContactItemId  aContactId  ) 
 

Opens a contact and returns a phonebook contact item.

Parameters:
aContactId  Contact item id to be opened.
Returns:
A Phonebook contact item that is marked as open in the database.
See also:
CContactDatabase::OpenContactL
IMPORT_C CPbkContactItem* CPbkContactEngine::OpenContactLCX TContactItemId  aContactId  ) 
 

Same as OpenContactL, but leaves a lock record AND the opened contact object on the cleanup stack.

Use CleanupStack::PopAndDestroy(2) to close the contact and destroy the returned object. First pop pops the contact object and second the lock object.

Parameters:
aContactId  Contact item id to open.
Returns:
A Phonebook contact item that is marked as open in the database.
See also:
CContactDatabase::OpenContactLX
IMPORT_C CContactGroup* CPbkContactEngine::ReadContactGroupL TContactItemId  aId  ) 
 

Reads a Contact group.

Parameters:
aId  Group id.
Returns:
Contact group object.
See also:
CContactDatabase::ReadContactL
IMPORT_C CPbkContactItem* CPbkContactEngine::ReadContactL TContactItemId  aContactId,
const CPbkFieldIdArray *  aFieldTypes = NULL
 

Reads a contact and returns a phonebook contact item.

Parameters:
aContactId  Contact item id to be read.
aFieldTypes  Array of types of fields to read in, all fields are read if NULL (which is default). NOTE: when using this parameter ReadContactL may return more fields than expected; for example if aFieldTypes contains any phonenumber the method may return all phone number fields of the contact.
Returns:
A new Phonebook contact item.
See also:
CContactDatabase::ReadContactL
IMPORT_C CPbkContactItem* CPbkContactEngine::ReadContactLC TContactItemId  aContactId,
const CPbkFieldIdArray *  aFieldTypes = NULL
 

Same as ReadContactL, but leaves the returned contact item on the cleanup stack.

Parameters:
aContactId  Contact item id to be read.
aFieldTypes  Array of types of fields to read in, all fields are read if NULL (which is default). NOTE: when using this parameter ReadContactL may return more fields than expected; for example if aFieldTypes contains any phonenumber the method may return all phone number fields of the contact.
Returns:
A new Phonebook contact item.
IMPORT_C CPbkContactItem* CPbkContactEngine::ReadMinimalContactLC TContactItemId  aContactId  ) 
 

Same as ReadContactLC but reads only minimal information.

See Symbian Contacts Model documentation for definition of "minimal" in this case.

Parameters:
aContactId  Contact item id to be read.
Returns:
A new phonebook contact item. Leaves the item on the cleanup stack.
See also:
CContactDatabase::ReadMinimalContactL
IMPORT_C void CPbkContactEngine::RemoveContactFromGroupL TContactItemId  aItemId,
TContactItemId  aGroupId
 

Removes a contact from a group.

Parameters:
aItemId  Contact to be removed from group.
aGroupId  Group where the contact will be removed from.
See also:
CContactDatabase::RemoveContactFromGroupL
IMPORT_C void CPbkContactEngine::RemoveSpeedDialFieldL TContactItemId  aContactId,
TInt  aSpeedDialPosition
 

Removes a speed dial from a contact.

Parameters:
aContactId  Contact item to remove the speed dial from.
aSpeedDialPosition  Speed dial position number to remove.
See also:
CContactDatabase::RemoveSpeedDialFieldL.
static IMPORT_C CPbkContactEngine* CPbkContactEngine::ReplaceL RFs *  aFs = NULL  )  [static]
 

Replaces the default contact database and connects to it.

See Symbian Contacs model documentation for CContactDatabase::ReplaceL for possible leave codes. PLEASE NOTE: all data in the existing database will be lost!

Parameters:
aFs  An open file server connection. If !=NULL aFs is used instead of a locally created RFs connection. aFs must remain connected for the lifetime of the returned object.
Returns:
A new instance of this class.
See also:
CContactDatabase::ReplaceL
IMPORT_C void CPbkContactEngine::SetCompressUi MPbkCompressUi *  aCompressiUi  ) 
 
IMPORT_C void CPbkContactEngine::SetFieldAsSpeedDialL CPbkContactItem aItem,
TInt  aFieldIndex,
TInt  aSpeedDialPosition
 

Sets a speed dial to a contact field.

Parameters:
aItem  Contact item to add speed dial to.
aFieldIndex  Field index to add Speed dial to.
aSpeedDialPosition  Speed dial position number to set to the field.
See also:
CContactDatabase::SetFieldAsSpeedDialL
IMPORT_C void CPbkContactEngine::SetNameDisplayOrderL TPbkNameOrder  aNameOrder  ) 
 
IMPORT_C void CPbkContactEngine::SetNameSeparatorL TChar  aSeparator  ) 
 
const CPbkSortOrderManager& CPbkContactEngine::SortOrderManager  )  const
 
static IMPORT_C CPbkContactEngine* CPbkContactEngine::Static  )  [static]
 

Returns the global Phonebook engine instance, NULL if no instance created yet.

Note1: Uses thread local storage (TLS), which is slow. Cache the returned pointer if it is used more than one time! Note2: Only the first engine instance created in calling thread can be accessed with this function.

Returns:
Global Phonebook engine instance.
IMPORT_C const TDesC& CPbkContactEngine::UnnamedTitle  )  const
 

Returns the localised title text to use for unnamed contacts.

Returns:
Localised title text to use for unnamed contacts.

Friends And Related Function Documentation

friend class CContactDbConnection [friend]
 
friend class CPbkContactChangeNotifier [friend]
 
friend class CPbkSharedDataObserver [friend]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top