contacts_plat/predictivesearch_adapters_api/inc/CPsDataPlugin.inl
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/predictivesearch_adapters_api/inc/CPsDataPlugin.inl	Wed Sep 01 12:29:52 2010 +0100
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom Predictive search interface definition
+*
+*/
+
+
+// INCLUDE FILES
+#include <ecom/ecom.h>
+#include <mdatastoreobserver.h>
+#include <mstorelistobserver.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------------------------------
+// CPsDataPlugin::NewL
+// Two phase construction
+// ----------------------------------------------------------------------------
+inline CPsDataPlugin* CPsDataPlugin::NewL( TUid aImpUid, MDataStoreObserver* aObserverForDataStore,
+																					MStoreListObserver* aStoreListObserver)
+{
+  CPsDataPlugin* self = CPsDataPlugin::NewLC( aImpUid, aObserverForDataStore, aStoreListObserver );	
+	CleanupStack::Pop();
+	return self;
+}
+
+// ----------------------------------------------------------------------------
+// CPsDataPlugin::NewLC
+// Two phase construction
+// ----------------------------------------------------------------------------
+inline CPsDataPlugin* CPsDataPlugin::NewLC( TUid aImpUid, MDataStoreObserver* aObserverForDataStore,
+																						MStoreListObserver* aStoreListObserver)
+{
+       
+    // Construct the strucutre with the observers
+    TPsDataPluginParams params(aObserverForDataStore, aStoreListObserver);
+    
+	  TAny* implementation = REComSession::CreateImplementationL ( aImpUid,
+	    _FOFF ( CPsDataPlugin, iDtor_ID_Key ), &params );
+	  CPsDataPlugin* self = REINTERPRET_CAST( CPsDataPlugin*, implementation );
+	  self->iPluginId = aImpUid;
+	  CleanupStack::PushL( self );
+	
+	  return self;
+}
+
+// ----------------------------------------------------------------------------
+// CPsDataPlugin::ConstructL
+// Destructor
+// ----------------------------------------------------------------------------
+inline CPsDataPlugin::~CPsDataPlugin()
+{
+    REComSession::DestroyedImplementation( iDtor_ID_Key );
+}
+
+// ----------------------------------------------------------------------------
+// CPsDataPlugin::PluginId
+// Returns the plugin id
+// ----------------------------------------------------------------------------
+inline TUid CPsDataPlugin::PluginId() const
+{  
+    return iPluginId;
+}
+