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 |