sysstatemgmt/systemstatereferenceplugins/test/tclayer/inc/testpropertyobserver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-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 // Contains implementation of a test property observer
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @test
       
    21  @internalComponent - Internal Symbian test code 
       
    22 */
       
    23 
       
    24 #ifndef TESTPROPERTYOBSERVER_H_
       
    25 #define TESTPROPERTYOBSERVER_H_
       
    26 
       
    27 #include <ssm/ssmpropertyobserver.h>
       
    28 
       
    29 // Forward declare for friendship
       
    30 class CCLayerTestSsmPropertyObserver;
       
    31 
       
    32 /**
       
    33  * Key for test property
       
    34  * @internalComponent
       
    35  * @test
       
    36  */
       
    37 static const TUint KTestPropertyKey = 1234;
       
    38 
       
    39 /**
       
    40  * Test Property Observer class
       
    41  * 
       
    42  * @internalComponent
       
    43  * @test
       
    44  */
       
    45 class CTestPropertyObserver : public CSsmPropertyObserver
       
    46 {
       
    47 public:
       
    48 	CTestPropertyObserver();
       
    49 	virtual ~CTestPropertyObserver();
       
    50 
       
    51 	void SetNextPropertyChangedReturn(TBool aReturn);
       
    52 	TInt GetLastPropertyChangedValue();
       
    53 	TInt GetPropertyChangedCount();
       
    54 	
       
    55 	// From CSsmPropertyObserver
       
    56 	virtual TBool PropertyChangedL(TInt aValue);
       
    57 	
       
    58 	friend class CCLayerTestSsmPropertyObserver;
       
    59 	
       
    60 protected:
       
    61 	// From CActive
       
    62 	virtual void RunL();
       
    63 	
       
    64 private:
       
    65 	TBool iNextPropertyChangedReturn;
       
    66 	TInt iLastPropertyChangedValue;
       
    67 	TInt iPropertyChangedCount;
       
    68 };
       
    69 
       
    70 #endif /*TESTPROPERTYOBSERVER_H_*/