epoc32/include/mw/ineturilist.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Class for opening and manipulating the internet uri list.
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef __INETURILIST_H__
    25 #define __INETURILIST_H__
    26 
    27 #include <ineturilistdef.h>
    28 #include <tldlistdef.h>
    29 #include <ineturi.h>
    30 #include <uri8.h>
    31 #include <babitflags.h>
    32 
    33 class CInetUriListImpl;
    34 
    35 
    36 
    37 
    38 /**
    39 This class defines the interface that can be implemented by an application to receive the
    40 query results. 
    41 
    42 @publishedAll
    43 @released
    44 */
    45 class MQueryResultsCallback
    46 	{
    47 	public:
    48 	/**
    49 	The callback function that will be called when there is at least one query result.
    50 	
    51 	@param aUri The Inet URI object. Ownership will be passed. The application should close the 
    52 				object handle.
    53 	@return ETrue - More query results, if any, should follow.
    54 			EFalse - No more query result is required and querying will be stopped.
    55 	*/
    56 	virtual TBool OnQueryResultsL ( RInetUri aUri ) =0;
    57 	};
    58 
    59 
    60 /**
    61 This class defines the interface that can be implemented by an application that wishes to do
    62 protocol and scheme-based normalisation of the URI before query operation.
    63 
    64 @publishedAll
    65 @released
    66 */
    67 class MUriCustomiser
    68 	{
    69 	public:
    70 	/**
    71 	The callback function that will be called to perform scheme and protocol-based normalisation.
    72 	The URI will be syntax normalised before calling this function.
    73 	
    74 	@param aUri The syntax normalised URI.
    75 	@return Final normalised URI, which is syntax and protocol/scheme based.
    76 	*/
    77 	virtual CUri8* OnUriCustomisationL ( const TUriC8& aUri ) =0;	
    78 	};
    79 
    80 
    81 
    82 /**
    83 RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the
    84 URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and
    85 its associated properties.
    86 
    87 @publishedAll
    88 @released
    89 */
    90 class RInetUriList
    91 	{
    92 public:
    93 	IMPORT_C RInetUriList ();
    94 
    95 	IMPORT_C void OpenL ();
    96 	IMPORT_C void Close ();
    97 	
    98 	IMPORT_C void AddL ( const RInetUri& aInetUri );
    99 	IMPORT_C void RemoveL ( const RInetUri& aInetUri );
   100 	IMPORT_C void UpdateL ( const RInetUri& aInetUri );
   101 	
   102 	IMPORT_C RInetUri OpenInetUriL ( const TDesC8& aUri, InetUriList::TServiceType aServiceType );
   103 	IMPORT_C TInt Count ( InetUriList::TServiceType aServiceType, InetUriList::TListType aListType );
   104 	
   105 	IMPORT_C TInt GetListType ( const TDesC8& aUri, InetUriList::TServiceType aServiceType, InetUriList::TListType& aListType );
   106 	
   107 	IMPORT_C void QueryUriL ( const TQueryArgs& aArgs, MQueryResultsCallback* aQueryCallback, MUriCustomiser* aUriOptimiser =NULL );
   108 	IMPORT_C void QueryTldInfoL ( const TPolicyQueryArgs& aQueryArgs, TQueryResults& aResultArgs );
   109 private:
   110 	CInetUriListImpl* iInetUriListImpl; // // The internal list object that this handle is connected to
   111 	};
   112 
   113 #endif //__INETURILIST_H__