activityfw/activitydatabase/hsactivitydbserver/inc/activityserver.h
changeset 93 82b66994846c
child 83 156f692b1687
equal deleted inserted replaced
92:782e3408c2ab 93:82b66994846c
       
     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 ACTIVITYSERVER_H
       
    18 #define ACTIVITYSERVER_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 "activitytaskstorage.h"
       
    28 
       
    29 class CActivityStorage;
       
    30 /**
       
    31  *  CActivityServer
       
    32  * 
       
    33  */
       
    34 class CActivityServer : public CServer2,
       
    35                         public MActivityTaskStorage
       
    36 {
       
    37 public:
       
    38     /**
       
    39      * Destructor.
       
    40      */
       
    41     ~CActivityServer();
       
    42 
       
    43     /**
       
    44      * Two-phased constructor.
       
    45      */
       
    46     static CActivityServer* NewLC();
       
    47 
       
    48 public:
       
    49     /**
       
    50      * Interface implementation
       
    51      * @see MActivityTaskStorage::PushL(CActivityTask *)
       
    52      */
       
    53     void PushL(CActivityTask *);
       
    54     
       
    55     /**
       
    56      * Interface implementation
       
    57      * @see MActivityTaskStorage::Pop(CActivityTask *)
       
    58      */
       
    59     void Pop(CActivityTask *);
       
    60     
       
    61     /**
       
    62      * Interface implementation
       
    63      * @see MActivityTaskStorage::StorageData()
       
    64      */
       
    65     const RPointerArray<CActivityTask>& StorageData() const;
       
    66 
       
    67 private:
       
    68 
       
    69     /**
       
    70      * Constructor for performing 1st stage construction
       
    71      */
       
    72     CActivityServer();
       
    73 
       
    74     /**
       
    75      * Default constructor for performing 2nd stage construction
       
    76      */
       
    77     void ConstructL();
       
    78 
       
    79     /**
       
    80      * Interface implementation
       
    81      * @see CServer2::NewSessionL(const TVersion&, const RMessage2&)
       
    82      */
       
    83     CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const;
       
    84 
       
    85 private:
       
    86     RFs mFsSession;
       
    87     CActivityStorage* mStorage;
       
    88     RPointerArray<CActivityTask> mObservers;
       
    89 };
       
    90 
       
    91 #endif // ACTIVITYSERVER_H