equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: VideoCollectionViewPlugin class implementation |
14 * Description: VideoCollectionViewPlugin class implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: 23 % |
18 // Version : %version: 24 % |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include <xqplugin.h> |
21 #include <xqplugin.h> |
22 #include <xqserviceutil.h> |
22 #include <xqserviceutil.h> |
23 #include <hbaction.h> |
23 #include <hbaction.h> |
39 // |
39 // |
40 VideoCollectionViewPlugin::VideoCollectionViewPlugin() |
40 VideoCollectionViewPlugin::VideoCollectionViewPlugin() |
41 : mUiLoader( 0 ) |
41 : mUiLoader( 0 ) |
42 , mView( 0 ) |
42 , mView( 0 ) |
43 , mActivated( false ) |
43 , mActivated( false ) |
44 , mIsService( false ) |
44 , mVideoServices( 0 ) |
45 { |
45 { |
46 FUNC_LOG; |
46 FUNC_LOG; |
47 } |
47 } |
48 |
48 |
49 // --------------------------------------------------------------------------- |
49 // --------------------------------------------------------------------------- |
70 { |
70 { |
71 mUiLoader = new VideoCollectionUiLoader(); |
71 mUiLoader = new VideoCollectionUiLoader(); |
72 } |
72 } |
73 |
73 |
74 mUiLoader->reset(); |
74 mUiLoader->reset(); |
75 |
|
76 if (XQServiceUtil::isService()) |
|
77 { |
|
78 INFO("VideoCollectionViewPlugin::createView() service flag set to true."); |
|
79 mIsService = true; |
|
80 } |
|
81 |
75 |
82 mUiLoader->setIsService(mIsService); |
76 mUiLoader->setIsService(XQServiceUtil::isService()); |
83 |
77 |
84 bool ok(false); |
78 bool ok(false); |
85 |
79 |
86 mUiLoader->load(DOCML_VIDEOCOLLECTIONVIEW_FILE, &ok); |
80 mUiLoader->load(DOCML_VIDEOCOLLECTIONVIEW_FILE, &ok); |
87 |
81 |
143 |
137 |
144 delete mView; |
138 delete mView; |
145 mView = 0; |
139 mView = 0; |
146 delete mUiLoader; |
140 delete mUiLoader; |
147 mUiLoader = 0; |
141 mUiLoader = 0; |
|
142 |
|
143 if(mVideoServices) |
|
144 { |
|
145 mVideoServices->decreaseReferenceCount(); |
|
146 mVideoServices = 0; |
|
147 } |
148 } |
148 } |
149 |
149 |
150 // --------------------------------------------------------------------------- |
150 // --------------------------------------------------------------------------- |
151 // Activate view |
151 // Activate view |
152 // --------------------------------------------------------------------------- |
152 // --------------------------------------------------------------------------- |
161 { |
161 { |
162 TMPXItemId itemId = TMPXItemId::InvalidId(); |
162 TMPXItemId itemId = TMPXItemId::InvalidId(); |
163 bool isService = XQServiceUtil::isService(); |
163 bool isService = XQServiceUtil::isService(); |
164 if (isService) |
164 if (isService) |
165 { |
165 { |
166 VideoServices *videoServices = VideoServices::instance(); |
166 if(!mVideoServices) |
167 if (videoServices) |
|
168 { |
167 { |
169 VideoServices::TVideoService serviceType = |
168 mVideoServices = VideoServices::instance(); |
170 videoServices->currentService(); |
169 } |
171 if (serviceType == VideoServices::EBrowse) |
170 |
172 { |
171 VideoServices::TVideoService serviceType = |
173 // activate browsing service |
172 mVideoServices->currentService(); |
174 itemId.iId1 = videoServices->getBrowseCategory(); |
173 if (serviceType == VideoServices::EBrowse) |
175 itemId.iId2 = KVcxMvcMediaTypeCategory; |
174 { |
176 } |
175 // activate browsing service |
|
176 itemId.iId1 = mVideoServices->getBrowseCategory(); |
|
177 itemId.iId2 = KVcxMvcMediaTypeCategory; |
177 } |
178 } |
178 } |
179 } |
179 int err = mView->activateView(itemId); |
180 int err = mView->activateView(itemId); |
180 if (err != 0) |
181 if (err != 0) |
181 { |
182 { |