os/graphics/graphicscomposition/surfaceupdate/inc/updateserverprovider.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __UPDATESERVERPROVIDER_H__
    17 #define __UPDATESERVERPROVIDER_H__
    18 
    19 #include <e32cmn.h>
    20 
    21 class TSurfaceId;
    22 
    23 
    24 
    25 /**
    26 @publishedPartner
    27 
    28 
    29 The class is aimed for use within WSERV process only by the Content update receiver. 
    30 It provides interface for registering Content update receiver instances for each screen. 
    31 */
    32 class MSurfaceUpdateServerProvider
    33 	{
    34 public:	
    35 	/**
    36 	Assign Content update receiver instance to particular screen. 
    37 	The following calls of this function for the same screen will override the previous.
    38 	
    39 	@param aScreen - screen number, associated with the output, 
    40 		varies from 0 to number of screens present - 1
    41 	@param aUpdateReceiver - pointer to a Content update receiver interface associated 
    42 		with the aScreen. NULL signifies that particular screen doesn't 
    43 		correspond any composition receiver. The ownership of this parameter 
    44 		will not be transferred.
    45 	@param aPriority - priority of the Content update receiver. 
    46         The higher the number is the higher the priority of the screen. 
    47 		This number will be used to identify the master screen for any particular surface. 
    48 		It is not acceptable to have more than one screen with the same priority.
    49 	@return KErrNone if an operation is successful. 
    50 	@return KErrArgument Arguments donít lie in expected range.
    51 	@return KErrNotReady The server has not been started.
    52 	@return KErrAlreadyExists Another Content update receiver with the same priority number has already been registered with the SUS. Any other system error codes otherwise.
    53 	@panic EUpdateServPanicRegister If another registration method has already been used.
    54 	*/
    55 	virtual TInt Register(TInt aScreen, CBase* aUpdateReceiver, TInt aPriority) = 0;
    56 private:
    57 	friend class CTSurfaceUpdateStep;	
    58 	/**
    59 	Close the Surface Update Server
    60 	This function is intended for test/debugging only
    61 	The implementation will do nothing in released builds 	
    62 	
    63 	WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
    64 	*/
    65 	virtual void Terminate() = 0;
    66 	};
    67 
    68 /**
    69 Spawn a thread within WSERV process. This will lead to starting the surface update server in it 
    70 @publishedPartner
    71 
    72 	
    73 @param aUpdateProvider - [out] reference pointer to surface update server provider, 
    74 		which will be set when the server is started. The variable will be used to registry 
    75 		content update receiver instances. The caller doesn't acquire the ownership of this instance,
    76 		thus mustn't delete it. The pointer will be valid until server is operating, 
    77 		i.e. system is up.
    78 		
    79 @return KErrNone if an operation is successful, any other system error codes otherwise
    80 */
    81 IMPORT_C TInt StartSurfaceUpdateServer(MSurfaceUpdateServerProvider*& aSurfaceUpdateServerProvider);
    82 
    83 
    84 
    85 #endif