emailservices/emailservermonitor/inc/emailservermonitorutilities.h
changeset 0 8466d47a6819
child 10 f5907b1a1053
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     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 * Declaration of common functions of Email Server Monitor
       
    16 *
       
    17 */
       
    18 //  Include Files  
       
    19 
       
    20 #ifndef EMAILSERVERMONITORUTILITIES_H
       
    21 #define EMAILSERVERMONITORUTILITIES_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32cmn.h>     // TSecureId
       
    25 
       
    26 const TInt KDefaultTimeToWaitInSeconds = 3;
       
    27 
       
    28 /////////////////////////////////////////////////////////////////////////////
       
    29 // LOCAL FUNCTION DECLARATIONS
       
    30 
       
    31 /**
       
    32  * Wait some time to give other applications and servers some time to shut
       
    33  * down themselves gracefully or to start themselves
       
    34  * 
       
    35  * @param aWaitTimeInSeconds Time to wait in seconds
       
    36  */
       
    37 void Wait( TInt aWaitTimeInSeconds = KDefaultTimeToWaitInSeconds );
       
    38 
       
    39 /**
       
    40  * Check is specified process running. If we are checking other UID than
       
    41  * ourselves, we just check is there specified process running. If we are
       
    42  * checking our own UID, then we check is there another instance already
       
    43  * running.
       
    44  * 
       
    45  * @param aUid Process UID (=Secure ID) to be searched
       
    46  * @param aProcess If process handle is given, it will updated to have a
       
    47  *                 a handle to the found process
       
    48  * @param aProcessUpdated On return ETrue, if aProcess handle was given and
       
    49  *                        it was updated succesfully
       
    50  * @return ETrue if the specified process is running, otherwise EFalse.
       
    51  */
       
    52 TBool IsProcessRunning( TSecureId aUid, RProcess* aProcess = NULL );
       
    53 
       
    54 
       
    55 #endif // EMAILSERVERMONITORUTILITIES_H