|
1 /* |
|
2 * Copyright (c) 2007-2009 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 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedPartner |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef FDCPLUGIN_H |
|
25 #define FDCPLUGIN_H |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 class MFdcPluginObserver; |
|
30 |
|
31 /** |
|
32 Base class for FDC plugins. |
|
33 */ |
|
34 class CFdcPlugin : public CBase |
|
35 { |
|
36 // So we can make most of this class private- validly callable only by |
|
37 // CFdcProxy. |
|
38 friend class CFdcProxy; |
|
39 |
|
40 private: // used by FDF to create and destroy FDC instances |
|
41 /** |
|
42 Constructor. |
|
43 @param aImplementationUid UID of implementation to create. |
|
44 @param aObserver Handle back onto the FDF for the FDC to use. |
|
45 @return Ownership of a new FDC plugin. |
|
46 */ |
|
47 IMPORT_C static CFdcPlugin* NewL(TUid aImplementationUid, MFdcPluginObserver& aObserver); |
|
48 |
|
49 /** |
|
50 Called by FDF to get a pointer to an object which implements the |
|
51 FDF API with UID aUid. This is a mechanism for allowing future change |
|
52 to the FDF API without breaking BC in existing (non-updated) FDF |
|
53 plugins. |
|
54 */ |
|
55 virtual TAny* GetInterface(TUid aUid) = 0; |
|
56 |
|
57 protected: // called by concrete FDF plugins |
|
58 /** |
|
59 Constructor |
|
60 */ |
|
61 IMPORT_C CFdcPlugin(MFdcPluginObserver& aObserver); |
|
62 |
|
63 /** Destructor. */ |
|
64 IMPORT_C ~CFdcPlugin(); |
|
65 |
|
66 /** |
|
67 Accessor for the interface to the FDF. |
|
68 @return Interface to the FDF. |
|
69 */ |
|
70 IMPORT_C MFdcPluginObserver& Observer(); |
|
71 |
|
72 /** |
|
73 From CBase. |
|
74 */ |
|
75 IMPORT_C TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); |
|
76 |
|
77 private: // owned |
|
78 /** |
|
79 UID set by ECOM when the instance is created. Used when the instance is |
|
80 destroyed. |
|
81 */ |
|
82 TUid iInstanceId; |
|
83 |
|
84 /** |
|
85 Interface for calls up to the FDF. |
|
86 */ |
|
87 MFdcPluginObserver& iObserver; |
|
88 |
|
89 /** |
|
90 Pad for BC-friendly future change. |
|
91 */ |
|
92 TAny* iPad; |
|
93 }; |
|
94 |
|
95 #endif // FDCPLUGIN_H |