|
1 /* |
|
2 * Copyright (c) 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 "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: Updates applications and icons in Operator Tile. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_MCPHARVESTERPUBLISHEROBSERVER_H |
|
20 #define C_MCPHARVESTERPUBLISHEROBSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <liwcommon.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CMusicContentPublisher; |
|
27 class CLiwServiceHandler; |
|
28 // CONSTANTS |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 */ |
|
33 |
|
34 class CMCPHarvesterPublisherObserver : public CBase, public MLiwNotifyCallback |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 static CMCPHarvesterPublisherObserver* NewL( CMusicContentPublisher* aHarvester ); |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CMCPHarvesterPublisherObserver* NewLC( CMusicContentPublisher* aHarvester ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CMCPHarvesterPublisherObserver(); |
|
51 |
|
52 |
|
53 |
|
54 public: //from MLiwNotifyCallback |
|
55 |
|
56 /** |
|
57 * Handles notifications caused by an asynchronous Execute*CmdL call |
|
58 * or an event. |
|
59 * |
|
60 * @param aCmdId The service command associated to the event. |
|
61 * @param aEventId Occured event, see LiwCommon.hrh. |
|
62 * @param aEventParamList Event parameters, if any, as defined per |
|
63 * each event. |
|
64 * @param aInParamList Input parameters, if any, given in the |
|
65 * related HandleCommmandL. |
|
66 * @return Error code for the callback. |
|
67 */ |
|
68 virtual TInt HandleNotifyL( |
|
69 TInt aCmdId, |
|
70 TInt aEventId, |
|
71 CLiwGenericParamList& aEventParamList, |
|
72 const CLiwGenericParamList& aInParamList); |
|
73 |
|
74 public: |
|
75 |
|
76 /** |
|
77 * Registers to CPS for add, delete , update and execute notifications |
|
78 * @aFilter - filter for input parameter list |
|
79 * @return void. |
|
80 */ |
|
81 void RegisterL( CLiwDefaultMap* aFilter ); |
|
82 |
|
83 |
|
84 private: |
|
85 /** |
|
86 * Perform the second phase construction |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 /** |
|
91 * Default constructor. |
|
92 */ |
|
93 CMCPHarvesterPublisherObserver( CMusicContentPublisher* aHarvester ); |
|
94 |
|
95 // Prhohibited |
|
96 CMCPHarvesterPublisherObserver(); |
|
97 |
|
98 |
|
99 void InitLiwL(); |
|
100 |
|
101 void ReleaseLiw(); |
|
102 |
|
103 private: // data |
|
104 |
|
105 // Reference of |
|
106 // Owned |
|
107 MLiwInterface* iInterface; |
|
108 |
|
109 // Reference of |
|
110 // Owned |
|
111 CLiwServiceHandler* iLiwHandler; |
|
112 |
|
113 // Reference of the sapi data |
|
114 // Not owned |
|
115 CMusicContentPublisher* iHarvester; |
|
116 |
|
117 // Call back error code |
|
118 TInt iError; |
|
119 }; |
|
120 |
|
121 #endif // C_MCPHARVESTERPUBLISHEROBSERVER_H |