#include <app/MVPbkContactStore.h>
class MVPbkContactStore : public MVPbkObjectHierarchy |
Public Member Functions | |
---|---|
virtual | ~MVPbkContactStore() |
pure virtual void | Close(MVPbkContactStoreObserver &) |
pure virtual MVPbkContactLinkArray * | ContactGroupsLC() |
virtual MVPbkContactStore & | ContactStore() |
virtual TAny * | ContactStoreExtension(TUid) |
pure virtual MVPbkContactLink * | CreateLinkFromInternalsLC(RReadStream &) |
pure virtual MVPbkContactGroup * | CreateNewContactGroupLC() |
pure virtual MVPbkStoreContact * | CreateNewContactLC() |
pure virtual MVPbkContactView * | CreateViewLC(const CVPbkContactViewDefinition &, MVPbkContactViewObserver &, const MVPbkFieldTypeList &) |
pure virtual void | OpenL(MVPbkContactStoreObserver &) |
virtual MVPbkObjectHierarchy & | ParentObject() |
pure virtual void | ReplaceL(MVPbkContactStoreObserver &) |
pure virtual const MVPbkContactStoreInfo & | StoreInfo() |
pure virtual const MVPbkContactStoreProperties & | StoreProperties() |
Inherited Functions | |
---|---|
MVPbkObjectHierarchy::ObjectHierarchyExtension(TUid) | |
MVPbkObjectHierarchy::~MVPbkObjectHierarchy() |
A contact store interface that is implemented by all contact stores.
Using this interface clients can access a single contact store. Usually it's more suitable to use CVPbkContactManager and MVPbkContactStoreList for accessing stores because multiple stores can be handled at a same time.
The store is opened asynchronously and it must not be used before notification has arrived. If client opens the store it must also close the store after usage.
The interface can be used for retriveing properties and information of the store and also for creating a view, a new contact or a new group (if supported).
~MVPbkContactStore | ( | ) | [inline, virtual] |
Clients don't destroy the stores directly because they don't own them. The ownerships are managed by CVPbkContactManager.
void | Close | ( | MVPbkContactStoreObserver & | aObserver | ) | [pure virtual] |
Closes this contact store from a single observer.
This can be always called safely even if OpenL or ReplaceL hasn't been called. If the client calls OpenL it must also call this after usage, The observer will no longer receive events from this store. If there are other observers for the store then the store will remain open for them.
Parameter | Description |
---|---|
aObserver | An observer that was given in OpenL or ReplaceL. |
MVPbkContactLinkArray * | ContactGroupsLC | ( | ) | const [pure virtual] |
Returns contact groups contained in this store.
MVPbkContactStoreProperties::SupportsContactGroups must be true if this is used. Implementation should return an empty link array and not NULL.
Returns: Contact group identifiers contained in this store.
MVPbkContactStore & | ContactStore | ( | ) | const [inline, virtual] |
Reimplemented from MVPbkObjectHierarchy::ContactStore()const
Returns the contact store where this object originates from.
Returns: The Contact store.
MVPbkContactLink * | CreateLinkFromInternalsLC | ( | RReadStream & | aStream | ) | const [pure virtual] |
This is part of Virtual Phonebook internal framefork and not usable for clients. Clients use CVPbkContactManager for creating links from a stream.
Creates a link array from a stream. Stream contains the internals of the contact link. Internals are the contact store implementation specific part of the package format.
NOTE: this must work wheter the OpenL has been called or not. This means that a link can not contain any data that would need an open store before internalizing.
Parameter | Description |
---|---|
aStream | A stream containing the link internals. |
Returns: A new contact link.
MVPbkContactGroup * | CreateNewContactGroupLC | ( | ) | [pure virtual] |
Creates a new contact group associated to this store.
MVPbkContactStoreProperties::SupportsContactGroups must be true if this is used. The contact group might be saved to the store immeadiately depending on the store implementation. It is left open for editing. Use CommitL to commit the creation of the group and its content.
KErrNotSupported |
if the store doesn't support groups. Client should check store properties before calling this. |
See also: MVPbkContactStoreProperties MVPbkContactGroup MVPbkStoreContact MVPbkStoreContact::CommitL
Returns: A new contact group associated to this store. Caller takes the ownership of the returned contact group.
MVPbkStoreContact * | CreateNewContactLC | ( | ) | [pure virtual] |
Creates a new contact associated to this store.
The contact can be edited and then it must be committed by calling MVPbkStoreContact::CommitL for actually saving it to the store.
See also: MVPbkStoreContact MVPbkStoreContact::CommitL
Returns: A new contact associated to this store. Caller takes ownership of the returned contact.
MVPbkContactView * | CreateViewLC | ( | const CVPbkContactViewDefinition & | aViewDefinition, |
MVPbkContactViewObserver & | aObserver, | |||
const MVPbkFieldTypeList & | aSortOrder | |||
) | [pure virtual] |
Creates a new contact view from the store asynchronously.
Client gets the ownership of the view. The content of the view depends on the CVPbkContactViewDefinition. The client must wait the observer event before using the view.
See also: MVPbkContactView CVPbkContactViewDefinition
Parameter | Description |
---|---|
aViewDefinition | Defines the properties of the new view. |
aObserver | An observer for the view events. |
aSortOrder | Field types that are used in the view contact in the same order as in this list. Notice that stores may not support all possible field types in a view contact. The implementation of the view contact must have as many fields as the sort order. If the store doesn't support the field type in a view contact then it sets empty data to the field. |
Returns: A new contact view object. Caller takes ownership of the returned contact.
void | OpenL | ( | MVPbkContactStoreObserver & | aObserver | ) | [pure virtual] |
Opens this contact store asynchronously.
Calls back the observer when the opening completes. Notice that the same store instance can be opened by several observers.
KErrInUse |
If another asynchronous operation is already in progress. |
Parameter | Description |
---|---|
aObserver | An observer for the store. |
MVPbkObjectHierarchy & | ParentObject | ( | ) | const [inline, virtual] |
Reimplemented from MVPbkObjectHierarchy::ParentObject()const
Returns the parent object of this object. For the root of the hierarchy returns self.
Returns: The parent object.
void | ReplaceL | ( | MVPbkContactStoreObserver & | aObserver | ) | [pure virtual] |
Replaces an existing store and opens it asynchronously.
E.g. If the database is a file then this replaces the database if it's not locked by other clients. If the store implementation can not implment replacing then this behaves like OpenL.
If the store does not exist, it is created if possible. Calls back the observer when the opening completes.
Parameter | Description |
---|---|
aObserver | An observer for the store. |
const MVPbkContactStoreInfo & | StoreInfo | ( | ) | const [pure virtual] |
Returns a contact store information. Information can vary runtime.
Returns: Contact store information.
const MVPbkContactStoreProperties & | StoreProperties | ( | ) | const [pure virtual] |
Returns fixed properties of this contact store.
Fixed properties do not change when the store is open. The store must be opened before retrieving the properties.
Returns: Store properties.