|
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 class CBaseHandler. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef BASE_HANDLER_H |
|
22 #define BASE_HANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "SchemeHandler.h" |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATION |
|
30 #include <AknServerApp.h> |
|
31 // CONSTS |
|
32 /// UID of Scheme App. |
|
33 LOCAL_D const TUid KUidSchemeApp = { SCHEME_APP_UID }; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Scheme Handler IF definition class |
|
39 */ |
|
40 class CBaseHandler : public CSchemeHandler |
|
41 { |
|
42 |
|
43 public: // New functions |
|
44 |
|
45 /** |
|
46 * Url Handler with embedding |
|
47 * @param - |
|
48 */ |
|
49 virtual void HandleUrlEmbeddedL() = 0; |
|
50 |
|
51 /** |
|
52 * Url Handler without embedding |
|
53 * @param - |
|
54 */ |
|
55 virtual void HandleUrlStandaloneL() = 0; |
|
56 |
|
57 /** |
|
58 * Observer |
|
59 * @param - aSchemeDoc |
|
60 */ |
|
61 void Observer( MAknServerAppExitObserver* aSchemeDoc ); |
|
62 |
|
63 protected: |
|
64 |
|
65 /** |
|
66 * Constructor. |
|
67 */ |
|
68 CBaseHandler(); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~CBaseHandler(); |
|
74 |
|
75 /** |
|
76 * Second phase constructor. Leaves on failure. |
|
77 * BaseConstructL must be called from inherited ConstructL |
|
78 * preferably before do anything |
|
79 * @param - aUrl |
|
80 */ |
|
81 void BaseConstructL( const TDesC& aUrl ); |
|
82 |
|
83 protected: // New functions |
|
84 |
|
85 /** |
|
86 * Remove scheme from the begining of Url. |
|
87 * @param aScheme - sheme pattern |
|
88 * @return TPtrC |
|
89 */ |
|
90 TPtrC RemoveSchemeFromUrlL( const TDesC& aScheme ); |
|
91 |
|
92 /** |
|
93 * Handle the possible errors given by |
|
94 * subsystems |
|
95 * @param aErrorCode - error code |
|
96 * @return - |
|
97 */ |
|
98 void ErrorHandlerL( TInt aErrorCode ); |
|
99 |
|
100 /** |
|
101 * Handle the possible errors given by |
|
102 * subsystems |
|
103 * @param - |
|
104 * @return the value of the shared data (boolean) |
|
105 */ |
|
106 TBool ReadSdConfirmDtmfValueL(); |
|
107 |
|
108 |
|
109 /** |
|
110 * Launch SchemeApp passing Generic Params List |
|
111 * @param - |
|
112 * @return - |
|
113 */ |
|
114 void LaunchSchemeAppWithCommandLineL(); |
|
115 |
|
116 protected: // Data |
|
117 |
|
118 MAknServerAppExitObserver* iSchemeDoc; ///< Used. |
|
119 |
|
120 protected: // Data |
|
121 |
|
122 // Results of parsing |
|
123 HBufC* iParsedUrl; ///< Owned. |
|
124 }; |
|
125 |
|
126 #endif /* def BASE_HANDLER_H */ |