|
1 /* |
|
2 * Copyright (c) 2005 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 __CMCETESTUIENGINEOUTEVENT_H__ |
|
22 #define __CMCETESTUIENGINEOUTEVENT_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "CMCETestUIEngineEvent.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 class CMceOutEvent; |
|
31 class CMCETestUIEngine; |
|
32 class CMCETestUIEngineCmdBase; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * |
|
37 * CMCETestUIEngineOutSession provides a wrapper for CMCEOutSession. |
|
38 * Class is not the traditional wrapper in a sense that it would |
|
39 * conform to interface provided by CMCEOutSession. Instead class |
|
40 * implements interface MMCETestUIEngineCmdProvider to provide |
|
41 * same kind of functionality in controlled way on different levels |
|
42 * of abstraction. |
|
43 * |
|
44 */ |
|
45 |
|
46 class TEventParams |
|
47 { |
|
48 public: |
|
49 // IMPORT_C TSessionParams(void); |
|
50 TBuf<200> iRecipentAddress; |
|
51 TInt refreshInterval; |
|
52 TBuf<100> originator; |
|
53 TBuf<100> iEventHeader; |
|
54 }; |
|
55 |
|
56 class CMCETestUIEngineOutEvent : public CMCETestUIEngineEvent |
|
57 { |
|
58 |
|
59 public: // Constructors and destructors |
|
60 |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. Not imported. |
|
64 */ |
|
65 static CMCETestUIEngineOutEvent* NewL( |
|
66 CMCETestUIEngine& aEngine, |
|
67 CMCETestUIEngineProfile& aProfile ); |
|
68 |
|
69 /** |
|
70 * Two-phased constructor. Not imported. |
|
71 */ |
|
72 static CMCETestUIEngineOutEvent* NewL( |
|
73 CMCETestUIEngine& aEngine, |
|
74 CMceOutEvent* aOutEvent); |
|
75 /** |
|
76 * Two-phased constructor. |
|
77 * @param aEvent, reference to existing event that is associated |
|
78 * with this session. |
|
79 */ |
|
80 //static CMCETestUIEngineOutSession* NewL( |
|
81 // CMCETestUIEngine& aEngine, TDirection aDirection ); |
|
82 |
|
83 |
|
84 /** |
|
85 * Two-phased constructor. |
|
86 * @param aRefer, reference to existing refer that is associated |
|
87 * with this session. |
|
88 */ |
|
89 //static CMCETestUIEngineOutSession* NewL( |
|
90 // CMCETestUIEngine& aEngine, TDirection aDirection ); |
|
91 |
|
92 |
|
93 /** |
|
94 * Destructor. |
|
95 */ |
|
96 IMPORT_C virtual ~CMCETestUIEngineOutEvent(); |
|
97 |
|
98 public: // From MMCETestUICommandProvider |
|
99 |
|
100 /** |
|
101 * Gets the commands applicaple to this outsession object. |
|
102 * |
|
103 * @return reference to array of commands |
|
104 */ |
|
105 IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& |
|
106 GetCommandsL(); |
|
107 |
|
108 |
|
109 public: // From base class |
|
110 |
|
111 /** |
|
112 * @return Id of this particular outsession object |
|
113 */ |
|
114 IMPORT_C TInt Id() const; |
|
115 |
|
116 public: // New functions, internal |
|
117 |
|
118 /** |
|
119 * Gets wrapped MCEOutSession object |
|
120 * |
|
121 * @return wrapped MCEOutSession |
|
122 */ |
|
123 CMceOutEvent& OutEvent(); |
|
124 |
|
125 TBool EventParamsL(TEventParams &aEventParams); |
|
126 |
|
127 public: |
|
128 TEventParams iEventParams; |
|
129 |
|
130 |
|
131 private: // private constructors |
|
132 |
|
133 /** |
|
134 * C++ default constructor. |
|
135 */ |
|
136 CMCETestUIEngineOutEvent(); |
|
137 |
|
138 /** |
|
139 * C++ first phase constructor. |
|
140 */ |
|
141 CMCETestUIEngineOutEvent( |
|
142 CMCETestUIEngine& aEngine, |
|
143 CMceOutEvent* aOutEvent); |
|
144 |
|
145 /** |
|
146 * C++ first phase constructor. |
|
147 */ |
|
148 CMCETestUIEngineOutEvent( |
|
149 CMCETestUIEngine& aEngine, |
|
150 CMCETestUIEngineProfile& aProfile); |
|
151 |
|
152 /** |
|
153 * Symbian second-phase constructor |
|
154 */ |
|
155 void ConstructL(); |
|
156 |
|
157 void ConstructL(CMceOutEvent* aOutEvent); |
|
158 |
|
159 // to fill profile registrar in the recipent |
|
160 |
|
161 void FillProfileRegistrar(); |
|
162 |
|
163 |
|
164 private: // owned data |
|
165 |
|
166 // Wrapped CMCEOutSession object |
|
167 CMceOutEvent* iOutEvent; |
|
168 |
|
169 private: // not owned data |
|
170 |
|
171 // Profile to be used in session creation |
|
172 CMCETestUIEngineProfile* iProfile; |
|
173 |
|
174 TInt iId; |
|
175 |
|
176 |
|
177 //MCE_UNIT_TEST_DEFS; |
|
178 |
|
179 }; |
|
180 |
|
181 #endif |