videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp
branchRCL_3
changeset 6 7d91903f795f
parent 0 96612d01cf9f
child 8 ce5ada96ab30
equal deleted inserted replaced
2:dec420019252 6:7d91903f795f
    58 // CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    58 // CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    59 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
    60 //
    60 //
    61 CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    61 CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
    62   : iCollectionOpenStatus( EVcxHgCollectionNotOpen ),
    62   : iCollectionOpenStatus( EVcxHgCollectionNotOpen ),
    63     iPendingCommand( EVcxHgMyVideosCollectionCommandNone ),
    63     iPendingCommand( EVcxHgMyVideosCollectionCommandNone )
    64     iCollectionLevel( KErrNotFound )
       
    65     {
    64     {
    66     }
    65     }
    67 
    66 
    68 // -----------------------------------------------------------------------------
    67 // -----------------------------------------------------------------------------
    69 // CVcxHgMyVideosCollectionClient::NewL()
    68 // CVcxHgMyVideosCollectionClient::NewL()
   156 // CVcxHgMyVideosCollectionClient::CollectionLevelL()
   155 // CVcxHgMyVideosCollectionClient::CollectionLevelL()
   157 // ---------------------------------------------------------------------------
   156 // ---------------------------------------------------------------------------
   158 //
   157 //
   159 TInt CVcxHgMyVideosCollectionClient::CollectionLevelL()
   158 TInt CVcxHgMyVideosCollectionClient::CollectionLevelL()
   160     {
   159     {
   161     if ( iCollectionLevel == KErrNotFound )
   160     CMPXCollectionPath* path = iCollectionUtility->Collection().PathL();
   162         {
   161     CleanupStack::PushL( path );
   163         CMPXCollectionPath* path = iCollectionUtility->Collection().PathL();
   162     TInt collectionLevel = path->Levels();
   164         CleanupStack::PushL( path );
   163     CleanupStack::PopAndDestroy( path );
   165         iCollectionLevel = path->Levels();
   164 
   166         CleanupStack::PopAndDestroy( path );
   165     return collectionLevel;
   167         }
       
   168 		
       
   169     return iCollectionLevel;
       
   170     }
   166     }
   171 
   167 
   172 // -----------------------------------------------------------------------------
   168 // -----------------------------------------------------------------------------
   173 // CVcxHgMyVideosCollectionClient::GetCategoryListL()
   169 // CVcxHgMyVideosCollectionClient::GetCategoryListL()
   174 // -----------------------------------------------------------------------------
   170 // -----------------------------------------------------------------------------
   635 
   631 
   636                 switch ( event )
   632                 switch ( event )
   637                     {
   633                     {
   638                     case TMPXCollectionMessage::EPathChanged:
   634                     case TMPXCollectionMessage::EPathChanged:
   639                         {
   635                         {
   640                         iCollectionLevel = KErrNotFound;
       
   641                         
       
   642                         if ( data == EMcContainerOpened  )
   636                         if ( data == EMcContainerOpened  )
   643                             {
   637                             {
   644                             if ( iCollectionOpenStatus == EVcxHgCollectionOpening )
   638                             if ( iCollectionOpenStatus == EVcxHgCollectionOpening )
   645                                 {
   639                                 {
   646                                 iCollectionOpenStatus = EVcxHgCollectionOpened;
   640                                 iCollectionOpenStatus = EVcxHgCollectionOpened;