activityfw/activitydatabase/hsactivitydbserver/inc/afserver.h
changeset 102 8b8b34fa9751
parent 100 0920c6a9b6c8
child 106 e78d6e055a5b
equal deleted inserted replaced
100:0920c6a9b6c8 102:8b8b34fa9751
     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 
       
    27 #include "aftaskstorage.h"
       
    28 
       
    29 class CAfStorage;
       
    30 
       
    31 class CAfServer : public CServer2,
       
    32                   public MAfTaskStorage
       
    33 {
       
    34 public:
       
    35     ~CAfServer();
       
    36 
       
    37     static CAfServer* NewLC();
       
    38 
       
    39 public:
       
    40     void PushL(CAfTask *);
       
    41     
       
    42     void Pop(CAfTask *);
       
    43     
       
    44     const RPointerArray<CAfTask>& StorageData() const;
       
    45     
       
    46 
       
    47 private:
       
    48     CAfServer();
       
    49 
       
    50     void ConstructL();
       
    51 
       
    52     CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const;
       
    53 
       
    54     void RemoveNotValidTasks(const CSession2* session);
       
    55 
       
    56 private:
       
    57     RFs mFsSession;
       
    58     CAfStorage* mStorage;
       
    59     RPointerArray<CAfTask> mObservers;
       
    60 };
       
    61 
       
    62 #endif // AFSERVER_H