mmserv/radioutility/radioserver/Server/Src/RadioServerShutdown.h
changeset 0 71ca22bcf22a
child 16 43d09473c595
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     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 implements the shutdown timer that is used by the RadioServer
       
    15 *				 to shutdown the server 2 seconds after the last client has disconnected.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef RADIOSERVERSHUTDOWN_H
       
    22 #define RADIOSERVERSHUTDOWN_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Shutdown timer after the last client has disconnected.
       
    31 *
       
    32 *  @lib RadioServer.exe
       
    33 *  @since S60 3.0
       
    34 */
       
    35 class CRadioServerShutdown : public CTimer
       
    36     {
       
    37 public:  // Constructors and destructor
       
    38 
       
    39 	/**
       
    40 	 * Two-phased constructor.
       
    41 	 */
       
    42 	static CRadioServerShutdown* NewL();
       
    43 
       
    44 	/**
       
    45 	 * Destructor.
       
    46 	 */
       
    47 	virtual ~CRadioServerShutdown();
       
    48 
       
    49 public: // New functions
       
    50 
       
    51 	/**
       
    52 	 * Starts the shutdown count down.
       
    53 	 * @since S60 3.0
       
    54 	 */
       
    55 	void Start();
       
    56 
       
    57 private:  // Functions from base classes
       
    58 
       
    59 	/**
       
    60 	 * From CTimer
       
    61 	 * Cancel the shutdown timer.
       
    62 	 */
       
    63 	void DoCancel();
       
    64 
       
    65 	/**
       
    66 	 * From CTimer
       
    67 	 * Timer has expired, stop the RadioServer.
       
    68 	 **/
       
    69 	void RunL();
       
    70 
       
    71 private:
       
    72 
       
    73 	/**
       
    74 	 * C++ default constructor.
       
    75 	 */
       
    76 	CRadioServerShutdown();
       
    77 
       
    78 	/**
       
    79 	 * By default Symbian 2nd phase constructor is private.
       
    80 	 */
       
    81 	void ConstructL();
       
    82     };
       
    83 
       
    84 #endif      // RADIOSERVERSHUTDOWN_H
       
    85 
       
    86 // End of File