|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: |
|
15 * Declaration of Scheme handler interface implementation for wtai:// scheme |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef WTAI_HANDLER_H |
|
22 #define WTAI_HANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "BaseHandler.h" |
|
27 #include "BrowserTelService.h" |
|
28 #include <e32base.h> |
|
29 |
|
30 // FORWARD DECLARATION |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Scheme Handler IF implementation class for wtai scheme |
|
36 */ |
|
37 class CWtaiHandler : public CBaseHandler, public MBrowserTelServiceObserver |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two phased constructor. Leaves on failure. |
|
43 * @param - aUrl |
|
44 * @return The created object. |
|
45 */ |
|
46 static CWtaiHandler* NewL( const TDesC& aUrl ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CWtaiHandler(); |
|
52 |
|
53 private: // Constructors |
|
54 |
|
55 /** |
|
56 * Constructor. |
|
57 */ |
|
58 CWtaiHandler(); |
|
59 |
|
60 /** |
|
61 * Second phase constructor. Leaves on failure. |
|
62 * @param - aUrl |
|
63 */ |
|
64 void ConstructL( const TDesC& aUrl ); |
|
65 |
|
66 private: // Functions from base classes |
|
67 |
|
68 /** |
|
69 * Url Handler with embedding |
|
70 * @param - |
|
71 */ |
|
72 void HandleUrlEmbeddedL(); |
|
73 |
|
74 /** |
|
75 * Url Handler without embedding |
|
76 * @param - |
|
77 */ |
|
78 void HandleUrlStandaloneL(); |
|
79 |
|
80 /** |
|
81 * Get library function from wtai sheme |
|
82 * @param - |
|
83 * @return TPtrC library function |
|
84 */ |
|
85 |
|
86 TPtrC GetWtaiLibraryFunctionL(); |
|
87 |
|
88 /** |
|
89 * Get the specific parameter of wtai |
|
90 * @param - aPos the position of the required parameter |
|
91 * @return TPtrC |
|
92 */ |
|
93 |
|
94 TPtrC GetParameterL(TInt aPos); |
|
95 |
|
96 /** |
|
97 * Get the number of parameter of wtai sheme |
|
98 * @param - |
|
99 * @return TInt |
|
100 */ |
|
101 TInt GetParameterCountL(); |
|
102 |
|
103 /** |
|
104 * Verify the parameters of wtai sheme |
|
105 * Leaves if it is not a valid wtai library or function |
|
106 * @param - |
|
107 * @return TInt - first occurance of colon position |
|
108 */ |
|
109 TInt VerifyWtaiSchemeL( TPtrC path ); |
|
110 |
|
111 /** |
|
112 * Notification of the state change. |
|
113 * @param aEvent The new state. |
|
114 */ |
|
115 void BrowserTelServiceEvent(TBrowserTelServiceState aEvent); |
|
116 |
|
117 /** |
|
118 * Notification of the error that occurred. |
|
119 * @param aError The error. |
|
120 */ |
|
121 void BrowserTelServiceError(TBrowserTelServiceError aError); |
|
122 |
|
123 /** |
|
124 * Notification when the phonebook dialog has been exited. |
|
125 * @param. |
|
126 */ |
|
127 void NotifyClient(); |
|
128 |
|
129 private: // Data |
|
130 |
|
131 enum TSchemeWtaiParams //< Positions of the possible wtai parameters |
|
132 { |
|
133 ESchemeWtaiNumber = 1, ///< Phone number |
|
134 ESchemeWtaiName = 2, ///< Name |
|
135 ESchemeWtaiEmail = 3 ///< Email address |
|
136 }; |
|
137 |
|
138 CBrowserTelService* iTelService; ///< Owned. |
|
139 }; |
|
140 |
|
141 #endif /* def WTAI_HANDLER_H */ |