|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef ALFPSOBSERVER_H |
|
19 #define ALFPSOBSERVER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32property.h> |
|
23 |
|
24 const TUid KTestCategoryUid = { 0x10281f87 }; |
|
25 const TUint KTfxClientKey = 0x12341234; |
|
26 const TUint KTfxServerKey = 0x12341235; |
|
27 const TUint KTfxServerCompFsKey = 0x12341236; |
|
28 |
|
29 |
|
30 |
|
31 const TUint KRandomMask = 0x80000000; |
|
32 const TUint KGetHeapSize = 0x90000000; |
|
33 |
|
34 // Set by the testee when it has finished setting up it's stuff, signalling |
|
35 // that the test app can start running its test. |
|
36 const TUint KTestInitComplete = 0xffff0000; |
|
37 |
|
38 // Set by the test app when it has finished running a test. |
|
39 const TUint KTestFinished = 0xffffffff; |
|
40 |
|
41 // Set by the testee when it determines that the test round is finished. |
|
42 // Used for deterministic memory allocation failure tests. |
|
43 const TUint KTestRoundComplete = 0xffffff00; |
|
44 |
|
45 //---------------------------------------------------------------------------- |
|
46 //---------------------------------------------------------------------------- |
|
47 // |
|
48 NONSHARABLE_CLASS( MPsObserver ) |
|
49 { |
|
50 public: |
|
51 virtual void PsValueUpdated( const TUid aCategory, const TUint aKey, |
|
52 const TInt aVal ) = 0; |
|
53 }; |
|
54 |
|
55 //---------------------------------------------------------------------------- |
|
56 //---------------------------------------------------------------------------- |
|
57 // |
|
58 NONSHARABLE_CLASS( CAlfPsObserver ) : public CActive |
|
59 { |
|
60 public: |
|
61 static CAlfPsObserver* NewL( MPsObserver* aClient, const TUid aCategory, |
|
62 const TUint aKey ); |
|
63 static CAlfPsObserver* New( MPsObserver* aClient, const TUid aCategory, |
|
64 const TUint aKey ); |
|
65 ~CAlfPsObserver(); |
|
66 |
|
67 // From CActive |
|
68 virtual void DoCancel(); |
|
69 virtual void RunL(); |
|
70 |
|
71 private: |
|
72 CAlfPsObserver( MPsObserver* aClient, const TUid aCategory, |
|
73 const TUint aKey); |
|
74 void Construct( const TUid aCategory, const TUint aKey ); |
|
75 |
|
76 private: // data |
|
77 RProperty iProperty; |
|
78 MPsObserver* iClient; |
|
79 TUid iCategory; |
|
80 TUint iKey; |
|
81 }; |
|
82 |
|
83 #endif // ALFPSOBSERVER_H |