mdfdevvideoextensions/nga_mdf_postprocessor_shai/inc/NGAPostProcSessionManager.h
changeset 58 b6dbf97aba93
equal deleted inserted replaced
57:1cbb0d5bf7f2 58:b6dbf97aba93
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __NGAPOSTPROCSESSIONMANAGER_H__
       
    20 #define __NGAPOSTPROCSESSIONMANAGER_H__
       
    21 
       
    22 #include <graphics/surface.h> //TSurfaceId
       
    23 #include <graphics/surfacemanager.h> //RSurfaceManager
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 class RSurfaceUpdateSession;
       
    28 class MNGAPostProcSessionManagerObserver;
       
    29 class CNGAPostProcNotifier;
       
    30 
       
    31 class CNGAPostProcSessionManager: public CBase
       
    32 {
       
    33 friend class CNGAPostProcNotifier;
       
    34 
       
    35 public: 
       
    36     //  === Constructors and destructor ===
       
    37     /**
       
    38     * Two-phased constructor.   
       
    39     * @return pointer to an instance of CNGAPostProcSessionManager
       
    40     */
       
    41     static CNGAPostProcSessionManager* NewL();
       
    42 
       
    43     /**
       
    44     * Destructor.
       
    45     */
       
    46     ~CNGAPostProcSessionManager();
       
    47 
       
    48 public: 
       
    49     
       
    50     /**
       
    51     submits buffer to GCE for displaying.
       
    52 
       
    53     @param  "aBufId"   "ID of the buffer that needs to be displayed."
       
    54     @pre    "This method can only be called before the hwdevice has been initialized with Initialize()."
       
    55     */
       
    56     TInt PostPicture(const TSurfaceId& aSurfaceId, TInt aBufId, TBool aNotifyRequired);
       
    57 
       
    58     
       
    59     
       
    60     /**
       
    61 	Removes display from the system, if it is already existing. 
       
    62 
       
    63     @param  "aDisplayId"  "ID of the display that needs to be removed from the system"
       
    64     */
       
    65     void HandleBufferRelease(TInt aBufId, TInt aStatus);
       
    66     
       
    67     /**
       
    68 	Removes display from the system, if it is already existing. 
       
    69 
       
    70     @param  "aDisplayId"  "ID of the display that needs to be removed from the system"
       
    71     */
       
    72     void SetObserver(MNGAPostProcSessionManagerObserver& aObserver);
       
    73 	  
       
    74 	
       
    75 	void CreateNotifierL(TInt aNumSurfaceBuffers);
       
    76 	
       
    77 	void CancelNotifiers(); 
       
    78 	  
       
    79 protected:
       
    80 	CNGAPostProcSessionManager();
       
    81     /**
       
    82      *  Symbian 2nd phase constructor .
       
    83      */
       
    84     void ConstructL();
       
    85 
       
    86 private:
       
    87     /**
       
    88     Cancels Surface Update Notifications
       
    89     */
       
    90     void CancelUpdate();
       
    91     
       
    92 private: 
       
    93 
       
    94     RSurfaceUpdateSession*      			iSurfaceUpdateSession;
       
    95     MNGAPostProcSessionManagerObserver*		iObserver;
       
    96     RPointerArray<CNGAPostProcNotifier>		iAOList;
       
    97 };    
       
    98 
       
    99 #endif //__NGAPOSTPROCSESSIONMANAGER_H__