phoneapp/phonemediatorcenter/inc/cphonemediatormessagefactory.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phonemediatorcenter/inc/cphonemediatormessagefactory.h	Fri Jun 04 10:19:18 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2008 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: 
+*     Factory for creating Mediator Message objects.
+*
+*/
+
+
+#ifndef CPHONEMEDIATORMESSAGEFACTORY_H
+#define CPHONEMEDIATORMESSAGEFACTORY_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MPhoneMediatorMessage;
+class MPEEngineInfo;
+
+// CLASS DECLARATION
+
+class CPhoneMediatorMessageFactory : public CBase
+    {
+    public:  
+
+        /**
+         * Destructor.
+         */
+        virtual ~CPhoneMediatorMessageFactory();
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CPhoneMediatorMessageFactory* NewL( MPEEngineInfo& aEngineInfo );
+        
+        /**
+        * Creates the concrete Mediator Message object.
+        * @param aMessage - Message from Phone Engine (EPEMessage).
+        * @param aCallId - Caller id
+        * @return MPhoneMediatorMessage object or NULL if no associate object found for
+        *         EPEMessage.
+        */
+        MPhoneMediatorMessage* CreateMessageL( const TInt aMessage, TInt aCallId );
+        
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CPhoneMediatorMessageFactory( MPEEngineInfo& aEngineInfo );  
+        
+        /**
+         * By default EPOC constructor is private.
+         */
+        void ConstructL();
+        
+             
+    private:
+        
+        // Reference to Engine Info
+        MPEEngineInfo& iEngineInfo;
+
+    };
+    
+#endif // CPHONEMEDIATORMESSAGEFACTORY_H
+
+// End of File