equal
deleted
inserted
replaced
|
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 * Version : %version: 1 % |
|
17 */ |
|
18 #ifndef HGBUFFERMANAGER_H_ |
|
19 #define HGBUFFERMANAGER_H_ |
|
20 |
|
21 class HgBufferManagerObserver; |
|
22 |
|
23 class HgBufferManager |
|
24 { |
|
25 public: |
|
26 |
|
27 HgBufferManager( |
|
28 HgBufferManagerObserver* aObserver, |
|
29 int aBufferSize, |
|
30 int aBufferTreshold, |
|
31 int aInitialPosition, |
|
32 int aTotalCount ); |
|
33 ~HgBufferManager(); |
|
34 |
|
35 void setPosition( int aIndex ); |
|
36 void resetBuffer( int aPosition, int aTotalCount); |
|
37 void itemCountChanged( int aIndex, bool aRemoved, int aNewTotalCount ); |
|
38 void resizeCache(int newSize, int newTreshold); |
|
39 |
|
40 private: |
|
41 void calculate(); |
|
42 |
|
43 private: |
|
44 HgBufferManagerObserver* mObserver; |
|
45 |
|
46 int mBufferSize; |
|
47 int mBufferTreshold; |
|
48 int mBufferPosition; |
|
49 int mDiff; |
|
50 int mTotalCount; |
|
51 |
|
52 bool mResetOrdered; |
|
53 |
|
54 int mRequestStart; |
|
55 int mRequestCount; |
|
56 int mReleaseStart; |
|
57 int mReleaseCount; |
|
58 }; |
|
59 |
|
60 #endif // HGBUFFERMANAGER_H_ |