taskswitcher/contextengine/tsfswpreviewprovider/inc/tspreviewobserver.h
changeset 4 4d54b72983ae
child 15 ff572dfe6d86
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/taskswitcher/contextengine/tsfswpreviewprovider/inc/tspreviewobserver.h	Tue Jan 26 11:48:23 2010 +0200
@@ -0,0 +1,59 @@
+/*
+* 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:  Preview provider API
+*
+*/
+
+
+#ifndef TSPREVIEWOBSERVER_H
+#define TSPREVIEWOBSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+
+/**
+ * Observer for preview screenshot changes. Client must implement this and 
+ * register itself when calling CTsFastSwapPreviewProvider::NewL. Callback
+ * methods are called whenever there is a new preview screenshot taken from
+ * the applications or when an application is exited.
+ *
+ * @see CTsFastSwapPreviewProvider
+ */
+class MTsFastSwapPreviewObserver
+    {
+public:
+
+    /**
+     * Called when application has changed and screenshot has been taken. 
+     * New sceenshots will be taken and provided to the client via this 
+     * callback every time the application goes to background.
+     *
+     * @param aWgId Window group id of the application.
+     * @param aFbsHandle Handle to screenshot CFbsBitmap.
+     */         
+    virtual void HandleFswPpApplicationChange( TInt aWgId, TInt aFbsHandle ) = 0;
+    
+    /**
+     * Called when application has been exited. Client can free the resources
+     * related to aWgId (for example a copied bitmap) since the application is
+     * no more running.
+     *
+     * @param aWgId Window group id of the application.
+     */         
+    virtual void HandleFswPpApplicationUnregistered( TInt aWgId ) = 0;    
+    };
+
+#endif // TSPREVIEWOBSERVER_H
+
+// End of file