class MVPbkContactViewBase |
An common interface for different contact views.
The contact view interface has many implementations. It can be a view from a single contact store or it can be a composite of contact/group views from different stores. It's also possible that it contains folding items that are not from any store. The client defines the view structure.
The most common usage is that client uses CVPbkContactManager for creating a contact view and defines the structure of the view. CVPbkContactManager::CreateContactViewLC
Public Member Functions | |
---|---|
~MVPbkContactViewBase() | |
void | AddObserverL(MVPbkContactViewObserver &) |
void | ChangeSortOrderL(const MVPbkFieldTypeList &) |
const MVPbkViewContact & | ContactAtL(TInt) |
TInt | ContactCountL() |
TAny * | ContactViewBaseExtension(TUid) |
MVPbkContactBookmark * | CreateBookmarkLC(TInt) |
MVPbkContactLink * | CreateLinkLC(TInt) |
TInt | IndexOfBookmarkL(const MVPbkContactBookmark &) |
TInt | IndexOfLinkL(const MVPbkContactLink &) |
TBool | MatchContactStore(const TDesC &) |
TBool | MatchContactStoreDomain(const TDesC &) |
void | RefreshL() |
void | RemoveObserver(MVPbkContactViewObserver &) |
const MVPbkFieldTypeList & | SortOrder() |
TVPbkContactViewType | Type() |
MVPbkContactViewFiltering * | ViewFiltering() |
void | AddObserverL | ( | MVPbkContactViewObserver & | aObserver | ) | [pure virtual] |
Adds an observer to this contact view asynchronously.
The observer will be notified after it has been added to the view.
MVPbkContactViewObserver & aObserver | A new observer for the view. |
void | ChangeSortOrderL | ( | const MVPbkFieldTypeList & | aSortOrder | ) | [pure virtual] |
Changes sort order of the view asynchronously.
Clients of this view will get an event via MVPbkContactViewObserver interface when the order has been updated. The leaf view sends a pair of events. First it sends ContactViewUnavailable and then after the order has been changed ContactViewReady. However if the view is of type EVPbkCompositeView the client doesn't necessary receive ContactViewUnavailable at all because it might be that there is always some subview ready in the composite.
KErrArgument |
Possible reasons: a client tries to change a sort order of platform defined shared view against the platform setting. |
const MVPbkFieldTypeList & aSortOrder | A new sort order for this view. |
const MVPbkViewContact & | ContactAtL | ( | TInt | aIndex | ) | const [pure virtual] |
Returns a contact in this view.
The returned reference may be invalidated when this function is called again. For that reason clients should prefer not to save references to the contacts retrieved from this function.
KErrArgument |
if aIndex >= ContactCountL() |
TInt aIndex | An index of the contact in this view. |
TInt | ContactCountL | ( | ) | const [pure virtual] |
Returns the number of contacts in this view.
TAny * | ContactViewBaseExtension | ( | TUid | ) | [inline, virtual] |
Returns an extension point for this interface or NULL.
TUid |
MVPbkContactBookmark * | CreateBookmarkLC | ( | TInt | aIndex | ) | const [pure virtual] |
Creates and returns a bookmark that points to the view contact at aIndex.
TInt aIndex | An index of the contact in the view. |
MVPbkContactLink * | CreateLinkLC | ( | TInt | aIndex | ) | const [pure virtual] |
Creates and returns a link that points to contact at aIndex.
NOTE: If the view contact is not from any store it can return also NULL. E.g. if the view contact is a folding contact view that it's not saved to any store. The NULL is not pushed onto the cleanup stack.
KErrArgument |
if aIndex >= ContactCountL() |
TInt aIndex | An index of the contact for which the link is created. |
TInt | IndexOfBookmarkL | ( | const MVPbkContactBookmark & | aContactBookmark | ) | const [pure virtual] |
Returns an index of the contact in the view.
If the identifier is not found from the view then KErrNotFound is returned.
NOTE: the implementation of this function probably must loop the view which means that calling this function frequently or in a loop can be slow when there are lots of contacts.
const MVPbkContactBookmark & aContactBookmark | A bookmark that identifies a contact in the view. |
TInt | IndexOfLinkL | ( | const MVPbkContactLink & | aContactLink | ) | const [pure virtual] |
Returns The index of the aContactLink in this view.
If the identifier is not found from the view then KErrNotFound is returned. If the view is not from any store (e.g. a folding view) then it will also return KErrNotFound.
NOTE: the implementation of this function probably must loop the view which means that calling this function frequently or in a loop can be slow when there are lots of contacts.
const MVPbkContactLink & aContactLink | A link whose index is searched for. |
TBool | MatchContactStore | ( | const TDesC & | aContactStoreUri | ) | const [pure virtual] |
Returns ETrue if this view is from a store identified by aContactStoreUri.
const TDesC & aContactStoreUri | The whole URI of the contact store. |
TBool | MatchContactStoreDomain | ( | const TDesC & | aContactStoreDomain | ) | const [pure virtual] |
Returns ETrue if this view is from a store domain identified by aContactStoreDomain.
const TDesC & aContactStoreDomain | The domain part of the contact store URI. The domain can be retrieved from the whole contact store URI using class TVPbkContactStoreUriPtr and EContactStoreUriStoreType. An implementation compares the EContactStoreUriStoreType part of its own URI to aContactStoreDomain. |
void | RefreshL | ( | ) | [pure virtual] |
Refreshes the view contents asynchronously.
All handles to this view's contacts are invalidated. Clients of this view will get an event via MVPbkContactViewObserver interface when the view has been refreshed.
void | RemoveObserver | ( | MVPbkContactViewObserver & | aObserver | ) | [pure virtual] |
Removes an observer from this contact view.
This method can be called even if aObserver has not been previously added. In that case, no observers are removed.
MVPbkContactViewObserver & aObserver | The observer to be removed. |
const MVPbkFieldTypeList & | SortOrder | ( | ) | const [pure virtual] |
Returns the current sort order of the view.
The sort order is a sub set of master field types from CVPbkContactManager.
MVPbkContactViewFiltering * | ViewFiltering | ( | ) | [pure virtual] |
Returns an interface for text based contact filtering support.
If the view doesn't support filtering then this returns NULL. Filtering must be supported in all views created from a contact store. However, it's possible to implement a view that doesn't need a filtering support and therefore clients must always check the returned pointer.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.