|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 /* |
|
18 * huilowmemoryobserver.h |
|
19 * |
|
20 * Created on: Jun 9, 2009 |
|
21 * Author: ranshett |
|
22 */ |
|
23 |
|
24 #ifndef HUILOWMEMORYOBSERVER_H_ |
|
25 #define HUILOWMEMORYOBSERVER_H_ |
|
26 |
|
27 enum THuiMemoryLevel |
|
28 { |
|
29 /** |
|
30 * No memory available at all. Even all rendering |
|
31 * surfaces and buffers should be released. |
|
32 * |
|
33 **/ |
|
34 EHuiMemoryLevelNone = -50, |
|
35 |
|
36 /** |
|
37 * Lowest memory level. Use SW rendering if possible, |
|
38 * only rendering surfaces etc. absolutely mandatory |
|
39 * objects are allowed to consume memory. |
|
40 * |
|
41 **/ |
|
42 EHuiMemoryLevelLowest = -40, |
|
43 |
|
44 /** |
|
45 * To be defined. |
|
46 * |
|
47 **/ |
|
48 EHuiMemoryLevelLower = -30, |
|
49 |
|
50 /** |
|
51 * Low memory level, same as EnableLowMemoryState(ETrue). Normal |
|
52 * functionality and user experience is not provided. Memory usage |
|
53 * is minimized, but HW rendering is to be used. Caches, buffers, |
|
54 * effects, etc. are to be disabled. |
|
55 * |
|
56 **/ |
|
57 EHuiMemoryLevelLow = -20, |
|
58 |
|
59 /** |
|
60 * Reduced memory level. Normal functionality and user experience |
|
61 * should be provided, but all non-mandatory memory usage should |
|
62 * be avoided. |
|
63 * |
|
64 **/ |
|
65 EHuiMemoryLevelReduced = -10, |
|
66 |
|
67 /** |
|
68 * Normal memory level, same as EnableLowMemoryState(EFalse) |
|
69 **/ |
|
70 EHuiMemoryLevelNormal = 0 |
|
71 }; |
|
72 |
|
73 /** |
|
74 * Memory level observer interface is same as MHuiLowMemoryObserver |
|
75 * but gives more detailed information about memory levels. |
|
76 **/ |
|
77 class MHuiMemoryLevelObserver |
|
78 { |
|
79 public: |
|
80 IMPORT_C virtual void SetMemoryLevel(THuiMemoryLevel aLevel)=0; |
|
81 }; |
|
82 |
|
83 /** |
|
84 * @deprecated use MHuiMemoryLevelObserver instead. |
|
85 **/ |
|
86 class MHuiLowMemoryObserver |
|
87 { |
|
88 public: |
|
89 IMPORT_C virtual void EnableLowMemoryState(TBool aEnable)=0; |
|
90 }; |
|
91 |
|
92 #endif /* HUILOWMEMORYOBSERVER_H_ */ |