1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicscomposition/surfaceupdate/inc/updateserverprovider.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,85 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __UPDATESERVERPROVIDER_H__
1.20 +#define __UPDATESERVERPROVIDER_H__
1.21 +
1.22 +#include <e32cmn.h>
1.23 +
1.24 +class TSurfaceId;
1.25 +
1.26 +
1.27 +
1.28 +/**
1.29 +@publishedPartner
1.30 +
1.31 +
1.32 +The class is aimed for use within WSERV process only by the Content update receiver.
1.33 +It provides interface for registering Content update receiver instances for each screen.
1.34 +*/
1.35 +class MSurfaceUpdateServerProvider
1.36 + {
1.37 +public:
1.38 + /**
1.39 + Assign Content update receiver instance to particular screen.
1.40 + The following calls of this function for the same screen will override the previous.
1.41 +
1.42 + @param aScreen - screen number, associated with the output,
1.43 + varies from 0 to number of screens present - 1
1.44 + @param aUpdateReceiver - pointer to a Content update receiver interface associated
1.45 + with the aScreen. NULL signifies that particular screen doesn't
1.46 + correspond any composition receiver. The ownership of this parameter
1.47 + will not be transferred.
1.48 + @param aPriority - priority of the Content update receiver.
1.49 + The higher the number is the higher the priority of the screen.
1.50 + This number will be used to identify the master screen for any particular surface.
1.51 + It is not acceptable to have more than one screen with the same priority.
1.52 + @return KErrNone if an operation is successful.
1.53 + @return KErrArgument Arguments don’t lie in expected range.
1.54 + @return KErrNotReady The server has not been started.
1.55 + @return KErrAlreadyExists Another Content update receiver with the same priority number has already been registered with the SUS. Any other system error codes otherwise.
1.56 + @panic EUpdateServPanicRegister If another registration method has already been used.
1.57 + */
1.58 + virtual TInt Register(TInt aScreen, CBase* aUpdateReceiver, TInt aPriority) = 0;
1.59 +private:
1.60 + friend class CTSurfaceUpdateStep;
1.61 + /**
1.62 + Close the Surface Update Server
1.63 + This function is intended for test/debugging only
1.64 + The implementation will do nothing in released builds
1.65 +
1.66 + WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
1.67 + */
1.68 + virtual void Terminate() = 0;
1.69 + };
1.70 +
1.71 +/**
1.72 +Spawn a thread within WSERV process. This will lead to starting the surface update server in it
1.73 +@publishedPartner
1.74 +
1.75 +
1.76 +@param aUpdateProvider - [out] reference pointer to surface update server provider,
1.77 + which will be set when the server is started. The variable will be used to registry
1.78 + content update receiver instances. The caller doesn't acquire the ownership of this instance,
1.79 + thus mustn't delete it. The pointer will be valid until server is operating,
1.80 + i.e. system is up.
1.81 +
1.82 +@return KErrNone if an operation is successful, any other system error codes otherwise
1.83 +*/
1.84 +IMPORT_C TInt StartSurfaceUpdateServer(MSurfaceUpdateServerProvider*& aSurfaceUpdateServerProvider);
1.85 +
1.86 +
1.87 +
1.88 +#endif