1 /* |
|
2 * Copyright (c) 2008 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: CVcxNsChPublisher class declaration* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _VCXNSCHIPTVSERVERCLIENT_H |
|
21 #define _VCXNSCHIPTVSERVERCLIENT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 #include "MIptvServiceManagementClientObserver.h" |
|
28 #include <MediatorEventConsumer.h> |
|
29 |
|
30 // FWD DECLS |
|
31 class CIptvServiceManagementClient; |
|
32 class CVcxNsChPublishableData; |
|
33 class CVcxNsChPublisher; |
|
34 class CVcxNsChMCategoryListener; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CVcxNsChIptvServerClient |
|
40 * |
|
41 * Does content harvester plugin's videocenter dserver related actions. |
|
42 * |
|
43 * @lib vcxnscontentharverterplugin.dll |
|
44 */ |
|
45 class CVcxNsChIptvServerClient : public CBase, |
|
46 public MIptvServiceManagementClientObserver, |
|
47 public MMediatorEventObserver |
|
48 { |
|
49 |
|
50 public: // construction / destruction |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 * |
|
55 */ |
|
56 ~CVcxNsChIptvServerClient(); |
|
57 |
|
58 /** |
|
59 * constructor |
|
60 * |
|
61 * @param aPublisher pointer to CH plugins CP publisher |
|
62 * @param aPublishableData pointer to CH plugin data |
|
63 * |
|
64 * @return CVcxNsChIptvServerClient* |
|
65 */ |
|
66 static CVcxNsChIptvServerClient* NewL( CVcxNsChPublisher* aPublisher, |
|
67 CVcxNsChPublishableData* aPublishableData ); |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * constructor |
|
73 * |
|
74 * @param aPublisher pointer to CH plugins CP publisher |
|
75 * @param aPublishableData pointer to CH plugin data |
|
76 */ |
|
77 CVcxNsChIptvServerClient( CVcxNsChPublisher* aPublisher, |
|
78 CVcxNsChPublishableData* aPublishableData ); |
|
79 |
|
80 /** |
|
81 * default constructor, not implemented |
|
82 * |
|
83 */ |
|
84 CVcxNsChIptvServerClient(); |
|
85 |
|
86 /** |
|
87 * Symbian 2nd phase constructor |
|
88 * |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 |
|
93 public: // FROM SM CLIENT |
|
94 |
|
95 /** |
|
96 * empty implementation |
|
97 */ |
|
98 void AddServiceResp( TRespStatus ){}; |
|
99 |
|
100 /** |
|
101 * empty implementation |
|
102 */ |
|
103 void UpdateServiceResp( TRespStatus ){}; |
|
104 |
|
105 /** |
|
106 * empty implementation |
|
107 */ |
|
108 void DeleteServiceResp( TRespStatus ){}; |
|
109 |
|
110 /** |
|
111 * empty implementation |
|
112 */ |
|
113 void GetServicesResp( TRespStatus, CDesC8ArraySeg* ){}; |
|
114 |
|
115 /** |
|
116 * empty implementation |
|
117 */ |
|
118 void GetUsedIapResp( TUint32, const TDesC&, CIptvNetworkSelection:: |
|
119 TConnectionPermission, TBool, CIptvNetworkSelection::TRespStatus ){}; |
|
120 |
|
121 /** |
|
122 * empty implementation |
|
123 */ |
|
124 void ServerShutdownResp( TRespStatus ){}; |
|
125 |
|
126 /** |
|
127 * Method is used to check if the preloaded service is |
|
128 * deleted (unsubscribed) or added (subscribed). |
|
129 * If deleted, item's data is deleted from the CP |
|
130 * If added back item's data is returned to CP |
|
131 * |
|
132 * @param aEvent event to check |
|
133 * |
|
134 * |
|
135 */ |
|
136 void HandleSmEvent( CIptvSmEvent& aEvent ); |
|
137 |
|
138 public: // From MMediatorEventObserver |
|
139 |
|
140 /** |
|
141 * Catches the mediator events. In this context we handle |
|
142 * |
|
143 */ |
|
144 void MediatorEventL( TUid aDomain, |
|
145 TUid aCategory, |
|
146 TInt aEventId, |
|
147 const TDesC8& aData ); |
|
148 |
|
149 public: // new methods |
|
150 |
|
151 /** |
|
152 * Method creates CIptvServiceManagementClient object |
|
153 * to startup IPTV server. |
|
154 */ |
|
155 void StartIPTVServerInterfaceL(); |
|
156 |
|
157 /** |
|
158 * Deletes CIptvServiceManagementClient object. |
|
159 * IPTV server is stopped if there are no other |
|
160 * instances using it. |
|
161 */ |
|
162 void StopIPTVServerInterface(); |
|
163 |
|
164 /** |
|
165 * Method is used to get an id from the service, |
|
166 * based on the uri provided. |
|
167 * This method should only be called once during |
|
168 * plugin startup. |
|
169 * |
|
170 * @param aServiceUri uri to be used to check the service |
|
171 * |
|
172 * @return service id or KErrNotFound, if service is not found |
|
173 * |
|
174 */ |
|
175 TInt GetServiceGroupIdL( const TDesC& aServiceUri ); |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 private: // Data |
|
181 |
|
182 CIptvServiceManagementClient* iSmClient; |
|
183 |
|
184 /** |
|
185 * Publishable data container. Not owned. |
|
186 */ |
|
187 CVcxNsChPublishableData* iPublishableData; |
|
188 |
|
189 /** |
|
190 * Publisher object used to publish data from CVcxNsChPublishableData |
|
191 * to service api. Not owned. |
|
192 */ |
|
193 CVcxNsChPublisher* iPublisher; |
|
194 |
|
195 /** |
|
196 * Mediator helper object for registering and subscribing |
|
197 * matrix action handler mediator events. Owned. |
|
198 */ |
|
199 CVcxNsChMCategoryListener* iAhCategoryListener; |
|
200 |
|
201 }; |
|
202 |
|
203 #endif // _VCXNSCHIPTVSERVERCLIENT_H |
|