|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent - Internal Symbian test code |
|
19 */ |
|
20 |
|
21 #include "TTestEcomDataRec.h" |
|
22 #include "TEcomDecpDataRec.h" |
|
23 #include "TEcomLeavingRecognizer.h" |
|
24 #include <eikenv.h> |
|
25 #include <ecom/implementationproxy.h> |
|
26 |
|
27 |
|
28 const TInt KNumDataTypes = 1; |
|
29 const TUid KUid = {0x1d1f75ed}; |
|
30 |
|
31 |
|
32 GLDEF_C TInt E32Dll( |
|
33 ) |
|
34 { |
|
35 return KErrNone; |
|
36 } |
|
37 |
|
38 |
|
39 CTestEcomRecognizer::CTestEcomRecognizer():CApaDataRecognizerType(KUid, CApaDataRecognizerType::EHigh) |
|
40 { |
|
41 iCountDataTypes = KNumDataTypes; |
|
42 } |
|
43 |
|
44 /* |
|
45 Specifies the buffer size required by the data type |
|
46 */ |
|
47 TUint CTestEcomRecognizer::PreferredBufSize() |
|
48 { |
|
49 return 0; |
|
50 } |
|
51 |
|
52 TDataType CTestEcomRecognizer::SupportedDataTypeL(TInt /*lIndex*/) const |
|
53 { |
|
54 return TDataType(_L8("dodgy/app")); |
|
55 } |
|
56 |
|
57 /* |
|
58 Should recognize the data type of the file. |
|
59 Called by the RecognizeL function. |
|
60 */ |
|
61 void CTestEcomRecognizer::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& /*aBuffer*/) |
|
62 { |
|
63 // does nothing |
|
64 } |
|
65 |
|
66 |
|
67 |
|
68 CApaDataRecognizerType* CTestEcomRecognizer::CreateRecognizerL() |
|
69 { |
|
70 return new (ELeave) CTestEcomRecognizer(); |
|
71 } |
|
72 |
|
73 const TImplementationProxy ImplementationTable[] = |
|
74 { |
|
75 IMPLEMENTATION_PROXY_ENTRY(0x101F7DA1,CTestEcomRecognizer::CreateRecognizerL), |
|
76 IMPLEMENTATION_PROXY_ENTRY(0x102032A2,CTEcomDecpDataRec::CreateRecognizerL), |
|
77 IMPLEMENTATION_PROXY_ENTRY(0x10203630,CEcomLeavingApplicationRec::CreateRecognizerL) |
|
78 }; |
|
79 |
|
80 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
81 { |
|
82 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
83 return ImplementationTable; |
|
84 } |