author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 18 Jan 2010 21:02:57 +0200 | |
changeset 38 | 02682e02e51f |
parent 33 | 50974a8b132e |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2007-2007 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: This class is the observer of CMgService class |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef MGSERVICEOBSERVER_H |
|
20 |
#define MGSERVICEOBSERVER_H |
|
21 |
||
22 |
#include "mgservice.hrh" |
|
23 |
#include "mgoperationobserver.h" |
|
24 |
||
25 |
class CLiwGenericParamList; |
|
26 |
class MCLFItemListModel; |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
27 |
class CClfOperationObserver; |
19 | 28 |
|
29 |
||
30 |
||
31 |
||
32 |
// CLASS DECLARATION |
|
33 |
/** |
|
34 |
* Service Observer is for observing operation events of the MG service class. |
|
35 |
* CMgServiceObserver gets notified when asynchronous operations |
|
36 |
* are completed. |
|
37 |
* |
|
38 |
* |
|
39 |
* @since Series60 v3.2 |
|
40 |
*/ |
|
41 |
||
42 |
||
43 |
NONSHARABLE_CLASS( CMgServiceObserver ): public CBase, public MMgOperationObserver |
|
44 |
{ |
|
45 |
public: |
|
46 |
||
47 |
||
48 |
/** |
|
49 |
* Returns the instance of CMgServiceObserver. |
|
50 |
* @since Series60 v3.2 |
|
51 |
* @param void |
|
52 |
* @return void |
|
53 |
*/ |
|
54 |
||
55 |
static CMgServiceObserver* NewL(); |
|
56 |
||
57 |
/** |
|
58 |
* Destructor. |
|
59 |
*/ |
|
60 |
virtual ~CMgServiceObserver(); |
|
61 |
||
62 |
||
63 |
/** |
|
64 |
* Abstract method to get CMgService class events. This method is |
|
65 |
* called when an event is received. |
|
66 |
* @since Series60 v3.2 |
|
67 |
* @param aListModel ClF Iterator contains the required result |
|
68 |
* @param aOperationEvent specifies the asynchronous event |
|
69 |
* @param aError System wide error code if the operation did not |
|
70 |
* succeed. |
|
71 |
*/ |
|
72 |
virtual void MgNotifyL(TUint aTransactionID, |
|
73 |
MCLFItemListModel* aListModel, |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
74 |
CClfOperationObserver* aOperationObserver, |
19 | 75 |
TMgOperationEvent& aOperationEvent , |
76 |
const TInt& aError ); |
|
77 |
||
78 |
||
79 |
||
80 |
/** |
|
81 |
* method to set callback of consumer and pointer to |
|
82 |
* input/output parameter list. |
|
83 |
* @since Series60 v3.2 |
|
84 |
* @param iCmdId It represents whether the command if of request (FileInfo/File) |
|
85 |
* @param iInput sent by the consumer at the time of request |
|
86 |
* @param iOutput Result of given command will be |
|
87 |
* stored in given output parameter list |
|
88 |
* @param aCallback Contains the call back for Asynchronous request |
|
89 |
*/ |
|
90 |
void SetMemberVar( const TMgCmdId& aCmdId, |
|
91 |
const CLiwGenericParamList* aInput, |
|
92 |
MLiwNotifyCallback* aCallBack ); |
|
93 |
||
94 |
/** |
|
95 |
* Cancel the pending asynchronous request |
|
96 |
* @since Series60 v3.2 |
|
97 |
* @param void |
|
98 |
* @return void |
|
99 |
*/ |
|
100 |
void CancelL(); |
|
101 |
||
102 |
private : |
|
103 |
||
104 |
/** |
|
105 |
* Constructor. |
|
106 |
*/ |
|
107 |
CMgServiceObserver(); |
|
108 |
||
109 |
/** |
|
110 |
* Two-phased constructor |
|
111 |
* @since Series60 v3.2 |
|
112 |
* @param void |
|
113 |
* @return void |
|
114 |
*/ |
|
115 |
void ConstructL(); |
|
116 |
||
117 |
||
118 |
private: |
|
119 |
||
120 |
/** |
|
121 |
* Store the instance of the callback of the Client |
|
122 |
*/ |
|
123 |
MLiwNotifyCallback* iCallBack; |
|
124 |
||
125 |
/** |
|
126 |
* stores the pointer of aOutParamList |
|
127 |
*/ |
|
128 |
CLiwGenericParamList* iOutput; |
|
129 |
||
130 |
/** |
|
131 |
* stores the pointer of aInParamList |
|
132 |
*/ |
|
133 |
const CLiwGenericParamList* iInput; |
|
134 |
||
135 |
/** |
|
136 |
* command ID of ongoing request (Files/FilesInfo) |
|
137 |
*/ |
|
138 |
TMgCmdId iCmdId; |
|
139 |
||
140 |
||
141 |
}; |
|
142 |
||
143 |
#endif MGSERVICEOBSERVER_H |