messagingfw/watcherfw/inc/cwatcher.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // cwatcher.h
       
    15 //
       
    16 
       
    17 /**
       
    18  * @file 
       
    19  * @internalTechnology
       
    20  * @released
       
    21  */
       
    22 #ifndef __CWATCHER_H__
       
    23 #define __CWATCHER_H__
       
    24 
       
    25 /** 
       
    26 ECom interface UID for Active Watcher. 
       
    27 @internalTechnology
       
    28 @deprecated
       
    29 */
       
    30 const TUid KUidEComWatcher = { 0x10006554 };
       
    31 
       
    32 //**********************************
       
    33 // Constants
       
    34 //**********************************
       
    35 /** 
       
    36 ECom interface watcher delay.
       
    37 @internalTechnology
       
    38 @deprecated
       
    39 */
       
    40 const TInt KWatcherDelay = 10000000; // 10 seconds
       
    41 
       
    42 
       
    43 //**********************************
       
    44 // CWatcher
       
    45 //**********************************
       
    46 
       
    47 class CWatcher : public CActive
       
    48 /**
       
    49 @internalComponent
       
    50 @released
       
    51 */
       
    52 	{
       
    53 public:
       
    54 	IMPORT_C static CWatcher* NewL(TInt aPriority);
       
    55 	IMPORT_C ~CWatcher();
       
    56 	//
       
    57 	IMPORT_C void Start(TRequestStatus& aStatus);
       
    58 	//
       
    59 private:
       
    60 	CWatcher(TInt aPriority);
       
    61 	void DoCancel();
       
    62 	void RunL();
       
    63 	//
       
    64 private:
       
    65 	TRequestStatus* iObserver;
       
    66 	RThread iThread;
       
    67 	TInt iLaunchCount;
       
    68 
       
    69 	};
       
    70 
       
    71 //**********************************
       
    72 // CWatcherWait
       
    73 //**********************************
       
    74 
       
    75 class CWatcherWait: public CActive
       
    76 /**
       
    77 @internalComponent
       
    78 @released
       
    79 */
       
    80 	{
       
    81 public:
       
    82 	IMPORT_C static CWatcherWait* NewLC(TInt aPriority=EPriorityStandard);
       
    83 	IMPORT_C ~CWatcherWait();
       
    84 	IMPORT_C void Start();
       
    85 	//
       
    86 protected:
       
    87 	CWatcherWait(TInt aPriority);
       
    88 	void RunL();
       
    89 	void DoCancel();
       
    90 	};
       
    91 
       
    92 #endif // __CWATCHER_H__