sysresmonitoring/oommonitor/tsrc/oomtest/t_oomdummyapp/inc/CMsgHandler.h
branchRCL_3
changeset 1 0fdb7f6b0309
child 19 924385140d98
equal deleted inserted replaced
0:2e3d3ce01487 1:0fdb7f6b0309
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMSGHANDLER_H
       
    22 #define CMSGHANDLER_H
       
    23 
       
    24 #include <e32base.h>	// For CActive, link against: euser.lib
       
    25 #include <e32msgqueue.h>
       
    26 #include "t_oomdummyappAppUi.h"
       
    27 
       
    28 class CMsgHandler : public CActive
       
    29 	{
       
    30 public:
       
    31 	// Cancel and destroy
       
    32 	~CMsgHandler();
       
    33 
       
    34 	// Two-phased constructor.
       
    35 	static CMsgHandler* NewL(Ct_oomdummyappAppUi& aOwner);
       
    36 
       
    37 	// Two-phased constructor.
       
    38 	static CMsgHandler* NewLC(Ct_oomdummyappAppUi& aOwner);
       
    39 
       
    40 public:
       
    41 	// New functions
       
    42 	// Function for making the initial request
       
    43 	void StartL();
       
    44 
       
    45 private:
       
    46 	// C++ constructor
       
    47 	CMsgHandler(Ct_oomdummyappAppUi& aOwner);
       
    48 
       
    49 	// Second-phase constructor
       
    50 	void ConstructL();
       
    51 
       
    52 private:
       
    53 	// From CActive
       
    54 	// Handle completion
       
    55 	void RunL();
       
    56 
       
    57 	// How to cancel me
       
    58 	void DoCancel();
       
    59 
       
    60 	// Override to handle leaves from RunL(). Default implementation causes
       
    61 	// the active scheduler to panic.
       
    62 	TInt RunError(TInt aError);
       
    63 
       
    64 private:
       
    65 	TInt iState; // State of the active object
       
    66 	RMsgQueue<TInt> iMsgQueue; // messages from the harness
       
    67 	Ct_oomdummyappAppUi& iOwner;
       
    68 
       
    69 	};
       
    70 
       
    71 #endif // CMSGHANDLER_H