|
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 wrapper helper functions for test code to control the test wrappers |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 @internalComponent - Internal Symbian test code |
|
22 */ |
|
23 |
|
24 #ifndef STARTUPADAPTATIONWRAPPER_H_ |
|
25 #define STARTUPADAPTATIONWRAPPER_H_ |
|
26 |
|
27 #include <e32std.h> |
|
28 #include <ssm/startupadaptation.h> |
|
29 #include <ssm/startupadaptationobserver.h> |
|
30 |
|
31 class CStartupAdaptationWrapper : public CStartupAdaptation |
|
32 { |
|
33 public: |
|
34 static void SetLoaded(TBool aLoaded); |
|
35 static TBool IsLoaded(); |
|
36 |
|
37 static CStartupAdaptation* NewStartupAdaptation(TAny* aParams); |
|
38 static void DeleteStartupAdaptation(); |
|
39 |
|
40 static void SetLastCommandId(StartupAdaptation::TCommand aCommandId); |
|
41 static StartupAdaptation::TCommand LastCommandId(); |
|
42 |
|
43 static void SetLastCommandDataL(TDesC8& aData); |
|
44 static HBufC8* LastCommandData(); |
|
45 static void DeleteLastCommandData(); |
|
46 |
|
47 static void TriggerObserverEventCallbackL(const StartupAdaptation::TEvent aEventId, TDesC8& aData); |
|
48 static void TriggerResponseCallbackL(const StartupAdaptation::TCommand aCommandId, TDesC8& aData); |
|
49 |
|
50 private: |
|
51 |
|
52 static StartupAdaptation::TCommand iLastCommandId; |
|
53 static HBufC8* iLastCommandData; |
|
54 static CStartupAdaptationWrapper* iStartupAdaptation; |
|
55 static TBool iIsLoaded; |
|
56 |
|
57 public: |
|
58 CStartupAdaptationWrapper(MStartupAdaptationObserver* aObserver); |
|
59 |
|
60 virtual void CommandL(const StartupAdaptation::TCommand aCommandId, TDesC8& aData); |
|
61 |
|
62 virtual void CancelCommandL(const StartupAdaptation::TCommand aCommandId); |
|
63 |
|
64 virtual TVersion Version() const; |
|
65 |
|
66 private: |
|
67 MStartupAdaptationObserver* iObserver; |
|
68 TBool iResponding; |
|
69 }; |
|
70 |
|
71 #endif /*STARTUPADAPTATIONWRAPPER_H_*/ |