gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/inc/CSchedulerUtility.h
changeset 0 8c5d936e5675
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     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:        
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef CSCHEDULERUTILITY_H
       
    27 #define CSCHEDULERUTILITY_H
       
    28 
       
    29 //  INCLUDES
       
    30 #include <e32base.h>
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * A singleton class used to handle starting and stopping a new scheduler-loop
       
    38 * This stops the scheduler loop if it was started by this class.
       
    39 *
       
    40 *  @lib Profiles_PEC.lib
       
    41 *  @since 3.0
       
    42 */
       
    43 class CSchedulerUtility : public CBase
       
    44     {
       
    45     public: // New functions
       
    46         
       
    47         /**
       
    48         * Create and return instance of CSchedulerUtility.
       
    49         * @since 3.0
       
    50         * @return instance of CSchedulerUtility
       
    51         */
       
    52         //static CSchedulerUtility* InstanceL();
       
    53     	
       
    54         /** 
       
    55         * Two-phased constructor.
       
    56         */
       
    57         static CSchedulerUtility* NewL();
       
    58                 
       
    59         /**
       
    60         * Destroys the scheduler utility instance.
       
    61         * @since 3.0
       
    62         */
       
    63        // static void Release();
       
    64 
       
    65         /**
       
    66          * Starts a new scheduler loop if one isn't already started.
       
    67          * @since 3.0
       
    68          */
       
    69         void Start();
       
    70 
       
    71         /**
       
    72          * Stops a scheduler loop if it was started by this class.
       
    73          * @since 3.0
       
    74          */
       
    75         void Stop();
       
    76         
       
    77         /**
       
    78         * Destructor.
       
    79         */
       
    80         virtual ~CSchedulerUtility();
       
    81         
       
    82     private:  
       
    83 
       
    84         /**
       
    85         * C++ default constructor.
       
    86         */
       
    87         CSchedulerUtility();
       
    88 
       
    89         /**
       
    90         * By default Symbian 2nd phase constructor is private.
       
    91         */
       
    92         void ConstructL();
       
    93     
       
    94     private:    // Data
       
    95          
       
    96         CActiveSchedulerWait* iWait;      
       
    97 
       
    98     };
       
    99 
       
   100 #endif      // CSCHEDULERUTILITY_H
       
   101             
       
   102 // End of File
       
   103