videoplayerapp/videoplayerengine/src/videoservices.cpp
changeset 52 e3cecb93e76a
parent 24 7d93ee07fb27
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
    13 *
    13 *
    14 * Description:  Implementation of VideoServices
    14 * Description:  Implementation of VideoServices
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#8 %
    18 // Version : %version: da1mmcf#10 %
    19 
    19 
    20 #include "videoplayerengine.h"
    20 #include "videoplayerengine.h"
    21 #include "videoservices.h"
    21 #include "videoservices.h"
    22 #include "videoserviceurifetch.h"
    22 #include "videoserviceurifetch.h"
    23 #include "videoserviceplay.h"
    23 #include "videoserviceplay.h"
    24 #include "videoserviceview.h"
    24 #include "videoserviceview.h"
    25 #include "videoservicebrowse.h"
    25 #include "videoservicebrowse.h"
       
    26 #include "videoserviceuri.h"
    26 #include "mpxvideo_debug.h"
    27 #include "mpxvideo_debug.h"
    27 #include <xqaiwdecl.h>
    28 #include <xqaiwdecl.h>
    28 #include <xqserviceutil.h>
    29 #include <xqserviceutil.h>
    29 
    30 
    30 VideoServices *VideoServices::mInstance = 0;
    31 VideoServices *VideoServices::mInstance = 0;
    31 
    32 
    32 // -----------------------------------------------------------------------------
    33 // -------------------------------------------------------------------------------------------------
    33 // VideoServices::instance()
    34 // VideoServices::instance()
    34 // -----------------------------------------------------------------------------
    35 // -------------------------------------------------------------------------------------------------
    35 //
    36 //
    36 VideoServices* VideoServices::instance(QVideoPlayerEngine* engine)
    37 VideoServices* VideoServices::instance( VideoPlayerEngine* engine )
    37 {
    38 {
    38     MPX_ENTER_EXIT(_L("VideoServices::instance()"));
    39     MPX_ENTER_EXIT(_L("VideoServices::instance()"));
    39     
    40     
    40     if ( ! mInstance )
    41     if ( ! mInstance )
    41     {
    42     {
    48 
    49 
    49     mInstance->mReferenceCount++;
    50     mInstance->mReferenceCount++;
    50     return mInstance;
    51     return mInstance;
    51 }
    52 }
    52 
    53 
    53 // -----------------------------------------------------------------------------
    54 // -------------------------------------------------------------------------------------------------
    54 // VideoServices::decreaseReferenceCount()
    55 // VideoServices::decreaseReferenceCount()
    55 // -----------------------------------------------------------------------------
    56 // -------------------------------------------------------------------------------------------------
    56 //
    57 //
    57 void VideoServices::decreaseReferenceCount()
    58 void VideoServices::decreaseReferenceCount()
    58 {
    59 {
    59     MPX_ENTER_EXIT(_L("VideoServices::decreaseReferenceCount()"));
    60     MPX_ENTER_EXIT(_L("VideoServices::decreaseReferenceCount()"));
    60     
    61     
    61     if ( mInstance )
    62     if ( mInstance )
    62     {
    63     {
    63         if( --mInstance->mReferenceCount == 0 )
    64         if ( --mInstance->mReferenceCount == 0 )
    64         {
    65         {
    65             delete mInstance;
    66             delete mInstance;
    66             mInstance = NULL;
    67             mInstance = NULL;
    67         }
    68         }
    68     }
    69     }
    69 }
    70 }
    70 
    71 
    71 // ----------------------------------------------------------------------------
    72 // -------------------------------------------------------------------------------------------------
    72 // setEngine()
    73 // setEngine()
    73 // ----------------------------------------------------------------------------
    74 // -------------------------------------------------------------------------------------------------
    74 //
    75 //
    75 void VideoServices::setEngine(QVideoPlayerEngine* engine)
    76 void VideoServices::setEngine( VideoPlayerEngine* engine )
    76 {
    77 {
    77     MPX_ENTER_EXIT(_L("VideoServices::setEngine()"));
    78     MPX_ENTER_EXIT(_L("VideoServices::setEngine()"));
    78     
    79     
    79     if ( mServicePlay )
    80     if ( mServicePlay )
    80     {
    81     {
    85     if ( mServiceView )
    86     if ( mServiceView )
    86     {
    87     {
    87     	mEngine = engine;
    88     	mEngine = engine;
    88     	mServiceView->setEngine(engine);    	
    89     	mServiceView->setEngine(engine);    	
    89     }
    90     }
       
    91     
       
    92     if ( mServiceUriView )
       
    93     {
       
    94         mEngine = engine;
       
    95         mServiceUriView->setEngine(engine);  
       
    96     }
    90     		
    97     		
    91 }
    98 }
    92 
    99 
    93 // ----------------------------------------------------------------------------
   100 // -------------------------------------------------------------------------------------------------
    94 // engine()
   101 // engine()
    95 // ----------------------------------------------------------------------------
   102 // -------------------------------------------------------------------------------------------------
    96 //
   103 //
    97 QVideoPlayerEngine* VideoServices::engine()
   104 VideoPlayerEngine* VideoServices::engine()
    98 {
   105 {
    99     MPX_DEBUG(_L("VideoServices::engine"));
   106     MPX_DEBUG(_L("VideoServices::engine"));
   100 	
   107 	
   101     return mEngine;
   108     return mEngine;
   102 }
   109 }
   103 
   110 
   104 // ----------------------------------------------------------------------------
   111 // -------------------------------------------------------------------------------------------------
   105 // VideoServices()
   112 // VideoServices()
   106 // ----------------------------------------------------------------------------
   113 // -------------------------------------------------------------------------------------------------
   107 //
   114 //
   108 VideoServices::VideoServices( QVideoPlayerEngine* engine ) 
   115 VideoServices::VideoServices( VideoPlayerEngine* engine ) 
   109     : mReferenceCount( 0 )
   116     : mReferenceCount( 0 )
   110     , mEngine( engine )
   117     , mEngine( engine )
   111     , mCurrentService( VideoServices::ENoService )
   118     , mCurrentService( VideoServices::ENoService )
   112     , mFetchSelected( false )
   119     , mFetchSelected( false )
   113 {
   120 {
   114     MPX_ENTER_EXIT(_L("VideoServices::VideoServices()"));
   121     MPX_ENTER_EXIT(_L("VideoServices::VideoServices()"));
   115    
   122    
   116     mServicePlay     = new VideoServicePlay(this, engine, QLatin1String("videoplayer.com.nokia.symbian.IVideoView"));  //New service, new interface
   123     // New service, new interface
   117     mServiceView     = new VideoServiceView(this, engine, QLatin1String("videoplayer.com.nokia.symbian.IFileView"));   //New service, new interface        
   124     mServicePlay = new VideoServicePlay( this, engine, 
   118     mServiceUriFetch = new VideoServiceUriFetch(this, QLatin1String("videoplayer.com.nokia.symbian.IVideoFetch")); //New service, new interface
   125                                  QLatin1String("videoplayer.com.nokia.symbian.IVideoView") );  
   119     mServiceBrowse   = new VideoServiceBrowse(  this, QLatin1String("videoplayer.com.nokia.symbian.IVideoBrowse")); //New service, new interface
   126 
   120 
   127     // New service, new interface
   121     mServicePlayDeprecatedNewService = new VideoServicePlay(this, engine, QLatin1String("videoplayer.IVideoView")); //New service, old interface
   128     mServiceView = new VideoServiceView( this, engine, 
   122     mServicePlayDeprecatedOldService = new VideoServicePlay(this, engine, QLatin1String("com.nokia.Videos.IVideoView")); //Old service, old interface   
   129                                  QLatin1String("videoplayer.com.nokia.symbian.IFileView") ); 
   123     
   130           
   124     mServiceViewDeprecatedNewService = new VideoServiceView(this, engine, QLatin1String("videoplayer.IFileView")); //New service, old interface
   131     // New service, new interface
   125     mServiceViewDeprecatedOldService = new VideoServiceView(this, engine, QLatin1String("com.nokia.Videos.IFileView")); //Old service, old interface     
   132     mServiceUriFetch = new VideoServiceUriFetch( this, 
   126     
   133                                  QLatin1String("videoplayer.com.nokia.symbian.IVideoFetch") ); 
   127     mServiceUriFetchDeprecatedNewService = new VideoServiceUriFetch(this, QLatin1String("videoplayer.IVideoFetch")); //New service, old interface
   134 
   128     mServiceUriFetchDeprecatedOldService = new VideoServiceUriFetch(this, QLatin1String("com.nokia.Videos.IVideoFetch")); //Old service, old interface    
   135     // New service, new interface
   129 
   136     mServiceBrowse = new VideoServiceBrowse( this, 
   130     mServiceBrowseDeprecatedNewService   = new VideoServiceBrowse(this, QLatin1String("videoplayer.IVideoBrowse")); //New service, old interface
   137                                  QLatin1String("videoplayer.com.nokia.symbian.IVideoBrowse") ); 
   131     mServiceBrowseDeprecatedOldService   = new VideoServiceBrowse(this, QLatin1String("com.nokia.Videos.IVideoBrowse")); //Old service, old interface
   138 
   132 }
   139     // New service, old interface
   133 
   140     mServicePlayDeprecatedNewService = new VideoServicePlay( this, engine, 
   134 // ----------------------------------------------------------------------------
   141                                                       QLatin1String("videoplayer.IVideoView") ); 
       
   142 
       
   143     // Old service, old interface
       
   144     mServicePlayDeprecatedOldService = new VideoServicePlay( this, engine, 
       
   145                                                       QLatin1String("com.nokia.Videos.IVideoView") );    
       
   146     
       
   147     // New service, old interface
       
   148     mServiceViewDeprecatedNewService = new VideoServiceView( this, engine, 
       
   149                                                       QLatin1String("videoplayer.IFileView") ); 
       
   150 
       
   151     // Old service, old interface 
       
   152     mServiceViewDeprecatedOldService = new VideoServiceView( this, engine, 
       
   153                                                       QLatin1String("com.nokia.Videos.IFileView") );     
       
   154     
       
   155     // New service, old interface
       
   156     mServiceUriFetchDeprecatedNewService = new VideoServiceUriFetch( this, 
       
   157                                                       QLatin1String("videoplayer.IVideoFetch") ); 
       
   158 
       
   159     // Old service, old interface
       
   160     mServiceUriFetchDeprecatedOldService = new VideoServiceUriFetch( this, 
       
   161                                                       QLatin1String("com.nokia.Videos.IVideoFetch") );     
       
   162 
       
   163     // New service, old interface
       
   164     mServiceBrowseDeprecatedNewService = new VideoServiceBrowse( this, 
       
   165                                                       QLatin1String("videoplayer.IVideoBrowse")) ; 
       
   166 
       
   167     // Old service, old interface
       
   168     mServiceBrowseDeprecatedOldService = new VideoServiceBrowse( this, 
       
   169                                                       QLatin1String("com.nokia.Videos.IVideoBrowse") ); 
       
   170 	
       
   171     // new service, new interface
       
   172     mServiceUriView = new VideoServiceUri(  this, engine, QLatin1String("videoplayer.com.nokia.symbian.IUriView"));	
       
   173     
       
   174 	
       
   175 }
       
   176 
       
   177 // -------------------------------------------------------------------------------------------------
   135 // ~VideoServices()
   178 // ~VideoServices()
   136 // ----------------------------------------------------------------------------
   179 // -------------------------------------------------------------------------------------------------
   137 //
   180 //
   138 VideoServices::~VideoServices()
   181 VideoServices::~VideoServices()
   139 {
   182 {
   140     MPX_ENTER_EXIT(_L("VideoServices::~VideoServices()"));
   183     MPX_ENTER_EXIT(_L("VideoServices::~VideoServices()"));
   141     
   184     
   149     delete mServiceViewDeprecatedOldService;
   192     delete mServiceViewDeprecatedOldService;
   150     delete mServiceBrowseDeprecatedNewService;
   193     delete mServiceBrowseDeprecatedNewService;
   151     delete mServiceUriFetchDeprecatedNewService;
   194     delete mServiceUriFetchDeprecatedNewService;
   152     delete mServiceBrowseDeprecatedOldService;
   195     delete mServiceBrowseDeprecatedOldService;
   153     delete mServiceUriFetchDeprecatedOldService;
   196     delete mServiceUriFetchDeprecatedOldService;
   154 }
   197     delete mServiceUriView;
   155 
   198 }
   156 // ----------------------------------------------------------------------------
   199 
       
   200 // -------------------------------------------------------------------------------------------------
   157 // currentService()
   201 // currentService()
   158 // ----------------------------------------------------------------------------
   202 // -------------------------------------------------------------------------------------------------
   159 //
   203 //
   160 VideoServices::TVideoService VideoServices::currentService()
   204 VideoServices::TVideoService VideoServices::currentService()
   161 {
   205 {
   162     MPX_DEBUG(_L("VideoServices::currentService() ret %d"), mCurrentService );
   206     MPX_DEBUG(_L("VideoServices::currentService() ret %d"), mCurrentService );
   163 	
   207 	
   164     return mCurrentService;
   208     return mCurrentService;
   165 }
   209 }
   166 
   210 
   167 // ----------------------------------------------------------------------------
   211 // -------------------------------------------------------------------------------------------------
   168 // getBrowseCategory()
   212 // getBrowseCategory()
   169 // ----------------------------------------------------------------------------
   213 // -------------------------------------------------------------------------------------------------
   170 //
   214 //
   171 int VideoServices::getBrowseCategory() const
   215 int VideoServices::getBrowseCategory() const
   172 {
   216 {
   173     MPX_DEBUG(_L("VideoServices::getBrowseCategory()"));
   217     MPX_DEBUG(_L("VideoServices::getBrowseCategory()"));
   174 	
   218 	
   175     int category = 0;
   219     int category = 0;
   176 
   220 
   177     if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
   221     if ( mServiceBrowse && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   178     {
   222     {
   179         category = mServiceBrowse->getBrowseCategory();
   223         category = mServiceBrowse->getBrowseCategory();
   180     }
   224     }
   181     else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
   225     else if ( mServiceBrowseDeprecatedNewService && 
   182     {
   226               mServiceBrowseDeprecatedOldService && 
   183     	if (mServiceBrowseDeprecatedNewService->isActive())
   227               ! ( XQServiceUtil::interfaceName().contains("symbian") ) )
   184     	{
   228     {
   185     		category = mServiceBrowseDeprecatedNewService->getBrowseCategory();
   229     	if ( mServiceBrowseDeprecatedNewService->isActive() )
       
   230     	{
       
   231             category = mServiceBrowseDeprecatedNewService->getBrowseCategory();
   186     	}
   232     	}
   187     	else
   233     	else
   188     	{
   234     	{
   189     		category = mServiceBrowseDeprecatedOldService->getBrowseCategory();
   235             category = mServiceBrowseDeprecatedOldService->getBrowseCategory();
   190     	}
   236     	}
   191     }
   237     }
   192 
   238 
   193     return category;
   239     return category;
   194 }
   240 }
   195 
   241 
   196 // ----------------------------------------------------------------------------
   242 // -------------------------------------------------------------------------------------------------
   197 // setCurrentService()
   243 // setCurrentService()
   198 // ----------------------------------------------------------------------------
   244 // -------------------------------------------------------------------------------------------------
   199 //
   245 //
   200 void VideoServices::setCurrentService(VideoServices::TVideoService service)
   246 void VideoServices::setCurrentService(VideoServices::TVideoService service)
   201 {
   247 {
   202     MPX_DEBUG(_L("VideoServices::setCurrentService(%d)"), service );
   248     MPX_DEBUG(_L("VideoServices::setCurrentService(%d)"), service );
   203 	
   249 	
   204     mCurrentService = service;	
   250     mCurrentService = service;	
   205 }
   251 }
   206 
   252 
   207 // ----------------------------------------------------------------------------
   253 // -------------------------------------------------------------------------------------------------
   208 // contextTitle()
   254 // contextTitle()
   209 // ----------------------------------------------------------------------------
   255 // -------------------------------------------------------------------------------------------------
   210 //
   256 //
   211 QString VideoServices::contextTitle() const
   257 QString VideoServices::contextTitle() const
   212 {
   258 {
   213     MPX_DEBUG(_L("VideoServices::contextTitle()") );
   259     MPX_DEBUG(_L("VideoServices::contextTitle()") );
   214 	
   260 	
   215     QString title;
   261     QString title;
   216 
   262 
   217     if (mCurrentService == VideoServices::EUriFetcher)
   263     if ( mCurrentService == VideoServices::EUriFetcher )
   218     {
   264     {
   219     	if(mServiceUriFetch && (XQServiceUtil::interfaceName().contains("symbian")))
   265     	if ( mServiceUriFetch && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   220     	{
   266     	{
   221     		title = mServiceUriFetch->contextTitle();
   267             title = mServiceUriFetch->contextTitle();
   222     	}
   268     	}
   223     	else if (mServiceUriFetchDeprecatedNewService && mServiceUriFetchDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
   269     	else if ( mServiceUriFetchDeprecatedNewService && 
   224     	{
   270                   mServiceUriFetchDeprecatedOldService && 
   225     		if(mServiceUriFetchDeprecatedNewService->isActive())
   271                   ! ( XQServiceUtil::interfaceName().contains("symbian") ) )
   226     		{
   272     	{
   227     			title = mServiceUriFetchDeprecatedNewService->contextTitle();
   273 
   228     		}
   274             if ( mServiceUriFetchDeprecatedNewService->isActive() )
   229     		else
   275     	    {
   230     		{
   276     	        title = mServiceUriFetchDeprecatedNewService->contextTitle();
   231     			title = mServiceUriFetchDeprecatedOldService->contextTitle();
   277             }
   232     		}
   278     	    else
   233     	}
   279     	    {
   234     }
   280     	        title = mServiceUriFetchDeprecatedOldService->contextTitle();
   235     else if (mCurrentService == VideoServices::EBrowse)
   281     	    }
   236     {
   282     	}
   237     	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
   283     }
   238 		{
   284     else if ( mCurrentService == VideoServices::EBrowse )
   239 			title = mServiceBrowse->contextTitle();
   285     {
   240 		}
   286     	if ( mServiceBrowse && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   241     	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
   287         {
   242 		{
   288             title = mServiceBrowse->contextTitle();
   243         	if (mServiceBrowseDeprecatedNewService->isActive())
   289         }
   244         	{
   290     	else if ( mServiceBrowseDeprecatedNewService && 
   245     			title = mServiceBrowseDeprecatedNewService->contextTitle();
   291                   mServiceBrowseDeprecatedOldService && 
   246         	}
   292                   ! ( XQServiceUtil::interfaceName().contains("symbian") ) )
   247         	else
   293         {
   248         	{
   294             if ( mServiceBrowseDeprecatedNewService->isActive() )
   249     			title = mServiceBrowseDeprecatedOldService->contextTitle();
   295             {
   250         	}
   296                 title = mServiceBrowseDeprecatedNewService->contextTitle();
   251 		}
   297             }
       
   298             else
       
   299             {
       
   300                 title = mServiceBrowseDeprecatedOldService->contextTitle();
       
   301             }
       
   302         }
   252     }
   303     }
   253     
   304     
   254     return title;
   305     return title;
   255 }
   306 }
   256 
   307 
   257 // ----------------------------------------------------------------------------
   308 // -------------------------------------------------------------------------------------------------
   258 // sortRole()
   309 // sortRole()
   259 // ----------------------------------------------------------------------------
   310 // -------------------------------------------------------------------------------------------------
   260 //
   311 //
   261 int VideoServices::sortRole() const
   312 int VideoServices::sortRole() const
   262 {
   313 {
   263     MPX_ENTER_EXIT(_L("VideoServices::sortType()"));
   314     MPX_ENTER_EXIT(_L("VideoServices::sortType()"));
   264     
   315     
   265     int sortRole = 0;
   316     int sortRole = 0;
   266 
   317 
   267     if (mCurrentService == EBrowse)
   318     if ( mCurrentService == EBrowse )
   268     {
   319     {
   269     	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
   320     	if ( mServiceBrowse && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   270 		{
   321         {
   271 			sortRole = mServiceBrowse->sortRole();
   322             sortRole = mServiceBrowse->sortRole();
   272 		}
   323         }
   273     	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
   324     	else if ( mServiceBrowseDeprecatedNewService && 
   274 		{
   325                   mServiceBrowseDeprecatedOldService && 
   275         	if (mServiceBrowseDeprecatedNewService->isActive())
   326                   ! ( XQServiceUtil::interfaceName().contains("symbian") ) )
   276         	{
   327         {
   277         		sortRole = mServiceBrowseDeprecatedNewService->sortRole();
   328             if ( mServiceBrowseDeprecatedNewService->isActive() )
   278         	}
   329             {
   279         	else
   330                 sortRole = mServiceBrowseDeprecatedNewService->sortRole();
   280         	{
   331             }
   281         		sortRole = mServiceBrowseDeprecatedOldService->sortRole();
   332             else
   282         	}
   333             {
   283 		}
   334                 sortRole = mServiceBrowseDeprecatedOldService->sortRole();
       
   335             }
       
   336         }
   284     }
   337     }
   285     
   338     
   286     return sortRole;
   339     return sortRole;
   287 }
   340 }
   288 
   341 
   289 // ----------------------------------------------------------------------------
   342 // -------------------------------------------------------------------------------------------------
   290 // itemSelected()
   343 // itemSelected()
   291 // ----------------------------------------------------------------------------
   344 // -------------------------------------------------------------------------------------------------
   292 //
   345 //
   293 void VideoServices::itemSelected(const QString& item)
   346 void VideoServices::itemSelected(const QString& item)
   294 {
   347 {
   295     MPX_ENTER_EXIT(_L("VideoServices::itemSelected()"),
   348     MPX_ENTER_EXIT(_L("VideoServices::itemSelected()"),
   296                    _L("item = %s"), item.data() );
   349                    _L("item = %s"), item.data() );
   297     
   350     
   298     QStringList list;
   351     QStringList list;
   299     list.append( item );
   352     list.append( item );
   300 
   353 
   301     if(mServiceUriFetch && (XQServiceUtil::interfaceName().contains("symbian")))
   354     if( mServiceUriFetch && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   302     {
   355     {
   303     	mServiceUriFetch->complete( list );
   356     	mServiceUriFetch->complete( list );
   304     }
   357     }
   305     else if (mServiceUriFetchDeprecatedNewService && mServiceUriFetchDeprecatedOldService)
   358     else if ( mServiceUriFetchDeprecatedNewService && mServiceUriFetchDeprecatedOldService )
   306     {
   359     {
   307     	if (mServiceUriFetchDeprecatedNewService->isActive())
   360     	if ( mServiceUriFetchDeprecatedNewService->isActive() )
   308     	{
   361     	{
   309         	mServiceUriFetchDeprecatedNewService->complete( list );
   362             mServiceUriFetchDeprecatedNewService->complete( list );
   310     	}
   363     	}
   311     	else
   364     	else
   312     	{
   365     	{
   313         	mServiceUriFetchDeprecatedOldService->complete( list );
   366             mServiceUriFetchDeprecatedOldService->complete( list );
   314     	}
   367     	}
   315     }
   368     }
       
   369 
   316     mFetchSelected = true;
   370     mFetchSelected = true;
   317 }
   371 }
   318 
   372 
   319 // ----------------------------------------------------------------------------
   373 // -------------------------------------------------------------------------------------------------
   320 // browsingEnded()
   374 // browsingEnded()
   321 // ----------------------------------------------------------------------------
   375 // -------------------------------------------------------------------------------------------------
   322 //
   376 //
   323 void VideoServices::browsingEnded()
   377 void VideoServices::browsingEnded()
   324 {
   378 {
   325     MPX_ENTER_EXIT(_L("VideoServices::browsingEnded()"));
   379     MPX_ENTER_EXIT(_L("VideoServices::browsingEnded()"));
   326 
   380 
   327 	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
   381     if ( mServiceBrowse && ( XQServiceUtil::interfaceName().contains("symbian") ) )
   328 	{
   382     {
   329 		mServiceBrowse->complete();
   383         mServiceBrowse->complete();
   330 	}
   384     }
   331 	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
   385     else if ( mServiceBrowseDeprecatedNewService && 
   332 	{
   386               mServiceBrowseDeprecatedOldService && 
   333     	if (mServiceBrowseDeprecatedNewService->isActive())
   387               ! ( XQServiceUtil::interfaceName().contains("symbian") ) )
   334     	{
   388     {
   335     		mServiceBrowseDeprecatedNewService->complete();
   389         if ( mServiceBrowseDeprecatedNewService->isActive() )
       
   390     	{
       
   391             mServiceBrowseDeprecatedNewService->complete();
   336     	}
   392     	}
   337     	else
   393     	else
   338     	{
   394     	{
   339     		mServiceBrowseDeprecatedOldService->complete();
   395             mServiceBrowseDeprecatedOldService->complete();
   340     	}
   396     	}
   341 	}
   397     }
   342 }
   398 }
   343 
   399 
   344 // End of file
   400 // End of file