os/graphics/graphicsresourceservices/graphicsresourceimplementation/inc/sgdevice.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresourceimplementation/inc/sgdevice.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +// Copyright (c) 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 +// Graphics Resource - logical device driver
    1.18 +//
    1.19 +
    1.20 +#ifndef SGDEVICE_H
    1.21 +#define SGDEVICE_H
    1.22 +
    1.23 +#include <e32des8.h>
    1.24 +#include <sgresource/sgcommon.h>
    1.25 +
    1.26 +_LIT(KSgDeviceName, "sgdevice");
    1.27 +
    1.28 +inline TVersion SgDeviceVersionRequired();
    1.29 +
    1.30 +class RSgDevice: public RBusLogicalChannel
    1.31 +	{
    1.32 +	friend class DSgChannel;
    1.33 +public:
    1.34 +	inline TInt Connect();
    1.35 +	inline TInt CreateResource(TUint32 aAttribs, const TDesC8& aMetaData, TInt aDataSize, TUint64& aId);
    1.36 +	inline TInt OpenResource(TUint64 aId);
    1.37 +	inline TInt CloseResource(TUint64 aId);
    1.38 +	inline TUint32 ResourceAttributes(TUint64 aId);
    1.39 +	inline TInt GetResourceMetaData(TUint64 aId, TDes8& aMetaData);
    1.40 +	inline TAny* ResourceDataAddress(TUint64 aId);
    1.41 +	inline TInt ResourceDataSize(TUint64 aId);
    1.42 +	inline TInt GlobalResourceCount();
    1.43 +	inline TInt LocalGraphicsMemoryUsed();
    1.44 +	inline TInt GlobalGraphicsMemoryUsed();
    1.45 +private:
    1.46 +	enum TControl
    1.47 +		{
    1.48 +		EControlCreateResource,
    1.49 +		EControlOpenResource,
    1.50 +		EControlCloseResource,
    1.51 +		EControlResourceAttributes,
    1.52 +		EControlGetResourceMetaData,
    1.53 +		EControlResourceDataAddress,
    1.54 +		EControlResourceDataSize,
    1.55 +		EControlGlobalResourceCount,
    1.56 +		EControlLocalGraphicsMemoryUsed,
    1.57 +		EControlGlobalGraphicsMemoryUsed
    1.58 +		};
    1.59 +	class TCreateResourceArgs
    1.60 +		{
    1.61 +	public:
    1.62 +		TUint32 iAttributes;
    1.63 +		const TDesC8* iMetaData;
    1.64 +		TInt iDataSize;
    1.65 +		};
    1.66 +	};
    1.67 +
    1.68 +#include <sgresource/sgdevice.inl>
    1.69 +
    1.70 +#endif // SGDEVICE_H