hgcacheproxymodel/tsrc/unit/bmhelper.h
changeset 1 e48454f237ca
child 3 c863538fcbb6
equal deleted inserted replaced
0:89c329efa980 1:e48454f237ca
       
     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 BUFFERMANAGERHELPER_H
       
    19 #define BUFFERMANAGERHELPER_H
       
    20 
       
    21 #include <hgwidgets/hgcacheproxymodel.h>
       
    22 
       
    23 class BMHelper: public HgBufferManagerObserver
       
    24 {
       
    25 public:
       
    26     BMHelper(int totalSize);
       
    27     ~BMHelper();
       
    28     
       
    29     virtual void release(int start, int end);
       
    30     virtual void request(int start, int end, HgRequestOrder order = HgRequestOrderAscending);  
       
    31 
       
    32     bool isIntergal(int bufferSize);
       
    33     void itemCountChanged( int aIndex, bool aRemoved, int aNewTotalCount );
       
    34     void resizeCache(int newSize);
       
    35 
       
    36     
       
    37 private:    
       
    38     QList< bool > mBuffer;
       
    39     
       
    40 };
       
    41 #endif // BUFFERMANAGERHELPER_H