epoc32/include/mw/ineturilist.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/ineturilist.h	Wed Mar 31 12:27:01 2010 +0100
     1.3 @@ -0,0 +1,113 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// 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
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Class for opening and manipulating the internet uri list.
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedAll
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#ifndef __INETURILIST_H__
    1.30 +#define __INETURILIST_H__
    1.31 +
    1.32 +#include <ineturilistdef.h>
    1.33 +#include <ineturi.h>
    1.34 +#include <uri8.h>
    1.35 +#include <babitflags.h>
    1.36 +
    1.37 +class CInetUriListImpl;
    1.38 +
    1.39 +
    1.40 +
    1.41 +
    1.42 +/**
    1.43 +This class defines the interface that can be implemented by an application to receive the
    1.44 +query results. 
    1.45 +
    1.46 +@publishedAll
    1.47 +@released
    1.48 +*/
    1.49 +class MQueryResultsCallback
    1.50 +	{
    1.51 +	public:
    1.52 +	/**
    1.53 +	The callback function that will be called when there is at least one query result.
    1.54 +	
    1.55 +	@param aUri The Inet URI object. Ownership will be passed. The application should close the 
    1.56 +				object handle.
    1.57 +	@return ETrue - More query results, if any, should follow.
    1.58 +			EFalse - No more query result is required and querying will be stopped.
    1.59 +	*/
    1.60 +	virtual TBool OnQueryResultsL ( RInetUri aUri ) =0;
    1.61 +	};
    1.62 +
    1.63 +
    1.64 +/**
    1.65 +This class defines the interface that can be implemented by an application that wishes to do
    1.66 +protocol and scheme-based normalisation of the URI before query operation.
    1.67 +
    1.68 +@publishedAll
    1.69 +@released
    1.70 +*/
    1.71 +class MUriCustomiser
    1.72 +	{
    1.73 +	public:
    1.74 +	/**
    1.75 +	The callback function that will be called to perform scheme and protocol-based normalisation.
    1.76 +	The URI will be syntax normalised before calling this function.
    1.77 +	
    1.78 +	@param aUri The syntax normalised URI.
    1.79 +	@return Final normalised URI, which is syntax and protocol/scheme based.
    1.80 +	*/
    1.81 +	virtual CUri8* OnUriCustomisationL ( const TUriC8& aUri ) =0;	
    1.82 +	};
    1.83 +
    1.84 +
    1.85 +
    1.86 +/**
    1.87 +RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the
    1.88 +URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and
    1.89 +its associated properties.
    1.90 +
    1.91 +@publishedAll
    1.92 +@released
    1.93 +*/
    1.94 +class RInetUriList
    1.95 +	{
    1.96 +public:
    1.97 +	IMPORT_C RInetUriList ();
    1.98 +
    1.99 +	IMPORT_C void OpenL ();
   1.100 +	IMPORT_C void Close ();
   1.101 +	
   1.102 +	IMPORT_C void AddL ( const RInetUri& aInetUri );
   1.103 +	IMPORT_C void RemoveL ( const RInetUri& aInetUri );
   1.104 +	IMPORT_C void UpdateL ( const RInetUri& aInetUri );
   1.105 +	
   1.106 +	IMPORT_C RInetUri OpenInetUriL ( const TDesC8& aUri, InetUriList::TServiceType aServiceType );
   1.107 +	IMPORT_C TInt Count ( InetUriList::TServiceType aServiceType, InetUriList::TListType aListType );
   1.108 +	
   1.109 +	IMPORT_C TInt GetListType ( const TDesC8& aUri, InetUriList::TServiceType aServiceType, InetUriList::TListType& aListType );
   1.110 +	
   1.111 +	IMPORT_C void QueryUriL ( const TQueryArgs& aArgs, MQueryResultsCallback* aQueryCallback, MUriCustomiser* aUriOptimiser =NULL );
   1.112 +private:
   1.113 +	CInetUriListImpl* iInetUriListImpl; // // The internal list object that this handle is connected to
   1.114 +	};
   1.115 +
   1.116 +#endif //__INETURILIST_H__