activityfw/storage/server/inc/afserver.h
branchRCL_3
changeset 113 0efa10d348c0
equal deleted inserted replaced
111:053c6c7c14f3 113:0efa10d348c0
       
     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 AFSERVER_H
       
    18 #define AFSERVER_H
       
    19 
       
    20 #define __E32SVR_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <f32file.h>    // RFs
       
    26 #include <apgcli.h>
       
    27 
       
    28 #include "aftaskstorage.h"
       
    29 
       
    30 class CAfStorage;
       
    31 
       
    32 class CAfServer : public CServer2,
       
    33                   public MAfTaskStorage
       
    34 {
       
    35 public:
       
    36     ~CAfServer();
       
    37 
       
    38     static CAfServer* NewLC();
       
    39 
       
    40 public:
       
    41     void PushL(CAfTask *);
       
    42     
       
    43     void Pop(CAfTask *);
       
    44     
       
    45     const RPointerArray<CAfTask>& StorageData() const;
       
    46     
       
    47 
       
    48 private:
       
    49     CAfServer();
       
    50 
       
    51     void ConstructL();
       
    52 
       
    53     CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const;
       
    54 
       
    55     void RemoveNotValidTasks(const CSession2* session);
       
    56 
       
    57 private:
       
    58     RApaLsSession mApaSession;
       
    59     RFs mFsSession;
       
    60     CAfStorage* mStorage;
       
    61     RPointerArray<CAfTask> mObservers;
       
    62     CBase* mAppEngine;
       
    63 };
       
    64 
       
    65 #endif // AFSERVER_H