|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Graphics Resource - kernel extension |
|
15 // |
|
16 |
|
17 #ifndef SGEXTENSION_H |
|
18 #define SGEXTENSION_H |
|
19 |
|
20 #include <kernel/kernel.h> |
|
21 #include <sgresource/sgcommon.h> |
|
22 |
|
23 class DSgResource: public DBase |
|
24 { |
|
25 public: |
|
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); |
|
35 }; |
|
36 |
|
37 class SgExtension |
|
38 { |
|
39 public: |
|
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(); |
|
45 }; |
|
46 |
|
47 #include <sgresource/sgextension.inl> |
|
48 |
|
49 #endif // SGEXTENSION_H |