|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Header File for the data recognizer |
|
15 // Declares a test recognizer class which recognizes data type "test/plain".\n |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent - Internal Symbian test code |
|
22 */ |
|
23 |
|
24 #if !defined(__TESTREC_H__) |
|
25 #define __TESTREC_H__ |
|
26 |
|
27 #if !defined(__APMREC_H__) |
|
28 #include <apmrec.h> |
|
29 #endif |
|
30 |
|
31 #include <apmstd.h> |
|
32 #include <implementationproxy.h> |
|
33 |
|
34 class CAppTestRecognizer : public CApaDataRecognizerType |
|
35 { |
|
36 public: // from CApaDataRecognizerType |
|
37 CAppTestRecognizer(); |
|
38 TUint PreferredBufSize(); |
|
39 TDataType SupportedDataTypeL(TInt aIndex) const; |
|
40 //for ECOM |
|
41 static CApaDataRecognizerType* CreateRecognizerL(); |
|
42 private: // from CApaFileRecognizerType |
|
43 void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); |
|
44 }; |
|
45 |
|
46 const TInt KTestTxtRecognizerValue=0x102032A6; |
|
47 const TUid KUidTestTxtRecognizer={0x102032A6}; |
|
48 const TInt KMinBufferLength=42; // minimum amount of file needed to determine a text file IF it's not called .TEST |
|
49 const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use |
|
50 _LIT8(KDataTypeTestPlain,"test/plain"); |
|
51 _LIT(KTestFileExt,".TEST"); |
|
52 |
|
53 |
|
54 #endif |