os/graphics/graphicsresourceservices/graphicsresourceimplementation/inc/sgextension.h
Update contrib.
1 // Copyright (c) 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Graphics Resource - kernel extension
20 #include <kernel/kernel.h>
21 #include <sgresource/sgcommon.h>
23 class DSgResource: public DBase
26 virtual TInt Open() = 0;
27 virtual void Close() = 0;
28 virtual TUint64 Id() const = 0;
29 virtual TUint32 Attributes() const = 0;
30 virtual TInt GetMetaData(TDes8& aMetaData) const = 0;
31 virtual DChunk* DataChunk() const = 0;
32 virtual TInt DataSize() const = 0;
33 inline static TInt Compare(const TUint64* aId, const DSgResource& aResource);
34 inline static TInt Compare(const DSgResource& aResource1, const DSgResource& aResource2);
40 IMPORT_C static TVersion Version();
41 IMPORT_C static TInt CreateResource(TUint32 aAttribs, const TDesC8& aMetaData, TInt aDataSize, DSgResource*& aResource);
42 IMPORT_C static TInt FindAndOpenResource(TUint64 aId, DSgResource*& aResource);
43 IMPORT_C static TInt GlobalResourceCount();
44 IMPORT_C static TInt GlobalGraphicsMemoryUsed();
47 #include <sgresource/sgextension.inl>
49 #endif // SGEXTENSION_H