equal
deleted
inserted
replaced
|
1 // Copyright (c) 2001-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 // |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file UriUtils.h |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef __URIUTILS_H__ |
|
25 #define __URIUTILS_H__ |
|
26 |
|
27 // System includes |
|
28 // |
|
29 #include <e32base.h> |
|
30 #include <authority8.h> |
|
31 #include <uri8.h> |
|
32 #include <uri16.h> |
|
33 |
|
34 |
|
35 /** |
|
36 Comments : |
|
37 @publishedAll |
|
38 @released |
|
39 */ |
|
40 class UriUtils |
|
41 { |
|
42 public: |
|
43 /** |
|
44 Enum defining a flag used to indicate host type. |
|
45 @publishedAll |
|
46 @released |
|
47 @since 9.1 |
|
48 */ |
|
49 enum TUriHostType |
|
50 { |
|
51 /** |
|
52 Indicates host is of type IPv6. Example: 1080:0:0:0:8:800:200C:417A |
|
53 */ |
|
54 EIPv6Host, |
|
55 /** |
|
56 Indicates host is of type IPv4. Example: 192.168.202.18 |
|
57 */ |
|
58 EIPv4Host, |
|
59 /** |
|
60 Indicates host is in text form. Example: www.mypage.com |
|
61 */ |
|
62 ETextHost, |
|
63 }; |
|
64 |
|
65 IMPORT_C static CUri8* ConvertToInternetFormL(const TUriC16& aUri); |
|
66 IMPORT_C static CUri16* ConvertToDisplayFormL(const TUriC8& aUri); |
|
67 |
|
68 IMPORT_C static CUri8* CreateUriL(const TDesC& aUri); |
|
69 IMPORT_C static CAuthority8* CreateAuthorityL(const TDesC& aAuthority) ; |
|
70 |
|
71 IMPORT_C static TBool HasInvalidChars(const TDesC8& aData); |
|
72 IMPORT_C static TBool HasInvalidChars(const TDesC16& aData); |
|
73 |
|
74 IMPORT_C static TUriHostType HostType(const TDesC8& aHost); |
|
75 IMPORT_C static TUriHostType HostType(const TDesC16& aHost); |
|
76 IMPORT_C static CUri8* NormaliseUriL(const TUriC8& aUri); |
|
77 }; |
|
78 |
|
79 #endif // __URIUTILS_H__ |