calendarui/server/CalenSvr/inc/CalenSvrBootManager.h
changeset 0 f979ecb2b13e
child 28 96907930389d
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:   This class manages session to the calendar agenda server,
       
    15 *					       An Active object that takes care of multistep boot sequence.		
       
    16 *                 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CALENSVRBOOTMANAGER
       
    23 #define CALENSVRBOOTMANAGER
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <calprogresscallback.h>    // MCalProgressCallBack
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CCalenServer;
       
    30 
       
    31 /*
       
    32  * Active object that takes care of multistep boot sequence. 
       
    33  */
       
    34 NONSHARABLE_CLASS( CCalenSvrBootManager ) : public CActive,
       
    35                                             public MCalProgressCallBack
       
    36     {
       
    37 public:
       
    38     static CCalenSvrBootManager* NewL(CCalenServer& aServer);
       
    39     virtual ~CCalenSvrBootManager();
       
    40     void Start();
       
    41     
       
    42 public: // from   MCalProgressCallBack
       
    43     void Completed(TInt aError);
       
    44     TBool NotifyProgress();
       
    45     void Progress(TInt aPercentageCompleted);
       
    46 
       
    47 private: // From CActive
       
    48     void DoCancel();
       
    49     TInt RunError(TInt aError);
       
    50     void RunL();
       
    51 
       
    52 private:
       
    53     void CompleteSelf();
       
    54 
       
    55 private:
       
    56     CCalenSvrBootManager(CCalenServer& aServer);
       
    57     void ConstructL(void);
       
    58 
       
    59 private:
       
    60     enum TState 
       
    61     {
       
    62         EStateInit = 0, 
       
    63         EStateCreateAgendaFile,
       
    64         EStateReady
       
    65     };
       
    66     TState iState;
       
    67 
       
    68     CCalenServer& iServer;
       
    69 
       
    70     };
       
    71 
       
    72 #endif // CALENSVRBOOTMANAGER
       
    73 
       
    74 
       
    75 // End of File