taskswitcher/server/inc/tsserializeddataprovider.h
changeset 116 305818acdca4
equal deleted inserted replaced
112:dbfb5e38438b 116:305818acdca4
       
     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 #ifndef SERIALIZEDDATAPROVIDER_H
       
    18 #define SERIALIZEDDATAPROVIDER_H
       
    19 
       
    20 #include "tsdataobserver.h"
       
    21 #include "tsdataprovider.h"
       
    22 #include "tsmodelobserver.h"
       
    23 
       
    24 class RWriteStream;
       
    25 
       
    26 class CTsSerializedDataProvider: public CBase,
       
    27                                  public MTsModelObserver,
       
    28                                  public MTsDataProvider
       
    29 {
       
    30 public:
       
    31     static CTsSerializedDataProvider* NewL(MTsDataObserver& aObserver);
       
    32     ~CTsSerializedDataProvider();
       
    33     const TDesC8& Data() const;
       
    34     void DataChanged(MTsModel &aModel);
       
    35 
       
    36 private:
       
    37     CTsSerializedDataProvider(MTsDataObserver& aObserver);
       
    38     void serializeModel(const MTsModel& aSrc);
       
    39     void serializeModelL(const MTsModel& aSrc);
       
    40     void serializeModelL(RWriteStream& aDst, const MTsModel& aSrc); 
       
    41 
       
    42 private:
       
    43     MTsDataObserver& iObserver;
       
    44     RBuf8 iData;
       
    45 
       
    46 };
       
    47 
       
    48 #endif //SERIALIZEDDATAPROVIDER_H