epoc32/include/mw/ineturilist.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/ineturilist.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 
    20 /**
    21  @file
    22  @publishedAll
    23  @released
    24 */
    25 
    26 #ifndef __INETURILIST_H__
    27 #define __INETURILIST_H__
    28 
    29 #include <ineturilistdef.h>
    30 #include <ineturi.h>
    31 #include <uri8.h>
    32 #include <babitflags.h>
    33 
    34 class CInetUriListImpl;
    35 
    36 
    37 
    38 
    39 /**
    40 This class defines the interface that can be implemented by an application to receive the
    41 query results. 
    42 
    43 @publishedAll
    44 @released
    45 */
    46 class MQueryResultsCallback
    47 	{
    48 	public:
    49 	/**
    50 	The callback function that will be called when there is at least one query result.
    51 	
    52 	@param aUri The Inet URI object. Ownership will be passed. The application should close the 
    53 				object handle.
    54 	@return ETrue - More query results, if any, should follow.
    55 			EFalse - No more query result is required and querying will be stopped.
    56 	*/
    57 	virtual TBool OnQueryResultsL ( RInetUri aUri ) =0;
    58 	};
    59 
    60 
    61 /**
    62 This class defines the interface that can be implemented by an application that wishes to do
    63 protocol and scheme-based normalisation of the URI before query operation.
    64 
    65 @publishedAll
    66 @released
    67 */
    68 class MUriCustomiser
    69 	{
    70 	public:
    71 	/**
    72 	The callback function that will be called to perform scheme and protocol-based normalisation.
    73 	The URI will be syntax normalised before calling this function.
    74 	
    75 	@param aUri The syntax normalised URI.
    76 	@return Final normalised URI, which is syntax and protocol/scheme based.
    77 	*/
    78 	virtual CUri8* OnUriCustomisationL ( const TUriC8& aUri ) =0;	
    79 	};
    80 
    81 
    82 
    83 /**
    84 RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the
    85 URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and
    86 its associated properties.
    87 
    88 @publishedAll
    89 @released
    90 */
    91 class RInetUriList
    92 	{
    93 public:
    94 	IMPORT_C RInetUriList ();
    95 
    96 	IMPORT_C void OpenL ();
    97 	IMPORT_C void Close ();
    98 	
    99 	IMPORT_C void AddL ( const RInetUri& aInetUri );
   100 	IMPORT_C void RemoveL ( const RInetUri& aInetUri );
   101 	IMPORT_C void UpdateL ( const RInetUri& aInetUri );
   102 	
   103 	IMPORT_C RInetUri OpenInetUriL ( const TDesC8& aUri, InetUriList::TServiceType aServiceType );
   104 	IMPORT_C TInt Count ( InetUriList::TServiceType aServiceType, InetUriList::TListType aListType );
   105 	
   106 	IMPORT_C TInt GetListType ( const TDesC8& aUri, InetUriList::TServiceType aServiceType, InetUriList::TListType& aListType );
   107 	
   108 	IMPORT_C void QueryUriL ( const TQueryArgs& aArgs, MQueryResultsCallback* aQueryCallback, MUriCustomiser* aUriOptimiser =NULL );
   109 private:
   110 	CInetUriListImpl* iInetUriListImpl; // // The internal list object that this handle is connected to
   111 	};
   112 
   113 #endif //__INETURILIST_H__