51 _LIT( KTAGDaemonName, "ThumbAGDaemon" ); |
51 _LIT( KTAGDaemonName, "ThumbAGDaemon" ); |
52 _LIT( KTAGDaemonExe, "thumbagdaemon.exe" ); |
52 _LIT( KTAGDaemonExe, "thumbagdaemon.exe" ); |
53 |
53 |
54 _LIT(KVideo, "Video"); |
54 _LIT(KVideo, "Video"); |
55 _LIT(KInUse, "InUse"); |
55 _LIT(KInUse, "InUse"); |
|
56 |
|
57 _LIT(KUndefinedMime, " "); |
56 |
58 |
57 _LIT( KExtensionMp4, "mp4" ); |
59 _LIT( KExtensionMp4, "mp4" ); |
58 _LIT( KExtensionMpg4, "mpg4" ); |
60 _LIT( KExtensionMpg4, "mpg4" ); |
59 _LIT( KExtensionMpeg4, "mpeg4" ); |
61 _LIT( KExtensionMpeg4, "mpeg4" ); |
60 _LIT( KExtension3gp, "3gp" ); |
62 _LIT( KExtension3gp, "3gp" ); |
1765 |
1767 |
1766 WRITELOG1( "RHarvesterClient::HarvestFile - add location: %d", addLocation ); |
1768 WRITELOG1( "RHarvesterClient::HarvestFile - add location: %d", addLocation ); |
1767 |
1769 |
1768 CHarvesterData* hd = NULL; |
1770 CHarvesterData* hd = NULL; |
1769 TRAP( err, hd = CHarvesterData::NewL( uri ) ); |
1771 TRAP( err, hd = CHarvesterData::NewL( uri ) ); |
1770 if ( err != KErrNone ) |
1772 if ( err != KErrNone || !hd ) |
1771 { |
1773 { |
1772 WRITELOG( "CHarvesterAO::HarvestFile - creating harvUri failed" ); |
1774 WRITELOG( "CHarvesterAO::HarvestFile - creating harvUri failed" ); |
1773 albumIds.Close(); |
1775 albumIds.Close(); |
1774 delete uri; |
1776 delete uri; |
1775 uri = NULL; |
1777 uri = NULL; |
1941 |
1944 |
1942 WRITELOG1( "RHarvesterClient::HarvestFileWithUID - add location: %d", addLocation ); |
1945 WRITELOG1( "RHarvesterClient::HarvestFileWithUID - add location: %d", addLocation ); |
1943 |
1946 |
1944 CHarvesterData* hd = NULL; |
1947 CHarvesterData* hd = NULL; |
1945 TRAP( err, hd = CHarvesterData::NewL( uri ) ); |
1948 TRAP( err, hd = CHarvesterData::NewL( uri ) ); |
1946 if ( err != KErrNone ) |
1949 if ( err != KErrNone || !hd ) |
1947 { |
1950 { |
1948 WRITELOG( "CHarvesterAO::HarvestFileWithUID - creating harvUri failed" ); |
1951 WRITELOG( "CHarvesterAO::HarvestFileWithUID - creating harvUri failed" ); |
1949 albumIds.Close(); |
1952 albumIds.Close(); |
1950 delete uri; |
1953 delete uri; |
1951 uri = NULL; |
1954 uri = NULL; |
2202 WRITELOG( "CHarvesterAO::ContextSnapshotStatus()" ); |
2206 WRITELOG( "CHarvesterAO::ContextSnapshotStatus()" ); |
2203 |
2207 |
2204 HarvestCompleted( aHD->ClientId(), aHD->Uri(), aHD->ErrorCode() ); |
2208 HarvestCompleted( aHD->ClientId(), aHD->Uri(), aHD->ErrorCode() ); |
2205 |
2209 |
2206 const TInt errorCode = aHD->ErrorCode(); |
2210 const TInt errorCode = aHD->ErrorCode(); |
2207 if( errorCode != KErrNone ) |
2211 if( errorCode != KErrNone && errorCode != KErrCompletion ) |
2208 { |
2212 { |
2209 WRITELOG1( "CHarvesterAO::ContextSnapshotStatus() - error occurred: %d", errorCode ); |
2213 WRITELOG1( "CHarvesterAO::ContextSnapshotStatus() - error occurred: %d", errorCode ); |
2210 } |
2214 } |
2211 else |
2215 else |
2212 { |
2216 { |
2213 WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - successfully completed" ); |
2217 if( errorCode == KErrCompletion ) |
|
2218 { |
|
2219 WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - snapshot could not be completed" ); |
|
2220 WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - processing non-context data anyway" ); |
|
2221 } |
|
2222 else |
|
2223 { |
|
2224 WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - successfully completed" ); |
|
2225 } |
2214 if( aHD->Origin() == MdeConstants::Object::ECamera ) |
2226 if( aHD->Origin() == MdeConstants::Object::ECamera ) |
2215 { |
2227 { |
2216 aHD->MdeObject().SetPlaceholder( EFalse ); |
2228 aHD->MdeObject().SetPlaceholder( EFalse ); |
2217 TRAPD(mdeError, iMdeObjectHandler->SetMetadataObjectL( *aHD ) ); |
2229 TRAPD(mdeError, iMdeObjectHandler->SetMetadataObjectL( *aHD ) ); |
2218 if(mdeError != KErrNone) |
2230 if(mdeError != KErrNone) |