taskswitcher/server/inc/hsrunningappsession.h
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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 RUNNINGAPPSESSION_H
       
    18 #define RUNNINGAPPSESSION_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include "tsdataobserver.h"
       
    24 #include "tsdataprovider.h"
       
    25 #include "tsdatastorage.h"
       
    26 /**
       
    27  *  CActivitySession
       
    28  * 
       
    29  */
       
    30 class CRunningAppSession : public CSession2
       
    31 {
       
    32 public:
       
    33     // Constructors and destructor
       
    34 
       
    35     /**
       
    36      * Destructor.
       
    37      */
       
    38     ~CRunningAppSession();
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * @param fileSession - initialized file system session
       
    43      * @param taskStorage - global observers storage
       
    44      * @param storage - data storage
       
    45      */
       
    46     static CRunningAppSession* NewL(MTsDataObserverStorage& observerStorage, 
       
    47                                     const MTsDataProvider& dataProvider,
       
    48                                     const TArray<MTsDataStorage*> &dataStorages);
       
    49 
       
    50 private:
       
    51 
       
    52     /**
       
    53      * Constructor for performing 1st stage construction
       
    54      */
       
    55     CRunningAppSession(MTsDataObserverStorage& observerStorage, 
       
    56                        const MTsDataProvider& dataProvider);
       
    57 
       
    58     /**
       
    59      * EPOC default constructor for performing 2nd stage construction
       
    60      */
       
    61     void ConstructL(const TArray<MTsDataStorage*> &dataStorages);
       
    62 
       
    63 private:
       
    64     /**
       
    65      * Implements interface
       
    66      * @see void CSession2::ServiceL(const RMessage2&)
       
    67      */
       
    68     void ServiceL(const RMessage2& message);
       
    69 
       
    70 private:
       
    71     MTsDataObserverStorage& mObserverStorage;
       
    72     const MTsDataProvider& mDataProvider;
       
    73     RPointerArray<MTsDataStorage> mDataStorages;
       
    74 };
       
    75 
       
    76 #endif // RUNNINGAPPSESSION_H