MNcdProvider Class Reference

class MNcdProvider : public MCatalogsBase

MNcdProvider provides functions to NCD specific functionality, such as purchase history access, subscription management, search, observing major events etc.

Inherits from

Constructor & Destructor Documentation

~MNcdProvider()

~MNcdProvider()[protected, inline, virtual]

Member Functions Documentation

AddConfigurationL(const MNcdKeyValuePair &)

voidAddConfigurationL(const MNcdKeyValuePair &aConfiguration)[pure virtual]

Adds a configuration that will be sent to content providers.

Only one value per key is accepted. If the key already exists, it's old value is replaced with the new one. The only exception are keys that match NcdConfigurationKeys::KCapability. The number of capability keys is not limited, but their (folded) values are ensured to be unique.

MNcdProvider::RemoveConfigurationL NcdConfigurationKeys
Exceptions
Leave

System wide error code.

Parameters

const MNcdKeyValuePair & aConfigurationConfiguration to be added.

ClearCacheL(TRequestStatus &)

voidClearCacheL(TRequestStatus &aStatus)[pure virtual]

Clears the entire client cache (nodes, icons, previews)

Note:

The client should release all nodes and close all open files before calling this method.

Parameters

TRequestStatus & aStatus

ClearSearchResultsL()

voidClearSearchResultsL()[pure virtual]

Clears all search results. This method should be called before starting a new search.

Note:

This method only marks the search result nodes for removal and makes them unavailable, therefore it doesn't take a long time to complete.

Previous result nodes need to be released to remove them from cache.

ConfigurationsL()

RPointerArray< CNcdKeyValuePair >ConfigurationsL()const [pure virtual]

Returns a list of configurations that are used when communicating with content providers.

MNcdProvider::AddConfigurationL MNcdProvider::RemoveConfigurationL
Exceptions
KErrNotFound

if no configurations have been set

Leave

System wide error code.

DownloadFileL(const TDesC &, const TDesC &, MNcdFileDownloadOperationObserver &)

MNcdFileDownloadOperation *DownloadFileL(const TDesC &aUri,
const TDesC &aTargetFileName,
MNcdFileDownloadOperationObserver &aObserver
)[pure virtual]

Downloads a file from the given URI. The file is not handled by the engine, the file should be handled by the user of this interface as it sees fit.

Note:

The reference count of the operation object is increased by one. So, Release function of the operation should be called when the operation is not needed anymore.

The file will be moved to the target location after it has been fully downloaded. Any existing file with the same name will be overwritten.

Parameters

const TDesC & aUriSource URI
const TDesC & aTargetFileNameFull path and name for the target file.
MNcdFileDownloadOperationObserver & aObserver

IsFixedApL()

TBool IsFixedApL()[pure virtual]

Tells whether fixed access point defined in engine's configuration file is used. In this case AP selection possibility may need to be disabled in UI.

leave
System wide error code.

IsSimChangedL()

TBool IsSimChangedL()[pure virtual]

Tells whether the SIM was changed or removed since the previous startup.

NodeL(const TDesC &, const TDesC &)

MNcdNode *NodeL(const TDesC &aNameSpaceId,
const TDesC &aNodeId
)const [pure virtual]

Retrieves a node identified by a namespace Id and a node Id.

Exceptions
Leave

KErrNotFound if the node is not found from the RAM or database cache.

Leave

System wide error code.

Parameters

const TDesC & aNameSpaceIdNamespace of the requested node. Node Ids are unique inside a specific namespace.
const TDesC & aNodeIdId of the requested node.

NodeL(const MNcdPurchaseDetails &)

MNcdNode *NodeL(const MNcdPurchaseDetails &aDetails)const [pure virtual]

Retrieves a node identified by purchase history details

Exceptions
Leave

System wide error code.

Parameters

const MNcdPurchaseDetails & aDetailsPurchase details

OperationsL()

RCatalogsArray< MNcdOperation >OperationsL()const [pure virtual]

Returns a list of currently active operations for progress monitoring and operation management. The returned operation objects have their reference counts incremented, the items must be released after use e.g. with a call to the array's ResetAndDestroy().

Note:

Lifetime of the operation objects cannot exceed the lifetime of the provider object. If there are unreleased references to a provider's operation objects when the last reference to the provider object is released, a panic will be raised.

Exceptions
Leave

System wide error code.

MNcdOperation

PurchaseHistoryL()

MNcdPurchaseHistory *PurchaseHistoryL()const [pure virtual]

Returns a handle to purchase history. Purchased, downloaded and installed content can be accessed via the purchase history.

Exceptions
Leave

System wide error code.

RemoveConfigurationL(const TDesC &)

voidRemoveConfigurationL(const TDesC &aKey)[pure virtual]

Removes a configuration. This configuration will no longer be sent to content providers.

Exceptions
KErrNotFound

The configuration is not present.

KErrAccessDenied

The configuration has been added by the root-node provider and can not be removed by the user.

MNcdProvider::AddConfigurationL

Parameters

const TDesC & aKeyKey of the configuration to be removed.

RootNodeL()

MNcdNode *RootNodeL()[pure virtual]

Returns the root node for the provider. Root node provides access to node hierarchy.

Exceptions
Leave

System wide error code.

SchemeNodeL(const TDesC &, const TDesC &, const TDesC &, TNcdSchemeNodeType, TBool, TBool)

MNcdNode *SchemeNodeL(const TDesC &aNameSpaceId,
const TDesC &aEntityId,
const TDesC &aServerUri,
TNcdSchemeNodeTypeaType,
TBoolaRemoveOnDisconnect,
TBoolaForceCreate
)const [pure virtual]

Retrieves a scheme node identified by a namespace Id, a node metadata Id and a server URI. If the scheme node is created, it will not have any parent. The scheme node is automatically set as favourite node.

Exceptions
Leave

KErrNotFound if aForceCreate parameter has been set as EFalse and the metadata is not found from the RAM or database cache.

Leave

KErrArgument if the metadata already exists but is of different type than the given scheme node type.

Leave

System wide error code.

Parameters

const TDesC & aNameSpaceIdNamespace of the requested node. Node Ids are unique inside a specific namespace.
const TDesC & aEntityIdId of the requested node metadata.
const TDesC & aServerUriServer URI of the requested node.
TNcdSchemeNodeType aTypeType of the scheme node.
TBool aRemoveOnDisconnectIf ETrue, the scheme node is removed from favourites when the client-server session is closed.
TBool aForceCreateETrue means that, if necessary, a scheme node will always be created. Notice, that an uninitialized node object will be returned for an invalid name space or node metadata id. EFalse means that the scheme node will be returned only if the node itself or the metadata for it already existed in the RAM or database cache.

SetDefaultConnectionMethodL(const TNcdConnectionMethod &)

voidSetDefaultConnectionMethodL(const TNcdConnectionMethod &aMethod)[pure virtual]

Sets the default connection method used for network access.

Note:

Not stored persistently. A client needs to set this again every time it creates the provider.

Parameters

const TNcdConnectionMethod & aMethodIdentifier of the connection method to use by default.

SetObserver(MNcdProviderObserver *)

voidSetObserver(MNcdProviderObserver *aObserver)[pure virtual]

Set the provider observer interface.

Note:

NCD provider client should always set an observer to get callbacks.

Parameters

MNcdProviderObserver * aObserverObserver interface to receive NCD provider callbacks. If NULL, no callbacks will be made.

SetStringLocalizer(MNcdClientLocalizer &)

voidSetStringLocalizer(MNcdClientLocalizer &aLocalizer)[pure virtual]

Sets the client string localizer interface to be used for server-initiated localizable string information.

Parameters

MNcdClientLocalizer & aLocalizerLocalizer to be used for translating localization keys into user viewable strings.

SubscriptionsL()

MNcdSubscriptionManager *SubscriptionsL()const [pure virtual]

Returns a pointer to subscription manager object.

Exceptions
Leave

System wide error code.