videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp
changeset 39 f6d44a0cd476
parent 38 ff53afa8ad05
child 40 13331705e488
equal deleted inserted replaced
38:ff53afa8ad05 39:f6d44a0cd476
   157     {
   157     {
   158     iProperty.Cancel();
   158     iProperty.Cancel();
   159     }
   159     }
   160 
   160 
   161 // ---------------------------------------------------------------------------
   161 // ---------------------------------------------------------------------------
       
   162 // CVcxMyVideosMdsDb::CVcxMyVideosMdsDb
   162 // ---------------------------------------------------------------------------
   163 // ---------------------------------------------------------------------------
   163 //
   164 //
   164 CVcxMyVideosMdsDb::CVcxMyVideosMdsDb( MVcxMyVideosMdsDbObserver* aObserver,
   165 CVcxMyVideosMdsDb::CVcxMyVideosMdsDb( MVcxMyVideosMdsDbObserver* aObserver,
   165         MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver, RFs& aFs )
   166         RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver )
   166 : iFs( aFs ), iMdsDbObserver(aObserver), iAlbumsObserver(aAlbumsObserver) 
   167 : iFs( aFs ), iMdsDbObserver(aObserver), iAlbumsObserver(aAlbumsObserver) 
   167     {
   168     {
   168     }
   169     }
   169 
   170 
   170 // ---------------------------------------------------------------------------
   171 // ---------------------------------------------------------------------------
       
   172 // CVcxMyVideosMdsDb::ConstructL
   171 // ---------------------------------------------------------------------------
   173 // ---------------------------------------------------------------------------
   172 //
   174 //
   173 void CVcxMyVideosMdsDb::ConstructL()
   175 void CVcxMyVideosMdsDb::ConstructL()
   174     {
   176     {
   175     MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL start" );
   177     MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL start" );
   272 
   274 
   273 // ---------------------------------------------------------------------------
   275 // ---------------------------------------------------------------------------
   274 // ---------------------------------------------------------------------------
   276 // ---------------------------------------------------------------------------
   275 //
   277 //
   276 CVcxMyVideosMdsDb* CVcxMyVideosMdsDb::NewL( MVcxMyVideosMdsDbObserver* aObserver,
   278 CVcxMyVideosMdsDb* CVcxMyVideosMdsDb::NewL( MVcxMyVideosMdsDbObserver* aObserver,
   277         MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver, RFs& aFs )
   279         RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver )
   278     {
   280     {
   279     CVcxMyVideosMdsDb* self =
   281     CVcxMyVideosMdsDb* self =
   280             CVcxMyVideosMdsDb::NewLC( aObserver, aAlbumsObserver, aFs );
   282             CVcxMyVideosMdsDb::NewLC( aObserver, aFs, aAlbumsObserver );
   281     CleanupStack::Pop( self );
   283     CleanupStack::Pop( self );
   282     return self;
   284     return self;
   283     }
   285     }
   284 
   286 
   285 
   287 
   286 // ---------------------------------------------------------------------------
   288 // ---------------------------------------------------------------------------
   287 // ---------------------------------------------------------------------------
   289 // ---------------------------------------------------------------------------
   288 //
   290 //
   289 CVcxMyVideosMdsDb* CVcxMyVideosMdsDb::NewLC( MVcxMyVideosMdsDbObserver* aObserver,
   291 CVcxMyVideosMdsDb* CVcxMyVideosMdsDb::NewLC( MVcxMyVideosMdsDbObserver* aObserver,
   290         MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver, RFs& aFs )
   292         RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver )
   291     {
   293     {
   292     CVcxMyVideosMdsDb* self = new( ELeave ) CVcxMyVideosMdsDb( aObserver, aAlbumsObserver, aFs );
   294     CVcxMyVideosMdsDb* self = new( ELeave ) CVcxMyVideosMdsDb( aObserver, aFs, aAlbumsObserver );
   293     CleanupStack::PushL( self );
   295     CleanupStack::PushL( self );
   294     self->ConstructL();
   296     self->ConstructL();
   295     return self;
   297     return self;
   296     }
   298     }
   297 
   299 
  1021         }
  1023         }
  1022 
  1024 
  1023     //16. ORIGIN, KVcxMediaMyVideosOrigin
  1025     //16. ORIGIN, KVcxMediaMyVideosOrigin
  1024     if ( aObject.Property( *iOriginPropertyDef, property, 0 ) != KErrNotFound )
  1026     if ( aObject.Property( *iOriginPropertyDef, property, 0 ) != KErrNotFound )
  1025         {
  1027         {
  1026         aVideo.SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin,
  1028         TUint8 origin = static_cast<CMdEUint8Property*>(property)->Value();
  1027                 static_cast<CMdEUint8Property*>(property)->Value() );
  1029 #ifdef VIDEO_COLLECTION_PLUGIN_TB92
       
  1030         if( origin != EVcxMyVideosOriginCapturedWithCamera )
       
  1031             {
       
  1032             origin = EVcxMyVideosOriginOther;
       
  1033             }           
       
  1034 #else
       
  1035         if ( origin != EVcxMyVideosOriginCapturedWithCamera &&
       
  1036 				 origin != EVcxMyVideosOriginDownloaded
       
  1037 				)
       
  1038             {
       
  1039             origin = EVcxMyVideosOriginOther;
       
  1040             }
       
  1041 
       
  1042 #endif
       
  1043         aVideo.SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, origin );
  1028         }
  1044         }
  1029 
  1045 
  1030     //17. DURATION, (KMPXMediaGeneralDuration can't be used since it is TInt
  1046     //17. DURATION, (KMPXMediaGeneralDuration can't be used since it is TInt
  1031     //   and we need TReal32 ) (BRIEF)
  1047     //   and we need TReal32 ) (BRIEF)
  1032     if ( aObject.Property( *iDurationPropertyDef, property, 0 ) != KErrNotFound )
  1048     if ( aObject.Property( *iDurationPropertyDef, property, 0 ) != KErrNotFound )
  1571     iAgeProfilePropertyDef = &(iVideoObjectDef->GetPropertyDefL(
  1587     iAgeProfilePropertyDef = &(iVideoObjectDef->GetPropertyDefL(
  1572             KVcxAgeProfilePropertyName )); //13
  1588             KVcxAgeProfilePropertyName )); //13
  1573 
  1589 
  1574     iAudioLanguagePropertyDef = &(iVideoObjectDef->GetPropertyDefL(
  1590     iAudioLanguagePropertyDef = &(iVideoObjectDef->GetPropertyDefL(
  1575             KVcxAudioLanguagePropertyName )); //14
  1591             KVcxAudioLanguagePropertyName )); //14
  1576 
       
  1577 #if 0
       
  1578     iDownloadIdPropertyDef = &(iVideoObjectDef->GetPropertyDefL(
       
  1579             KVcxDownloadIdPropertyName )); //18
       
  1580 #endif
       
  1581     
  1592     
  1582     }
  1593     }
  1583 
  1594 
  1584 // ---------------------------------------------------------------------------
  1595 // ---------------------------------------------------------------------------
  1585 // CVcxMyVideosMdsDb::DoHandleObjectNotificationL
  1596 // CVcxMyVideosMdsDb::DoHandleObjectNotificationL