|
1 /* |
|
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Parser class for parsing landmarks to url and vice versa |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMRURLPARSEREXTENSION_H |
|
19 #define CMRURLPARSEREXTENSION_H |
|
20 |
|
21 #include "e32base.h" |
|
22 |
|
23 class CPosLandmark; |
|
24 |
|
25 /** |
|
26 * Parser class for parsing URL to landmark and vice versa |
|
27 * |
|
28 */ |
|
29 class CMRUrlParserExtension : public CBase |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 static CMRUrlParserExtension* NewL(); |
|
35 static CMRUrlParserExtension* NewLC(); |
|
36 |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 virtual ~CMRUrlParserExtension(); |
|
42 |
|
43 /** |
|
44 * Finds location URL from given text input |
|
45 * |
|
46 * @param aText text where URL is searched from |
|
47 * @param aUrl points to founded URL after execution |
|
48 * @param aPos on return URL start position. |
|
49 * @leave KErrNotFound/KErrArgument or other |
|
50 * unexpected Symbian wide errorcode |
|
51 */ |
|
52 void FindLocationUrlL( const TDesC& aText, TPtrC& aUrl, TInt& aPos ); |
|
53 |
|
54 /** |
|
55 * Creates landmark object from location URL |
|
56 * May leave with KErrNotFound/KErrArgument or other Symbian wide errorcode |
|
57 * |
|
58 * @param aUrl contains location URL from which landmark is created |
|
59 * @return pointer to created landmark object, caller takes ownership |
|
60 */ |
|
61 CPosLandmark* CreateLandmarkFromUrlL( const TDesC& aUrl ); |
|
62 |
|
63 private: |
|
64 |
|
65 CMRUrlParserExtension(); |
|
66 |
|
67 private: // data |
|
68 |
|
69 }; |
|
70 |
|
71 |
|
72 #endif // CMRURLPARSEREXTENSION_H |