class MVPbkStoreContact : public MVPbkBaseContact |
An interface for store contacts.
A store contact is a contact that includes all the fields of the contact. For this reason it usually contains more data compared to the corresponding view contact. It can contain all types of fields that are supported by the its parent store.
The store contact can be edited if it's not read-only. The client must first lock the existing contact then edit it and finally commit the changes.
Public Member Functions | |
---|---|
~MVPbkStoreContact() | |
TInt | AddFieldL(MVPbkStoreContactField *) |
void | CommitL(MVPbkContactObserver &) |
MVPbkStoreContactField * | CreateFieldLC(const MVPbkFieldType &) |
const MVPbkStoreContactFieldCollection & | Fields() |
MVPbkStoreContactFieldCollection & | Fields() |
MVPbkContactGroup * | Group() |
MVPbkContactLinkArray * | GroupsJoinedLC() |
TBool | IsSame(const MVPbkBaseContact &) |
TBool | IsSame(const MVPbkViewContact &) |
void | LockL(MVPbkContactObserver &) |
TInt | MaxNumberOfFieldL(const MVPbkFieldType &) |
MVPbkContactStore & | ParentStore() |
void | PushL() |
void | RemoveAllFields() |
void | RemoveField(TInt) |
TAny * | StoreContactExtension(TUid) |
TInt | AddFieldL | ( | MVPbkStoreContactField * | aField | ) | [pure virtual] |
Adds a new field to the contact.
The field must be previously created with CreateFieldLC and it must NOT be used after adding.
If the client needs the field after adding it must be retrieved using Fields().
The index of the new field in the field collection.
MVPbkStoreContactField * aField | A new field that was created using CreateFieldLC. This object takes ownership of the field. aField must not be NULL or VPbkError::Panic(VPbkError::ENullContactField) is raised. aField must be returned from this->CreateFieldLC or VPbkError::Panic(VPbkError::EInvalidContactField) panic is raised. this->Fields().FieldCount() == old(this->Fields().FieldCount()) + 1 |
void | CommitL | ( | MVPbkContactObserver & | aObserver | ) | const [pure virtual] |
Saves the contact to its associated store asynchronously.
LockL must have been called before commit if this is an existing contact. Otherwise ContactOperationFailed is called with KErrAccessDenied.
MVPbkContactObserver & aObserver | The observer to call back when this operation completes. The observer will not be called if this function leaves. |
MVPbkStoreContactField * | CreateFieldLC | ( | const MVPbkFieldType & | aFieldType | ) | const [pure virtual] |
Creates a new field for this contact.
The new field must be added to the contact using AddFieldL.
A new field object. The returned object is left on the cleanup stack.
const MVPbkFieldType & aFieldType | A type of the field to create. Must be found in ParentStore().SupportedFieldTypes(). |
const MVPbkStoreContactFieldCollection & | Fields | ( | ) | const [pure virtual] |
Returns this contact's fields (read only). This contact's fields in read only mode.
MVPbkStoreContactFieldCollection & | Fields | ( | ) | [pure virtual] |
Returns this contact's fields (read-write).
A collection of contact fields.
MVPbkContactGroup * | Group | ( | ) | [pure virtual] |
Returns the group interface of the store contact if this contact is a group. If this contact is not a group, NULL is returned.
The group interface or NULL.
MVPbkContactLinkArray * | GroupsJoinedLC | ( | ) | const [pure virtual] |
Returns the identifiers of the groups that the contact belongs to.
The groups that this contact belongs to.
TBool | IsSame | ( | const MVPbkBaseContact & | aOtherContact | ) | const [inline, virtual] |
const MVPbkBaseContact & aOtherContact |
TBool | IsSame | ( | const MVPbkViewContact & | aOtherContact | ) | const [inline, virtual] |
Returns true if this a representation of the same contact.
ETrue if this and aOtherContact represent the same contact.
const MVPbkViewContact & aOtherContact | a contact this contact is compared against. |
void | LockL | ( | MVPbkContactObserver & | aObserver | ) | const [pure virtual] |
Locks this contact for modification asynchronously.
Once the observer is notified this contact is locked and cab be modified.
MVPbkContactObserver & aObserver | The observer to call back when the operation completes. The observer will not be called if this function leaves. |
TInt | MaxNumberOfFieldL | ( | const MVPbkFieldType & | aType | ) | const [pure virtual] |
Returns the maximum amount of fields of given type that can be inserted to the contact.
E.g. A USIM ADN contact can have 1 or more phone numbers but there is a limit that the store in USIM defines. On the other hand the contact in the Contacts Model data base doesn't have limits.
The maximum amount fields of given type in the contact or KVPbkStoreContactUnlimitedNumber it there is no limit set by the store contact
const MVPbkFieldType & aType | The field type of the field |
MVPbkContactStore & | ParentStore | ( | ) | const [pure virtual] |
Returns this contact's parent store.
The parent store of the contact.
void | PushL | ( | ) | [inline] |
Pushes an item on the cleanup stack.
Clients must use either this function or CleanupDeletePushL from e32base.h.
CleanupStack::PushL(TAny*) must not be used because the virtual destructor of M-class won't be called. This function should be used to make sure that the virtual destructor of this object is called when popped and destroyed from the cleanup stack.
void | RemoveAllFields | ( | ) | [pure virtual] |
Removes all the fields from the contact.
The contact is not read-only otherwise panics with VPbkError::EInvalidAccessToReadOnlyContact. this->Fields().FieldCount() == 0
void | RemoveField | ( | TInt | aIndex | ) | [pure virtual] |
Removes a field from the contact.
TInt aIndex | A zero-based index of the field to remove. aIndex >= 0 && aIndex < FieldCount(). Panics with VPbkError::EInvalidFieldIndex. The contact is not read-only otherwise panics with VPbkError::EInvalidAccessToReadOnlyContact. this->Fields().FieldCount() == old(this->Fields().FieldCount()) - 1 |