vpnengine/sit/inc/sitdeathobserver.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003-2006 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:   SIT thread death observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // @file sitdeathobserver.h
       
    21 
       
    22 #ifndef __SIT_DEATH_OBSERVER_H__
       
    23 #define __SIT_DEATH_OBSERVER_H__
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 class MSitDeathListener
       
    28     {
       
    29 public:
       
    30     virtual void SitDied() = 0;
       
    31     };
       
    32    
       
    33 /**
       
    34  * SIT thread death observer
       
    35  */
       
    36 NONSHARABLE_CLASS(CSitDeathObserver) : public CActive
       
    37     {
       
    38 public:
       
    39     CSitDeathObserver(TThreadId aThreadId, MSitDeathListener* aSitDeathListener);
       
    40     ~CSitDeathObserver();
       
    41 
       
    42     void StartObservingL();
       
    43 
       
    44 private: // From CActive
       
    45     void DoCancel();
       
    46     void RunL();
       
    47 
       
    48 private:
       
    49     RThread iThreadToObserve;
       
    50     TThreadId iThreadId;
       
    51     MSitDeathListener* iSitDeathListener;
       
    52     };
       
    53 
       
    54 #endif // __SIT_DEATH_OBSERVER_H__