uiacceltk/hitchcock/ServerCore/Src/alfwindowfxplugin.cpp
changeset 0 15bf7259bb7c
child 10 88b23e2e82e1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfwindowfxplugin.cpp	Tue Feb 02 07:56:43 2010 +0200
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2009 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: 
+*
+*/
+
+#include "alfwindowfxplugin.h"
+
+#include <e32base.h>
+
+#include "alfwindowmanager.h"
+#include "alfwindowstructs.h"
+
+class CAlfWindowFxPlugin::TAlfFxPluginData
+    {
+    public:
+        TUint iPriority;
+        TUint iBufferFormat;
+        CAlfWindowManager* iWindowMgr;
+        TUid iIdentifier;
+    };
+
+EXPORT_C void CAlfWindowFxPlugin::ConstructL(const CAlfWindowManager& aMgr, TInt aAlfBufferFormat)
+    {
+    if (!iData)
+        {
+        iData = new (ELeave) TAlfFxPluginData;
+        }
+    iData->iBufferFormat = aAlfBufferFormat;
+    iData->iWindowMgr = (CAlfWindowManager*)&aMgr;
+    }
+
+EXPORT_C CAlfWindowFxPlugin::~CAlfWindowFxPlugin()
+    {
+    if (iData)
+        {
+        delete iData;
+        }
+    }
+
+
+EXPORT_C void CAlfWindowFxPlugin::NewWindow(const TWindowIdentifier& /*aId*/)
+    {
+    }
+
+EXPORT_C void CAlfWindowFxPlugin::DestroyWindow(const TWindowIdentifier& /*aId*/)
+    {
+    }
+    
+EXPORT_C CAlfWindowManager* CAlfWindowFxPlugin::WindowManager()
+    {
+    if (!iData)
+        {
+        return NULL;
+        }
+    return iData->iWindowMgr;
+    }
+
+EXPORT_C void CAlfWindowFxPlugin::HandleMessageL(const TDesC8& /*inBuf*/, TPtr8& /*outBuf*/ )
+    {
+    // synchronous messages are completed by server 
+    }
+
+EXPORT_C void CAlfWindowFxPlugin::HandleMessageL(const TDesC8& /*inBuf*/, const RMessage2& aClientMessage )
+    {
+    // make sure that there are no pending aynch calls left here
+    aClientMessage.Complete(KErrNotSupported);
+    }
+
+
+EXPORT_C void CAlfWindowFxPlugin::CancelMessage(TInt /*aMessageId*/)
+    {
+    // default implementation does not have pending messages
+    }
+    
+TUint CAlfWindowFxPlugin::Priority()
+    {
+    if (iData)
+        {
+        return iData->iPriority;
+        }
+    return 0;
+    }
+
+TUid* CAlfWindowFxPlugin::Identifier()
+    {
+    if (iData)
+        {
+        return &iData->iIdentifier;
+        }
+    return 0;
+    }