|
1 /* |
|
2 * Copyright (c) 2006-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: ECom Predictive search interface definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <ecom/ecom.h> |
|
21 #include <mdatastoreobserver.h> |
|
22 #include <mstorelistobserver.h> |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CPsDataPlugin::NewL |
|
28 // Two phase construction |
|
29 // ---------------------------------------------------------------------------- |
|
30 inline CPsDataPlugin* CPsDataPlugin::NewL( TUid aImpUid, MDataStoreObserver* aObserverForDataStore, |
|
31 MStoreListObserver* aStoreListObserver) |
|
32 { |
|
33 CPsDataPlugin* self = CPsDataPlugin::NewLC( aImpUid, aObserverForDataStore, aStoreListObserver ); |
|
34 CleanupStack::Pop(); |
|
35 return self; |
|
36 } |
|
37 |
|
38 // ---------------------------------------------------------------------------- |
|
39 // CPsDataPlugin::NewLC |
|
40 // Two phase construction |
|
41 // ---------------------------------------------------------------------------- |
|
42 inline CPsDataPlugin* CPsDataPlugin::NewLC( TUid aImpUid, MDataStoreObserver* aObserverForDataStore, |
|
43 MStoreListObserver* aStoreListObserver) |
|
44 { |
|
45 |
|
46 // Construct the strucutre with the observers |
|
47 TPsDataPluginParams params(aObserverForDataStore, aStoreListObserver); |
|
48 |
|
49 TAny* implementation = REComSession::CreateImplementationL ( aImpUid, |
|
50 _FOFF ( CPsDataPlugin, iDtor_ID_Key ), ¶ms ); |
|
51 CPsDataPlugin* self = REINTERPRET_CAST( CPsDataPlugin*, implementation ); |
|
52 self->iPluginId = aImpUid; |
|
53 CleanupStack::PushL( self ); |
|
54 |
|
55 return self; |
|
56 } |
|
57 |
|
58 // ---------------------------------------------------------------------------- |
|
59 // CPsDataPlugin::ConstructL |
|
60 // Destructor |
|
61 // ---------------------------------------------------------------------------- |
|
62 inline CPsDataPlugin::~CPsDataPlugin() |
|
63 { |
|
64 REComSession::DestroyedImplementation( iDtor_ID_Key ); |
|
65 } |
|
66 |
|
67 // ---------------------------------------------------------------------------- |
|
68 // CPsDataPlugin::PluginId |
|
69 // Returns the plugin id |
|
70 // ---------------------------------------------------------------------------- |
|
71 inline TUid CPsDataPlugin::PluginId() const |
|
72 { |
|
73 return iPluginId; |
|
74 } |
|
75 |