|
1 /* |
|
2 * Copyright (c) 2006 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: Recognizer for the widgets |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef WIDGETRECOGNIZER_H |
|
20 #define WIDGETRECOGNIZER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <apmrec.h> // For CApaDataRecognizerType |
|
24 |
|
25 // CONSTANTS |
|
26 const TUid KUidMimeWidgetRecognizer = { 0x10282820 }; |
|
27 const TInt KWidgetRecognizerImplUIDValue = 0x10282843; |
|
28 const TUid KUidWidgetRecognizerImpl = { KWidgetRecognizerImplUIDValue }; |
|
29 |
|
30 |
|
31 // |
|
32 // CWidgetsRecognizer |
|
33 // |
|
34 class CWidgetRecognizer : public CApaDataRecognizerType |
|
35 { |
|
36 public: |
|
37 // constructor |
|
38 CWidgetRecognizer(); |
|
39 |
|
40 static CApaDataRecognizerType* CreateRecognizerL(); |
|
41 |
|
42 public: // from CApaDataRecognizerType |
|
43 |
|
44 /** |
|
45 * From CApaDataRecognizerType |
|
46 * Gets the size of buffer preferred for the purpose of recognizing the data type. |
|
47 * @return The preferred data size. |
|
48 * @since 3.1 |
|
49 */ |
|
50 virtual TUint PreferredBufSize(); |
|
51 |
|
52 /** |
|
53 * From CApaDataRecognizerType |
|
54 * Gets one of the data (MIME) types that the recognizer can recognize. |
|
55 * @param aIndex - An index that identifies the data type. Typically, |
|
56 * the minimum value is zero and the maximum value is the value of MimeTypesCount() - 1. |
|
57 * |
|
58 * @return The data (MIME) type. |
|
59 * @since 3.1 |
|
60 */ |
|
61 virtual TDataType SupportedDataTypeL(TInt aIndex) const; |
|
62 |
|
63 private: // from CApaDataRecognizerType |
|
64 |
|
65 /** |
|
66 * From CApaDataRecognizerType |
|
67 * This implements recognition behaviour -- called by RecognizeL() |
|
68 * @param aName - The name of the data; typically this is a file name |
|
69 * containing the data to be recognized. |
|
70 * @param aBuffer - A buffer containing data to be recognized; typically, this is read from the start of the file containing the data. |
|
71 * |
|
72 * @return void. |
|
73 * @since 3.1 |
|
74 */ |
|
75 virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); |
|
76 }; |
|
77 |
|
78 #endif // WIDGETRECOGNIZER_H |
|
79 |
|
80 // END FILE |