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