|
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: Implementation of CPushViewerDocument. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "PushViewerDoc.h" |
|
23 #include <bldvariant.hrh> |
|
24 #include "PushViewerMsgEdAppUi.h" |
|
25 #include "PushMtmCommands.hrh" |
|
26 #include "PushMtmDef.h" |
|
27 #include <msvuids.h> |
|
28 #include <MuiuMsvSingleOpWatcher.h> |
|
29 #include <msvstd.h> |
|
30 #include <mtmuibas.h> |
|
31 |
|
32 // ================= MEMBER FUNCTIONS ======================= |
|
33 |
|
34 // --------------------------------------------------------- |
|
35 // CPushViewerDocument::NewL |
|
36 // --------------------------------------------------------- |
|
37 // |
|
38 CPushViewerDocument* CPushViewerDocument::NewL( CEikApplication& aApp ) |
|
39 { |
|
40 CPushViewerDocument* doc = new (ELeave) CPushViewerDocument( aApp ); |
|
41 CleanupStack::PushL( doc ); |
|
42 doc->ConstructL(); |
|
43 CleanupStack::Pop(); |
|
44 return doc; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // CPushViewerDocument::IssueLoadServiceL |
|
49 // --------------------------------------------------------- |
|
50 // |
|
51 void CPushViewerDocument::IssueLoadServiceL() |
|
52 { |
|
53 CMsvSingleOpWatcher* opWatcher = CMsvSingleOpWatcher::NewLC( *this ); |
|
54 |
|
55 TBuf8<1> dummyPar; |
|
56 CMsvEntrySelection* dummySel = new (ELeave) CMsvEntrySelection; |
|
57 CleanupStack::PushL( dummySel ); |
|
58 |
|
59 CMsvOperation* operation = MtmUi().InvokeAsyncFunctionL |
|
60 ( EPushMtmCmdLoadService, |
|
61 *dummySel, |
|
62 opWatcher->iStatus, |
|
63 dummyPar ); |
|
64 |
|
65 CleanupStack::PopAndDestroy( dummySel ); // dummySel |
|
66 |
|
67 // Observe the operation. |
|
68 AddSingleOperationL( operation, opWatcher ); |
|
69 CleanupStack::Pop( opWatcher ); // opWatcher |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------- |
|
73 // CPushViewerDocument::IssueMessageInfoL |
|
74 // --------------------------------------------------------- |
|
75 // |
|
76 void CPushViewerDocument::IssueMessageInfoL() |
|
77 { |
|
78 CMsvSingleOpWatcher* opWatcher = CMsvSingleOpWatcher::NewLC( *this ); |
|
79 |
|
80 TMessageInfoParam par; |
|
81 par.iDontShowNotification = ETrue; |
|
82 TMessageInfoParamBuf parBuf( par ); |
|
83 |
|
84 CMsvEntrySelection* dummySel = new (ELeave) CMsvEntrySelection; |
|
85 CleanupStack::PushL( dummySel ); |
|
86 |
|
87 CMsvOperation* operation = MtmUi().InvokeAsyncFunctionL |
|
88 ( KMtmUiFunctionMessageInfo, |
|
89 *dummySel, |
|
90 opWatcher->iStatus, |
|
91 parBuf ); |
|
92 CleanupStack::PopAndDestroy( dummySel ); // dummySel |
|
93 |
|
94 // See MsgEditorDocument.cpp about the usage of the following |
|
95 // method. |
|
96 AddSingleOperationL( operation, opWatcher ); |
|
97 CleanupStack::Pop( opWatcher ); // opWatcher |
|
98 } |
|
99 |
|
100 // --------------------------------------------------------- |
|
101 // CPushViewerDocument::CPushViewerDocument |
|
102 // --------------------------------------------------------- |
|
103 // |
|
104 CPushViewerDocument::CPushViewerDocument( CEikApplication& aApp ) |
|
105 : CMsgEditorDocument( aApp ) |
|
106 { |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------- |
|
110 // CPushViewerDocument::CreateAppUiL |
|
111 // --------------------------------------------------------- |
|
112 // |
|
113 CEikAppUi* CPushViewerDocument::CreateAppUiL() |
|
114 { |
|
115 // Create a MsgEditor based view. |
|
116 return new (ELeave) CPushViewerMsgEdAppUi; |
|
117 } |
|
118 |
|
119 // --------------------------------------------------------- |
|
120 // CPushViewerDocument::DefaultMsgFolder |
|
121 // --------------------------------------------------------- |
|
122 // |
|
123 TMsvId CPushViewerDocument::DefaultMsgFolder() const |
|
124 { |
|
125 return KMsvDraftEntryIdValue; |
|
126 } |
|
127 |
|
128 // --------------------------------------------------------- |
|
129 // CPushViewerDocument::DefaultMsgService |
|
130 // --------------------------------------------------------- |
|
131 // |
|
132 TMsvId CPushViewerDocument::DefaultMsgService() const |
|
133 { |
|
134 return KMsvLocalServiceIndexEntryId; |
|
135 } |
|
136 |
|
137 // --------------------------------------------------------- |
|
138 // CPushViewerDocument::CreateNewL |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 TMsvId CPushViewerDocument::CreateNewL( TMsvId /*aService*/, |
|
142 TMsvId /*aFolder*/ ) |
|
143 { |
|
144 return 0; |
|
145 } |
|
146 |
|
147 // --------------------------------------------------------- |
|
148 // CPushViewerDocument::EntryChangedL |
|
149 // --------------------------------------------------------- |
|
150 // |
|
151 void CPushViewerDocument::EntryChangedL() |
|
152 { |
|
153 } |
|
154 |
|
155 // End of file. |