|
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 __CMCETESTUIENGINEREFER_H__ |
|
22 #define __CMCETESTUIENGINEREFER_H__ |
|
23 |
|
24 // USER INCLUDES |
|
25 |
|
26 // SYSTEM INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class CMceManager; |
|
33 class CMceFCMsgExchange; |
|
34 class CMceEvent; |
|
35 class CMCETestUIEngine; |
|
36 class CMCETestUIEngineCmdBase; |
|
37 class CMCETestUIEngineProfile; |
|
38 class CMceRefer; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 /** |
|
42 * |
|
43 * CMCETestUIEngineSession provides a wrapper for CMCESession. |
|
44 * Class is not the traditional wrapper in a sense that it would |
|
45 * conform to interface provided by CMCESession. Instead class |
|
46 * implements interface MMCETestUIEngineCmdProvider to provide |
|
47 * same kind of functionality in controlled way on different levels |
|
48 * of abstraction. |
|
49 * |
|
50 * TODO: Wrappers for streams and use of them. |
|
51 * |
|
52 */ |
|
53 class CMCETestUIEngineRefer : public CBase, |
|
54 public MMCETestUIEngineCmdProvider |
|
55 { |
|
56 |
|
57 public: // public enumerations |
|
58 |
|
59 /** |
|
60 * Enumeration for defining session's direction |
|
61 */ |
|
62 |
|
63 public: // Constructors and destructors |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 IMPORT_C virtual ~CMCETestUIEngineRefer(); |
|
69 |
|
70 public: // From MMCETestUICommandProvider |
|
71 |
|
72 /** |
|
73 * Gets the commands applicaple to this session object. |
|
74 * |
|
75 * @return reference to array of commands |
|
76 */ |
|
77 IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& |
|
78 GetCommandsL(); |
|
79 |
|
80 public: // New functions, pure virtual |
|
81 |
|
82 /** |
|
83 * @return Id of this particular session object |
|
84 */ |
|
85 IMPORT_C virtual TInt Id() const = 0; |
|
86 |
|
87 public: // New functions |
|
88 |
|
89 /** |
|
90 * @return Textual representation of the state of the wrapped MCESession |
|
91 */ |
|
92 IMPORT_C const TDesC& State() ; |
|
93 |
|
94 |
|
95 public: // New functions, internal |
|
96 |
|
97 /** |
|
98 * Gets wrapped MCESession object |
|
99 * |
|
100 * @return wrapped MCESession |
|
101 */ |
|
102 IMPORT_C CMceRefer& Refer(); |
|
103 |
|
104 |
|
105 |
|
106 private: // private constructors |
|
107 |
|
108 /** |
|
109 * C++ default constructor. Not implemented. |
|
110 */ |
|
111 CMCETestUIEngineRefer(); |
|
112 |
|
113 protected: |
|
114 |
|
115 /** |
|
116 * C++ first phase constructor. |
|
117 */ |
|
118 CMCETestUIEngineRefer( |
|
119 CMCETestUIEngine& aEngine ); |
|
120 |
|
121 /** |
|
122 * Symbian second-phase constructor |
|
123 */ |
|
124 void BaseConstructL(); |
|
125 |
|
126 protected: // owned data |
|
127 |
|
128 // Commands applicable to all sessions. Owned. |
|
129 RPointerArray<TMCETestUIEngineCmdBase> iCommands; |
|
130 |
|
131 |
|
132 protected: // not owned data |
|
133 |
|
134 CMCETestUIEngine& iEngine; |
|
135 |
|
136 // Pointer to wrapped OutSession/InSession |
|
137 CMceRefer* iRefer; |
|
138 |
|
139 |
|
140 }; |
|
141 |
|
142 #endif |