omaprovisioning/provisioning/ProvisioningEngine/Inc/WPAdapterFactory.h
changeset 0 b497e44ab2fc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Inc/WPAdapterFactory.h	Thu Dec 17 09:07:52 2009 +0200
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2002 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:  WPAdapterFactory can be used to create provisioning adapters.
+*
+*/
+
+
+#ifndef WPADAPTERFACTORY_H
+#define WPADAPTERFACTORY_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CWPAdapter;
+class CImplementationInformation;
+
+//  CLASS DEFINITION
+
+/**
+*  Factory class for adapters.
+*
+*  @lib ProvisioningEngine
+*  @since 2.0
+*/
+class WPAdapterFactory 
+    {
+    public:
+        /**
+        * Creates all adapters and stores them in an array.
+        * @return Array of adapters. Ownership is transferred.
+        */
+        static CArrayPtr<CWPAdapter>* CreateAdaptersL();
+
+    private:
+
+        /**
+        * ResetAndDestroy() cleanup for an RImplInfoPtrArray.
+        * @param aAny Array
+        */
+        static void CleanupImplArray( TAny* aAny );
+
+        /**
+        * ResetAndDestroy() cleanup for a CArrayPtr<CWPAdapter>.
+        * @param aAny Array
+        */
+        static void CleanupAdapterArray( TAny* aAny );
+
+        /** 
+        * Comparator for two implementation information entries.
+        * Compares the opaque data as a string.
+        * @param aImpl1 First implementation to compare
+        * @param aImpl2 Second implementation to compare
+        */
+        static TInt Compare( const CImplementationInformation& aImpl1, const CImplementationInformation& aImpl2 );
+    };
+
+#endif /* WPADAPTERFACTORY_H */
\ No newline at end of file