systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20 */
       
    21 
       
    22 #ifndef __SHMATESTAPPGOOD_H
       
    23 #define __SHMATESTAPPGOOD_H
       
    24 
       
    25 #include <e32property.h>
       
    26 /**
       
    27 Application class
       
    28 */
       
    29 #include <eikapp.h>
       
    30 class CTestApplication : public CEikApplication
       
    31 	{
       
    32 public:
       
    33 	static CApaApplication* NewApplication();
       
    34 	~CTestApplication();
       
    35 	
       
    36 private:
       
    37 	CTestApplication();
       
    38 	
       
    39 	// from CApaApplication
       
    40 	TUid AppDllUid() const;
       
    41 	CApaDocument* CreateDocumentL();
       
    42 	};
       
    43 
       
    44 /**
       
    45 Document class
       
    46 */
       
    47 #include <eikdoc.h>
       
    48 class CEikAppUi;
       
    49 class CEikApplication;
       
    50 class CTestDocument : public CEikDocument
       
    51 	{
       
    52 public:
       
    53 	static CTestDocument* NewL(CEikApplication& aApp);
       
    54 	~CTestDocument();
       
    55 	
       
    56 private:
       
    57 	CTestDocument(CEikApplication& aApp);
       
    58 	
       
    59 	// from CEikDocument
       
    60 	CEikAppUi* CreateAppUiL();
       
    61 	};
       
    62 
       
    63 // This class is used for observing the RProperty which is set by the test case.  After getting the
       
    64 // notification for changed property the application would be killed.
       
    65 class CPropertyObserver : public CActive
       
    66     {
       
    67 public:
       
    68     CPropertyObserver();
       
    69     ~CPropertyObserver();
       
    70     
       
    71     void StartL();
       
    72 
       
    73 protected:
       
    74     void RunL();
       
    75     void DoCancel();
       
    76     TInt RunError(TInt aError);
       
    77     
       
    78 private:
       
    79     RProperty iProperty;   
       
    80     };
       
    81 
       
    82 /**
       
    83 Application UI class, root of all graphical user interface in this application
       
    84 */
       
    85 #include <eikappui.h>
       
    86 class CTestAppUi : public CEikAppUi
       
    87     {
       
    88 public:
       
    89 	CTestAppUi();
       
    90 	~CTestAppUi();
       
    91 	
       
    92 	// from CEikAppUi
       
    93 	void ConstructL();
       
    94 
       
    95 private:
       
    96     CPropertyObserver* iPropertyObs;
       
    97 	};
       
    98 
       
    99 #endif // __SHMATESTAPPGOOD_H