CContactNamedRemoteView Class Reference

#include <app/cntviewbase.h>

class CContactNamedRemoteView : public CContactRemoteView, public CContactRemoteView

Inherits from

Detailed Description

A named remote contact view.

This class enables multiple clients to share a named server side view. It also provides a function to change the sort order. If the sort order is changed, a notification is sent to all users of the named view.

Member Function Documentation

CContactViewBase_Reserved_1 ( TFunction, TAny * )

TAny *CContactViewBase_Reserved_1(TFunctionaFunction,
TAny *aParams
)

Reimplemented from CContactRemoteView::CContactViewBase_Reserved_1(TFunction,TAny *)

This is a reserved virtual exported function that is used for BC proofing against present and future additions of new exported virtual functions.
Parameters
aFunctionAn enum value that identifies which helper function is called.
aParamsParameters to the helper function being called.
Return Value
Any return values of the helper function called from this function or NULL.
Capability
ReadUserData

ChangeSortOrderL ( const RContactViewSortOrder & )

IMPORT_C voidChangeSortOrderL(const RContactViewSortOrder &aSortOrder)

Re-sorts the server side view using the specified sort order.

The sort is done using a low priority idle time active object. When sorting is complete, all view observers are notified.

Parameters
aSortOrderSpecifies the fields to use to sort the items in the view.
Capability
ReadUserData

NewL ( MContactViewObserver &, const TDesC &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences )

IMPORT_C CContactNamedRemoteView *NewL(MContactViewObserver &aObserver,
const TDesC &aName,
const CContactDatabase &aDb,
const RContactViewSortOrder &aSortOrder,
TContactViewPreferencesaContactTypes
)[static]

Allocates and constructs a named remote contact view object.

This function causes a new named local view object to be created in the contacts server, unless one already exists with the specified name. In that case, this client is given shared access to it.

The sort order and view preferences parameters are only used if a new view object is created in the server. They cannot be used to change the sort order or view preferences of an existing view in the server. If you want to re-sort a shared view, use ChangeSortOrderL().

Parameters
aObserverAn observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic.
aNameThe name of the view object in the server. If a view with this name already exists, it is shared. If not, a new view with this name is created.
aDbThe underlying database containing the contact items.
aSortOrderSpecifies the fields to use to sort the items in the new server side view, if one is created.
aContactTypesSpecifies which types of contact items should be included in the new server side view and the behaviour for items that do not have content in any of the fields specified in the sort order. This is only used if a new server side view is created.
Return Value
The newly constructed named remote view object.
Capability
ReadUserData

NewL ( MContactViewObserver &, const TDesC &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences, const TDesC8 & )

IMPORT_C CContactNamedRemoteView *NewL(MContactViewObserver &aObserver,
const TDesC &aName,
const CContactDatabase &aDb,
const RContactViewSortOrder &aSortOrder,
TContactViewPreferencesaContactTypes,
const TDesC8 &aSortPluginName
)[static]

Allocates and constructs a named remote contact view object.

This function causes a new named local view object to be created in the contacts server, unless one already exists with the specified name. In that case, this client is given shared access to it.

The sort order and view preferences parameters are only used if a new view object is created in the server. They cannot be used to change the sort order or view preferences of an existing view in the server. If you want to re-sort a shared view, use ChangeSortOrderL().

Parameters
aObserverAn observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic.
aNameThe name of the view object in the server. If a view with this name already exists, it is shared. If not, a new view with this name is created.
aDbThe underlying database containing the contact items.
aSortOrderSpecifies the fields to use to sort the items in the new server side view, if one is created.
aContactTypesSpecifies which types of contact items should be included in the new server side view and the behaviour for items that do not have content in any of the fields specified in the sort order. This is only used if a new server side view is created.
aSortPluginNameSpecifies a plug-in that will be used to compare view contacts when the the view is sorted. This name is used by ECOM to select the plugin, and is matched with the "default_data" of all ECOM plugins that support the required interface.
Return Value
The newly constructed named remote view object.
Capability
ReadUserData