1 /* |
|
2 * Copyright (c) 2007 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: Implementation of syncmlnotifier component |
|
15 * This is part of syncmlnotifier. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef SYNCMLPRESYNCPLUGININTERFACE_H |
|
20 #define SYNCMLPRESYNCPLUGININTERFACE_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <s32mem.h> |
|
24 #include <coemain.h> |
|
25 #include <ecom/ecom.h> |
|
26 #include <ecom/implementationinformation.h> |
|
27 #include <SyncMLDef.h> |
|
28 |
|
29 class CPreSyncPlugin; |
|
30 |
|
31 /** |
|
32 * Class is used to instantiate the required plugins when the search has been |
|
33 * asked. Acts as interface to all Plugins. |
|
34 */ |
|
35 |
|
36 class CPreSyncPluginInterface: public CBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Symbian OS 2 phased constructor. |
|
42 * @return A pointer to the created instance of CPreSyncPluginInterface. |
|
43 */ |
|
44 static CPreSyncPluginInterface* NewL(); |
|
45 |
|
46 /** |
|
47 * Symbian OS 2 phased constructor. |
|
48 * @return A pointer to the created instance of CPreSyncPluginInterface. |
|
49 */ |
|
50 static CPreSyncPluginInterface* NewLC(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CPreSyncPluginInterface(); |
|
56 |
|
57 /** |
|
58 * Instantiates the required search plug-ins known by the ecom framework. |
|
59 * basically this function first calls ListAllImplementationsL() |
|
60 * and then checks them one by one to match the algorithm name |
|
61 */ |
|
62 void InstantiatePluginL(); |
|
63 |
|
64 CPreSyncPlugin* InstantiateRoamingPluginLC( TSmlProfileId aProfileId ); |
|
65 |
|
66 /** |
|
67 * Unloads all plugins |
|
68 * This should internally call REComSession::DestroyedImplementation( iDtor_ID_Key ) |
|
69 * and then REComSession::FinalClose() |
|
70 */ |
|
71 void UnloadPlugIns(); |
|
72 |
|
73 /** |
|
74 * Lists all implementations which satisfy this ecom interface |
|
75 * |
|
76 * @param aImplInfoArray On return, contains the list of available implementations |
|
77 * |
|
78 */ |
|
79 void ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray ); |
|
80 |
|
81 |
|
82 /** |
|
83 * Forwards the request to check if language is supported |
|
84 * to the algorithm instance |
|
85 */ |
|
86 TBool IsDefault(); |
|
87 |
|
88 /** |
|
89 * Forwards the request to recover data fields order for a URI |
|
90 * to the algorithm instance |
|
91 */ |
|
92 TBool IsProfileYours(TSmlProfileId aProfileId); |
|
93 |
|
94 /** |
|
95 * Forwards the request to recover sort order for a URI |
|
96 * to the algorithm instance |
|
97 */ |
|
98 void Handle(TSmlProfileId aProfileId); |
|
99 |
|
100 private: |
|
101 |
|
102 /** |
|
103 * Performs the first phase of two phase construction. |
|
104 */ |
|
105 CPreSyncPluginInterface(); |
|
106 |
|
107 /** |
|
108 * Symbian OS 2 phased constructor. |
|
109 */ |
|
110 void ConstructL(); |
|
111 |
|
112 /** |
|
113 * Instantiates a PCS plug-in, knowing the implementation uid. |
|
114 * @param aImpUid imp uID |
|
115 */ |
|
116 CPreSyncPlugin* InstantiatePlugInFromImpUidL( const TUid& aImpUid ); |
|
117 |
|
118 |
|
119 private: |
|
120 |
|
121 /** iDtor_ID_Key Instance identifier key. When instance of an |
|
122 * implementation is created by ECOM framework, the |
|
123 * framework will assign UID for it. The UID is used in |
|
124 * destructor to notify framework that this instance is |
|
125 * being destroyed and resources can be released. |
|
126 */ |
|
127 TUid iDtor_ID_Key; |
|
128 |
|
129 // List of plugins that this interface will interact with |
|
130 RPointerArray<CPreSyncPlugin> iPluginInstances; |
|
131 |
|
132 // Uid of the algorithm in use |
|
133 TUid iPluginInUse; |
|
134 }; |
|
135 |
|
136 #endif // SYNCMLPRESYNCPLUGININTERFACE_H |
|
137 |
|
138 //End of File |
|