|
1 // Copyright (c) 2007-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 // ULogger plug-in allocator header file |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @prototype |
|
22 */ |
|
23 |
|
24 #ifndef PLUGINALLOCATOR_H_ |
|
25 #define PLUGINALLOCATOR_H_ |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <e32cmn.h> |
|
29 #include "uloggeroutputplugin.h" |
|
30 #include "uloggerinputplugin.h" |
|
31 |
|
32 |
|
33 namespace Ulogger |
|
34 { |
|
35 |
|
36 /*!CPluginAllocator class. |
|
37 */ |
|
38 class CPluginAllocator : public CBase |
|
39 { |
|
40 public: |
|
41 IMPORT_C static CPluginAllocator* NewL(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); |
|
42 IMPORT_C static CPluginAllocator* NewLC(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); |
|
43 IMPORT_C ~CPluginAllocator(); |
|
44 IMPORT_C void ConstructL(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); |
|
45 IMPORT_C MOutputPlugin* GetOutputPlugin(); |
|
46 IMPORT_C MInputPlugin* GetInputPlugin(); |
|
47 |
|
48 /** |
|
49 Requests a list of all available implementations which |
|
50 satisfy this given interface in a ECOM framework |
|
51 */ |
|
52 IMPORT_C static void ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray); |
|
53 |
|
54 private: |
|
55 CPluginAllocator(); |
|
56 TInt CreateChannels(const TPtrC8& aOutputPluginName, const TPtrC8& aInputPluginName); |
|
57 |
|
58 private: |
|
59 CPlugin *iOutputPluginBase; //output plugin instance |
|
60 RLibrary iOutputLib; |
|
61 TFileName iOutputLibName; |
|
62 |
|
63 CPlugin *iInputPluginBase; //input plugin instance |
|
64 RLibrary iInputLib; |
|
65 TFileName iInputLibName; |
|
66 }; //</CPluginAllocator> |
|
67 |
|
68 } //</namespace ULogger> |
|
69 #endif /*PLUGINALLOCATOR_H_*/ |