|
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 CMCETESTUIENGINEPROFILE_H |
|
22 #define CMCETESTUIENGINEPROFILE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "MMCETestUIEngineCmdProvider.h" |
|
27 #include "CMCETestUIEngine.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CSIPProfile; |
|
32 class CMCETestUIEngineCmdBase; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * |
|
38 * CMCETestUIEngineProfile provides a wrapper for CSIPProfile. |
|
39 * Class is not the traditional wrapper in a sense that it would |
|
40 * conform to interface provided by CSIPProfile. Instead class |
|
41 * implements interface MMCETestUIEngineCmdProvider to provide |
|
42 * same kind of functionality in controlled way on different levels |
|
43 * of abstraction. |
|
44 * |
|
45 */ |
|
46 class CMCETestUIEngineProfile : public CBase, |
|
47 public MMCETestUIEngineCmdProvider |
|
48 { |
|
49 |
|
50 public: // Constructors and destructors |
|
51 |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. Not imported. |
|
55 */ |
|
56 static CMCETestUIEngineProfile* NewL( CSIPProfile* aProfile, |
|
57 CMCETestUIEngine& aEngine ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CMCETestUIEngineProfile(); |
|
63 |
|
64 public: // From MMCETestUICommandProvider |
|
65 |
|
66 /** |
|
67 * Gets the commands applicaple to this profile object. |
|
68 * |
|
69 * @return reference to array of commands |
|
70 */ |
|
71 IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& |
|
72 GetCommandsL(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Gets wrapped CSIPProfile object |
|
78 * |
|
79 * @return wrapped CSIPProfile |
|
80 */ |
|
81 CSIPProfile& Profile(); |
|
82 |
|
83 /** |
|
84 * @return ETrue if wrapped profile is set as default |
|
85 */ |
|
86 IMPORT_C TBool IsDefault() const; |
|
87 |
|
88 /** |
|
89 * @return ETrue if wrapped profile is registered |
|
90 */ |
|
91 IMPORT_C TBool IsRegistered() const; |
|
92 |
|
93 /** |
|
94 * @return Profile ID of the wrapped profile |
|
95 */ |
|
96 IMPORT_C TInt ProfileId() const; |
|
97 |
|
98 /** |
|
99 * @return provider name of the wrapped profile |
|
100 */ |
|
101 IMPORT_C const TDesC8& ProviderName() const; |
|
102 /** |
|
103 * @return aor of the wrapped profile |
|
104 */ |
|
105 |
|
106 IMPORT_C const TDesC8& Aor() const; |
|
107 |
|
108 private: // New functions |
|
109 |
|
110 /** |
|
111 * C++ default constructor. Not implemented. |
|
112 */ |
|
113 CMCETestUIEngineProfile(); |
|
114 |
|
115 /** |
|
116 * C++ first phase constructor. |
|
117 */ |
|
118 CMCETestUIEngineProfile( CSIPProfile* aProfile, |
|
119 CMCETestUIEngine& aEngine ); |
|
120 |
|
121 /** |
|
122 * Symbian second-phase constructor |
|
123 */ |
|
124 void ConstructL(); |
|
125 |
|
126 private: // Data |
|
127 |
|
128 /// Wrapped CSIPProfile object. Owned. |
|
129 CSIPProfile* iProfile; |
|
130 |
|
131 CMCETestUIEngine& iEngine; |
|
132 |
|
133 // Commands applicable to profiles. Owned. |
|
134 RPointerArray<TMCETestUIEngineCmdBase> iCommands; |
|
135 |
|
136 }; |
|
137 |
|
138 #endif |