RInetUriList Class Reference

#include <mw/ineturilist.h>

Link against: ineturilist.lib

class RInetUriList
Public Member Functions
RInetUriList()
IMPORT_C voidAddL(const RInetUri &)
IMPORT_C voidClose()
IMPORT_C TIntCount(InetUriList::TServiceType, InetUriList::TListType)
IMPORT_C TIntGetListType(const TDesC8 &, InetUriList::TServiceType, InetUriList::TListType &)
IMPORT_C RInetUriOpenInetUriL(const TDesC8 &, InetUriList::TServiceType)
IMPORT_C voidOpenL()
IMPORT_C voidQueryTldInfoL(const TPolicyQueryArgs &, TQueryResults &)
IMPORT_C voidQueryUriL(const TQueryArgs &, MQueryResultsCallback *, MUriCustomiser *)
IMPORT_C voidRemoveL(const RInetUri &)
IMPORT_C voidUpdateL(const RInetUri &)

Detailed Description

RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and its associated properties.

Constructor & Destructor Documentation

RInetUriList ( )

IMPORT_CRInetUriList()

A default RInetUriList constructor.

Member Function Documentation

AddL ( const RInetUri & )

IMPORT_C voidAddL(const RInetUri &aInetUri)

Add a new URI object to the list and its associated storage. Requires WriteDeviceData capability.

Parameters
aInetUriURI object that needs to be added.
Leave Codes
KErrPermissionDeniedIf the application is not having WriteDeviceData capabilities.

Close ( )

IMPORT_C voidClose()

Closes the URI list object.

Count ( InetUriList::TServiceType, InetUriList::TListType )

IMPORT_C TIntCount(InetUriList::TServiceTypeaServiceType,
InetUriList::TListTypeaListType
)

Returns the number of URIs present in the list based on the given service type and list type. Requires ReadDeviceData capabilities.

Parameters
aServiceTypeService type (EBrowser, EWapPush, EPushEMail, EVoip and so on.)
aListTypeList type (EWhiteList and EBlackList)
Return Value
Number of URIs present in the list.

GetListType ( const TDesC8 &, InetUriList::TServiceType, InetUriList::TListType & )

IMPORT_C TIntGetListType(const TDesC8 &aUri,
InetUriList::TServiceTypeaServiceType,
InetUriList::TListType &aListType
)

Retrieves the type associated with the URI by a given service type. Requires no capabilities.

Parameters
aUriURI descriptor for which list type need to be retrieved
aServiceTypeThe servicetype associated with the URI
aListTypeReturns the list type of URI( EWhiteList or EBlackList )
Return Value
KErrUriNotFound if the URI is not located in the list, otherwise returns KErrNone.

OpenInetUriL ( const TDesC8 &, InetUriList::TServiceType )

IMPORT_C RInetUriOpenInetUriL(const TDesC8 &aUri,
InetUriList::TServiceTypeaServiceType
)

Opens a URI object, which can be used to idenitfy the properties associated with the URI. Removing or updating the URI from the list can be done with this object. Requires ReadDeviceData capabilities.

Parameters
aUriURI input descriptor for which the information need to be retrieved
aServiceTypeService type of the URI
Return Value
RInetUri type object
Leave Codes
KErrPermissionDeniedThe application is not having ReadDeviceData capabilities.
KErrUriNotFoundThe URI is not present in the list for the specified service type.

OpenL ( )

IMPORT_C voidOpenL()

Opens a URI list object. The function connects to the URI list server.

QueryTldInfoL ( const TPolicyQueryArgs &, TQueryResults & )

IMPORT_C voidQueryTldInfoL(const TPolicyQueryArgs &aQueryArgs,
TQueryResults &aResultArgs
)

Queries on Uri either to fetch the TLD Policy data or get the List type of the given Uri.

Parameters
aResultArgsis out parmeter contains either List type info or Charset info. Based on the QueryType.
Leave Codes
KErrInvalidTLDThe TLD type if No policy data is available for the given TLD.

QueryUriL ( const TQueryArgs &, MQueryResultsCallback *, MUriCustomiser * )

IMPORT_C voidQueryUriL(const TQueryArgs &aArgs,
MQueryResultsCallback *aQueryCallback,
MUriCustomiser *aUriOptimiser = NULL
)

Queries the URI on the list. Different options are available for query operation. See TQueryArgs. The service type needs to be set in the query arguments for all queries. If a URI is set and no match criteria is specified, function will take EExact match as the matching criteria. The application must implement the result's callback function to receive the query results. The results can be controlled in the callback function, that is, the application can stop receiving the query results by returning EFalse from the query callback. Application can also implement URI customisation callback if it wishes to do protocol/ scheme-based normalisation before query.

Parameters
aArgsQuery arguments.
aQueryCallbackCallback function that will be called on each query result.
aUriOptimiserURI customiser callback function to do protocol/scheme-based normalisation before query.
Leave Codes
KErrServiceTypeNotPresentThe service type is not specified in the query argument.

RemoveL ( const RInetUri & )

IMPORT_C voidRemoveL(const RInetUri &aInetUri)

Removes a URI object from the list and its associated storage. Requires WriteDeviceData capabilities.

Parameters
aInetUriURI object that needs to be removed.
Leave Codes
KErrPermissionDeniedIf the application is not having WriteDeviceData capabilities.
KErrUriReadOnlyURI object is read-only and cannot be removed.

UpdateL ( const RInetUri & )

IMPORT_C voidUpdateL(const RInetUri &aInetUri)

Updates the URI object properties. Only favourite name and list type can be modified. Requires WriteDeviceData capabilities.

Parameters
aInetUriURI object that needs to be updated
Leave Codes
KErrPermissionDeniedIf the application is not having WriteDeviceData capabilities.
KErrUriReadOnlyURI object is read-only and cannot be modified.