|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
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 class CPtrC16Array; |
|
31 class CMessageData; |
|
32 |
|
33 // CONSTS |
|
34 |
|
35 // CLASS DECLARATION |
|
36 enum TSchemePluginPanic |
|
37 { |
|
38 EUnrecognisedState = 1 |
|
39 }; |
|
40 |
|
41 /** |
|
42 * Scheme Handler IF definition class |
|
43 * @since Series60_2.6 |
|
44 */ |
|
45 class CBaseHandler : public CSchemeHandler |
|
46 { |
|
47 public: |
|
48 |
|
49 enum TRecipientTypes |
|
50 { |
|
51 KToRecipient, |
|
52 KCcRecipient |
|
53 }; |
|
54 |
|
55 public: // From base class |
|
56 |
|
57 /** |
|
58 * Url Handler with embedding |
|
59 * @param - |
|
60 */ |
|
61 virtual void HandleUrlEmbeddedL() = 0; |
|
62 |
|
63 /** |
|
64 * Url Handler without embedding |
|
65 * @param - |
|
66 */ |
|
67 virtual void HandleUrlStandaloneL() = 0; |
|
68 |
|
69 /** |
|
70 * Observer |
|
71 * @param - aSchemeDoc |
|
72 */ |
|
73 void Observer( MAknServerAppExitObserver* aSchemeDoc ); |
|
74 |
|
75 protected: |
|
76 |
|
77 /** |
|
78 * Constructor. |
|
79 */ |
|
80 CBaseHandler(); |
|
81 |
|
82 /** |
|
83 * Destructor. |
|
84 */ |
|
85 virtual ~CBaseHandler(); |
|
86 |
|
87 /** |
|
88 * Second phase constructor. Leaves on failure. |
|
89 * BaseConstructL must be called from inherited ConstructL |
|
90 * preferably before do anything |
|
91 * @param - aUrl |
|
92 */ |
|
93 void BaseConstructL( const TDesC& aUrl ); |
|
94 |
|
95 protected: // New functions |
|
96 |
|
97 /** |
|
98 * Separates items from string to array. |
|
99 * |
|
100 * @param aSeparator Separator mark that separates items. |
|
101 * @param aString String to separate |
|
102 * @param aArray Result array |
|
103 */ |
|
104 void SeparateItemsToArrayL( |
|
105 const TDesC& aSeparator, |
|
106 const TDesC& aString, |
|
107 CPtrC16Array& aArray ) const; |
|
108 |
|
109 /** |
|
110 * Separates items from string to array of messageData. |
|
111 * |
|
112 * @param aSeparator Separator mark that separates items. |
|
113 * @param aString String to separate |
|
114 * @param aMessageData Object where items are appended. |
|
115 */ |
|
116 void SeparateAndAppendAddressL( |
|
117 const TDesC& aSeparator, |
|
118 const TDesC& aString, |
|
119 CMessageData& aMessageData, |
|
120 const TInt aRecipientType = KToRecipient ) const; |
|
121 |
|
122 /** |
|
123 * Notify client on completion of editing of an embedded document. |
|
124 * @param. |
|
125 */ |
|
126 void NotifyClient(); |
|
127 |
|
128 /** |
|
129 * Returns the minimum value of the array. |
|
130 * @param. |
|
131 * @return |
|
132 */ |
|
133 TInt Minimum( RArray<TInt>& aArray ) const; |
|
134 |
|
135 /** |
|
136 * Launch SchemeApp passing Generic Params List |
|
137 * @param - |
|
138 * @return - |
|
139 */ |
|
140 void LaunchSchemeAppWithCommandLineL(); |
|
141 |
|
142 |
|
143 protected: // Data |
|
144 |
|
145 MAknServerAppExitObserver* iSchemeDoc; ///< Used. |
|
146 |
|
147 protected: // Data |
|
148 |
|
149 // Results of parsing |
|
150 HBufC* iParsedUrl; ///< Owned. |
|
151 }; |
|
152 |
|
153 #endif /* def BASE_HANDLER_H */ |