|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: Server Mtm class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef PUSHMTMSERVER_H |
|
21 #define PUSHMTMSERVER_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include "PushMtmProgress.h" |
|
26 #include <mtsr.h> |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Server MTM for pushed messages. Currently, all operations are executed |
|
32 * in the Client MTM, so this class is a collection of dummy implementations. |
|
33 * |
|
34 * @lib ?library |
|
35 * @since ?Series60_version |
|
36 */ |
|
37 class CPushMtmServer : public CBaseServerMtm |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor (exported factory function). |
|
43 * Leaves on failure. |
|
44 * @param aRegisteredMtmDll Registration data for the MTM DLL. |
|
45 * @param aInitialEntry Initial entry. |
|
46 * @return The constructed Server MTM. |
|
47 */ |
|
48 IMPORT_C static CPushMtmServer* NewL( |
|
49 CRegisteredMtmDll& aRegisteredMtmDll, |
|
50 CMsvServerEntry* aInitialEntry ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CPushMtmServer(); |
|
56 |
|
57 private: // Constructors |
|
58 |
|
59 /** |
|
60 * Constructor. |
|
61 * @param aRegisteredMtmDll Registration data for the MTM DLL. |
|
62 * @param aInitialEntry Initial entry. |
|
63 */ |
|
64 CPushMtmServer( |
|
65 CRegisteredMtmDll& aRegisteredMtmDll, |
|
66 CMsvServerEntry* aInitialEntry ); |
|
67 |
|
68 /** |
|
69 * Second phase constructor. Leaves on failure. |
|
70 * Add this active object to the scheduler. |
|
71 */ |
|
72 void ConstructL(); |
|
73 |
|
74 private: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * Do nothing, but leave with KErrNotSupported. |
|
78 */ |
|
79 void CopyToLocalL( |
|
80 const CMsvEntrySelection& aSelection, |
|
81 TMsvId aDestination, |
|
82 TRequestStatus& aStatus ); |
|
83 |
|
84 /** |
|
85 * Do nothing, but leave with KErrNotSupported. |
|
86 */ |
|
87 void CopyFromLocalL( |
|
88 const CMsvEntrySelection& aSelection, |
|
89 TMsvId aDestination, |
|
90 TRequestStatus& aStatus ); |
|
91 |
|
92 /** |
|
93 * Do nothing, but leave with KErrNotSupported. |
|
94 */ |
|
95 void CopyWithinServiceL( |
|
96 const CMsvEntrySelection& aSelection, |
|
97 TMsvId aDestination, |
|
98 TRequestStatus& aStatus ); |
|
99 |
|
100 /** |
|
101 * Do nothing, but leave with KErrNotSupported. |
|
102 */ |
|
103 void MoveToLocalL( |
|
104 const CMsvEntrySelection& aSelection, |
|
105 TMsvId aDestination, |
|
106 TRequestStatus& aStatus ); |
|
107 |
|
108 /** |
|
109 * Do nothing, but leave with KErrNotSupported. |
|
110 */ |
|
111 void MoveFromLocalL( |
|
112 const CMsvEntrySelection& aSelection, |
|
113 TMsvId aDestination, |
|
114 TRequestStatus& aStatus ); |
|
115 |
|
116 /** |
|
117 * Do nothing, but leave with KErrNotSupported. |
|
118 */ |
|
119 void MoveWithinServiceL( |
|
120 const CMsvEntrySelection& aSelection, |
|
121 TMsvId aDestination, |
|
122 TRequestStatus& aStatus ); |
|
123 |
|
124 /** |
|
125 * Do nothing, but leave with KErrNotSupported. |
|
126 */ |
|
127 void DeleteAllL( |
|
128 const CMsvEntrySelection& aSelection, |
|
129 TRequestStatus& aStatus ); |
|
130 |
|
131 /** |
|
132 * Do nothing, but leave with KErrNotSupported. |
|
133 */ |
|
134 void CreateL( TMsvEntry aNewEntry, TRequestStatus& aStatus ); |
|
135 |
|
136 /** |
|
137 * Do nothing, but leave with KErrNotSupported. |
|
138 */ |
|
139 void ChangeL( TMsvEntry aNewEntry, TRequestStatus& aStatus ); |
|
140 |
|
141 /** |
|
142 * Do nothing, but leave with KErrNotSupported. |
|
143 */ |
|
144 void StartCommandL( |
|
145 CMsvEntrySelection& aSelection, |
|
146 TInt aCommand, |
|
147 const TDesC8& aParameter, |
|
148 TRequestStatus& aStatus ); |
|
149 |
|
150 /** |
|
151 * Do nothing, but return EFalse. |
|
152 */ |
|
153 TBool CommandExpected(); |
|
154 |
|
155 /** |
|
156 * Return iProgressPckg. |
|
157 */ |
|
158 const TDesC8& Progress(); |
|
159 |
|
160 /** |
|
161 * Do nothing. |
|
162 */ |
|
163 void DoRunL(); |
|
164 |
|
165 /** |
|
166 * Do nothing. |
|
167 */ |
|
168 void DoComplete( TInt aError ); |
|
169 |
|
170 /** |
|
171 * Do nothing. |
|
172 */ |
|
173 void DoCancel(); |
|
174 |
|
175 protected: // Data |
|
176 |
|
177 TPushMtmProgress iProgress; ///< Progress information. |
|
178 /// Reference to progress information as a buffer pointer. |
|
179 TPushMtmProgressPckg iProgressPckg; |
|
180 }; |
|
181 |
|
182 #endif // PUSHMTMSERVER_H |