#include <app/MVPbkContactViewBase.h>
class MVPbkContactViewBase |
Public Member Functions | |
---|---|
virtual | ~MVPbkContactViewBase() |
pure virtual void | AddObserverL(MVPbkContactViewObserver &) |
pure virtual void | ChangeSortOrderL(const MVPbkFieldTypeList &) |
pure virtual const MVPbkViewContact & | ContactAtL(TInt) |
pure virtual TInt | ContactCountL() |
virtual TAny * | ContactViewBaseExtension(TUid) |
pure virtual MVPbkContactBookmark * | CreateBookmarkLC(TInt) |
pure virtual MVPbkContactLink * | CreateLinkLC(TInt) |
pure virtual TInt | IndexOfBookmarkL(const MVPbkContactBookmark &) |
pure virtual TInt | IndexOfLinkL(const MVPbkContactLink &) |
pure virtual TBool | MatchContactStore(const TDesC &) |
pure virtual TBool | MatchContactStoreDomain(const TDesC &) |
pure virtual void | RefreshL() |
pure virtual void | RemoveObserver(MVPbkContactViewObserver &) |
pure virtual const MVPbkFieldTypeList & | SortOrder() |
pure virtual TVPbkContactViewType | Type() |
pure virtual MVPbkContactViewFiltering * | ViewFiltering() |
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.
See also: CVPbkContactManager::CreateContactViewLC
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.
Parameter | Description |
---|---|
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. |
See also: CVPbkSortOrder
Parameter | Description |
---|---|
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() |
Parameter | Description |
---|---|
aIndex | An index of the contact in this view. |
Returns: A reference to a contact in this view at aIndex. aIndex >= 0 VPbkError::Panic(VPbkError::EInvalidContactIndex) is raised if the precondition does not hold.
TInt | ContactCountL | ( | ) | const [pure virtual] |
Returns the number of contacts in this view.
Returns: The number of contacts.
MVPbkContactBookmark * | CreateBookmarkLC | ( | TInt | aIndex | ) | const [pure virtual] |
Creates and returns a bookmark that points to the view contact at aIndex.
Parameter | Description |
---|---|
aIndex | An index of the contact in the view. |
Returns: A new bookmark to the view item. aIndex >= 0 VPbkError::Panic(VPbkError::EInvalidContactIndex) is raised if the precondition does not hold.
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() |
Parameter | Description |
---|---|
aIndex | An index of the contact for which the link is created. |
Returns: A new link object pointing to contact at aIndex or NULL if the link can't be created (e.g. a folder). aIndex >= 0 VPbkError::Panic(VPbkError::EInvalidContactIndex) is raised if the precondition does not hold.
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.
Parameter | Description |
---|---|
aContactBookmark | A bookmark that identifies a contact in the view. |
Returns: An index of the contact in the view or KErrNotFound.
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.
Parameter | Description |
---|---|
aContactLink | A link whose index is searched for. |
Returns: The index of the link or KErrNotFound.
Returns ETrue if this view is from a store identified by aContactStoreUri.
See also: TVPbkContactStoreUriPtr::UriDes
Parameter | Description |
---|---|
aContactStoreUri | The whole URI of the contact store. |
Returns: ETrue if the view was from the given store.
Returns ETrue if this view is from a store domain identified by aContactStoreDomain.
See also: TVPbkContactStoreUriPtr
Parameter | Description |
---|---|
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. |
Returns: ETrue if the view was from the same store domain.
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.
Parameter | Description |
---|---|
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.
Returns: The sort order of the view.
TVPbkContactViewType | Type | ( | ) | const [pure virtual] |
Returns type of this contact view.
Returns: A contact view type.
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.
Returns: A filtering interface or NULL