--- a/filedetails/filedetailsdialog/src/MPFileDetails.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/filedetails/filedetailsdialog/src/MPFileDetails.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*/
-// Version : %version: 8 %
+// Version : %version: 9 %
// INCLUDE FILES
@@ -35,33 +35,6 @@
: iSeekable( ETrue ), iDRMExpireConstraint( EMediaPlayerNone ), iDRMhasInfoURL(EFalse)
{
MPX_ENTER_EXIT(_L("CMPFileDetails::CMPFileDetails()"));
-
- //Initializing to make sure no garbage in the variables
- iTitle = NULL;
- iFileName = NULL;
- iFilePath = NULL;
- iUrl = NULL;
- iFormat = NULL;
- iCopyright = NULL;
- iArtist = NULL;
- iAlbum = NULL;
- iYear = NULL;
-
- iOriginalArtist = NULL;
- iAlbumTrack = NULL;
- iGenre = NULL;
- iComposer = NULL;
- iAudioFileWebPage = NULL;
- iComment = NULL;
- iProvider = NULL;
- iDescription = NULL;
-
- iArtistXpcs = NULL;
- iTitleXpcs = NULL;
- iAlbumXpcs = NULL ;
- iInfoXpcs = NULL;
-
- iDRMInfoURL = NULL;
}
// -----------------------------------------------------------------------------
--- a/filedetails/filedetailsdialog/src/MPFileDetailsDialog.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/filedetails/filedetailsdialog/src/MPFileDetailsDialog.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*/
-// Version : %version: 20 %
+// Version : %version: 21 %
// INCLUDE FILES
#include <aknlists.h>
@@ -310,7 +310,7 @@
}
else if (!metaData->Name().CompareF(KMPArtist) || !metaData->Name().Compare(KMPAuthor))
{
- fileDetails->iArtist = metaData->Value().Alloc();
+ fileDetails->iArtist = metaData->Value().AllocL();
}
else if (!metaData->Name().CompareF(KMPTitle))
{
@@ -1751,7 +1751,7 @@
if( !aBuf && aDetail.Length())
{
- aBuf = HBufC::New( aDetail.Length() );
+ aBuf = HBufC::NewL( aDetail.Length() );
aBuf->Des().Copy( aDetail );
}
}
--- a/inc/IptvDebug.h Tue Sep 14 21:23:06 2010 +0300
+++ b/inc/IptvDebug.h Wed Sep 15 12:15:24 2010 +0300
@@ -173,7 +173,7 @@
#else
// ARMV5 BUILD:
-#define IPTV_LOGGING_METHOD 1 // Flogger is default with target device
+#define IPTV_LOGGING_METHOD 2 // RDebug is default with target device
#endif
--- a/inc/mpxvideo_debug.h Tue Sep 14 21:23:06 2010 +0300
+++ b/inc/mpxvideo_debug.h Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*/
-// Version : %version: ou1cpsw#3 %
+// Version : %version: ou1cpsw#4.1.1 %
@@ -35,13 +35,13 @@
// #define _MPX_FILE_LOGGING_
-#ifdef _DEBUG
- #define FU_DEBUG RDebug::Print
+#ifndef _DEBUG
+ #define FU_DEBUG
#else
#ifdef _MPX_FILE_LOGGING_
#define FU_DEBUG MPXDebug::FileLog
#else
- #define FU_DEBUG
+ #define FU_DEBUG RDebug::Print
#endif
#endif
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h Wed Sep 15 12:15:24 2010 +0300
@@ -343,6 +343,13 @@
* @param aError system error code.
*/
void HandleGetVideoDetailsRespL( CMPXMessage* aMessage, TInt aError );
+
+ /**
+ * Gets current collection path category level index
+ *
+ * @return Index or KErrNotFound, if current path is not in video level
+ */
+ TInt CategoryIndexL();
protected:
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosthumbnailmanager.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosthumbnailmanager.h Wed Sep 15 12:15:24 2010 +0300
@@ -98,6 +98,13 @@
* @param aRequestId
*/
void Cancel( TThumbnailRequestId aRequestId );
+
+ /**
+ * Reset the generated thumbnails from given source
+ *
+ * aSource Thumbnail source
+ */
+ void Reset( CThumbnailObjectSource& aSource );
/**
* Adds observer.
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h Wed Sep 15 12:15:24 2010 +0300
@@ -458,6 +458,16 @@
* This method resets iMarkedMediaList before returning.
*/
void RestoreMarkingsL();
+
+ /**
+ * Resets the empty thumbnail from DRM protected video clip.
+ * This causes the thumbnail to be attempted to be regenerated
+ * next time the thumbnail is fetched fron thumbnail manager.
+ *
+ * @param aMedia Media from which new video tag will be cleared.
+ * @param aIndex Index of the visible item.
+ */
+ void ResetEmptyDrmThumnailL( CMPXMedia& aMedia, TInt aIndex );
private:
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -47,6 +47,7 @@
const TInt KVcxHgEventLevelCategory = 2;
const TInt KVcxHgEventLevelVideo = 3;
+const TInt KVcxMpxLevelRoot = 1;
const TInt KVcxMpxLevelCategories = 2;
const TInt KVcxMpxLevelVideos = 3;
@@ -220,9 +221,20 @@
}
else if ( iCollectionLevel == KVcxMpxLevelVideos )
{
- // OpenL() will return a list if there has been any changes.
- // No reply if list is same as with previous OpenL().
- iCollectionUtility->Collection().OpenL();
+ TInt currentIndex = CategoryIndexL();
+
+ if ( aIndex == currentIndex )
+ {
+ // OpenL() will return a list if there has been any changes.
+ // No reply if list is same as with previous OpenL().
+ iCollectionUtility->Collection().OpenL();
+ }
+ else
+ {
+ iCollectionUtility->Collection().BackL( );
+ iCollectionUtility->Collection().OpenL( aIndex );
+ iCollectionLevel = KErrNotFound;
+ }
}
else
{
@@ -381,16 +393,30 @@
IPTVLOGSTRING2_LOW_LEVEL(
"CVcxHgMyVideosCollectionClient::PlayVideoL: Play video at collection index %d", aMpxItemId.iId1 );
- CMPXCollectionPath* path = CMPXCollectionPath::NewL();
- CleanupStack::PushL(path);
+ CMPXCollectionPath* collectionPath = iCollectionUtility->Collection().PathL();
+ CleanupStack::PushL( collectionPath );
- path->AppendL( KVcxUidMyVideosMpxCollection );
- path->AppendL( KVcxMvcCategoryIdAll );
- path->AppendL( aMpxItemId );
- path->SelectL( aMpxItemId );
-
- iCollectionUtility->Collection().OpenL( *path );
- CleanupStack::PopAndDestroy(path);
+ if ( collectionPath->Levels() == KVcxMpxLevelVideos )
+ {
+ collectionPath->DeselectAll();
+ collectionPath->SelectL( aMpxItemId );
+ iCollectionUtility->Collection().OpenL( *collectionPath );
+ }
+ else
+ {
+ CMPXCollectionPath* customPath = CMPXCollectionPath::NewL();
+ CleanupStack::PushL(customPath);
+
+ customPath->AppendL( KVcxUidMyVideosMpxCollection );
+ customPath->AppendL( KVcxMvcCategoryIdAll );
+ customPath->AppendL( aMpxItemId );
+ customPath->SelectL( aMpxItemId );
+
+ iCollectionUtility->Collection().OpenL( *customPath );
+ CleanupStack::PopAndDestroy( customPath );
+ }
+
+ CleanupStack::PopAndDestroy( collectionPath );
}
// -----------------------------------------------------------------------------
@@ -1140,6 +1166,24 @@
}
}
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosCollectionClient::CategoryIndexL()
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosCollectionClient::CategoryIndexL()
+ {
+ CMPXCollectionPath* path = iCollectionUtility->Collection().PathL();
+ CleanupStack::PushL( path );
+ TInt index ( -1 );
+ if ( path->Levels() > KVcxMpxLevelCategories )
+ {
+ index = path->Index( KVcxMpxLevelRoot );
+ }
+ CleanupStack::PopAndDestroy( path );
+
+ return index;
+ }
+
#if defined(_DEBUG) && IPTV_LOGGING_METHOD != 0
// -----------------------------------------------------------------------------
// CVcxHgMyVideosCollectionClient::DebugPrintVideoListL()
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosthumbnailmanager.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosthumbnailmanager.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -114,6 +114,18 @@
}
// -----------------------------------------------------------------------------
+// CVcxHgMyVideosThumbnailManager::Reset()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosThumbnailManager::Reset( CThumbnailObjectSource& aSource )
+ {
+ if ( iTnManager )
+ {
+ iTnManager->DeleteThumbnails( aSource );
+ }
+ }
+
+// -----------------------------------------------------------------------------
// CVcxHgMyVideosThumbnailManager::AddObserverL()
// -----------------------------------------------------------------------------
//
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -113,8 +113,7 @@
iModel( aModel ),
iScroller( aScroller ),
iVideoArray( aVideoArray ),
- iVideosIndicator( aVideosIndicator ),
- iPaused( EFalse )
+ iVideosIndicator( aVideosIndicator )
{
CActiveScheduler::Add( this );
}
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -41,6 +41,7 @@
#include "vcxhgmyvideosvideomodelhandler.h"
#include "vcxhgmyvideosvideolistimpl.h"
#include "vcxhgmyvideosvideodataupdater.h"
+#include "vcxhgmyvideosthumbnailmanager.h"
#include "vcxhgmyvideos.hrh"
#include "vcxhgmyvideoslistbase.h"
@@ -603,6 +604,7 @@
TMPXItemId mpxItemId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
SetVideoLastWatchedL( *media );
ClearNewVideoFlagL( *media );
+ ResetEmptyDrmThumnailL( *media, aIndex );
IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
iModel.CollectionClient().PlayVideoL( mpxItemId );
}
@@ -1417,3 +1419,29 @@
aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ), flags );
}
}
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL( CMPXMedia& aMedia, TInt aIndex )
+ {
+ CHgItem& item = iScroller.ItemL( aIndex );
+
+ if ( !item.Icon() )
+ {
+ if ( aMedia.IsSupported( KMPXMediaGeneralFlags ) &&
+ aMedia.ValueTObjectL<TUint32>( KMPXMediaGeneralFlags )
+ == EVcxMyVideosVideoDrmProtected );
+ {
+ CThumbnailObjectSource* source =
+ CThumbnailObjectSource::NewLC( aMedia.ValueText( KMPXMediaGeneralUri ), NULL );
+
+ // We cannot know at this phase, do the user get the license
+ // when playing the video, so we have to reset this every time.
+ iModel.ThumbnailManager().Reset( *source );
+
+ CleanupStack::PopAndDestroy( source );
+ }
+ }
+ }
--- a/videocollection/mpxmyvideoscollection/inc/vcxmyvideoscategories.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/inc/vcxmyvideoscategories.h Wed Sep 15 12:15:24 2010 +0300
@@ -216,9 +216,12 @@
* calling function already has it available.
* @param aVideosIncrements How many new items were added to each category.
* @param aNewVideosIncrements How many videos with new flag were added to each category.
+ * @param aForceUpdate If set, the modify event is raised even though the count
+ * has not changed. ETrue, if update is to be forced.
*/
void UpdateVideosCountL( CMPXMediaArray& aCategoryArray,
- RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements );
+ RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements,
+ TBool aForceUpdate );
/**
* Increases/decreases aCountAttribute in aCategory. Adds event to
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideoscategories.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideoscategories.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -256,7 +256,8 @@
}
// Update videos counts
- UpdateVideosCountL( *categoryArray, videosIncrements, newVideosIncrements );
+ UpdateVideosCountL( *categoryArray, videosIncrements,
+ newVideosIncrements, !aNewItemsStartIndex );
CleanupStack::PopAndDestroy( &newVideosIncrements ); // <-1
CleanupStack::PopAndDestroy( &videosIncrements ); // <-1
@@ -267,7 +268,8 @@
// ----------------------------------------------------------------------------
//
void CVcxMyVideosCategories::UpdateVideosCountL( CMPXMediaArray& aCategoryArray,
- RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements )
+ RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements,
+ TBool aForceUpdate )
{
TBool modified = EFalse;
TInt categoryCount = aCategoryArray.Count();
@@ -275,7 +277,7 @@
for ( TInt i = 0; i < categoryCount; i++ )
{
- if ( aVideosIncrements[i] != 0 )
+ if ( aForceUpdate || aVideosIncrements[i] != 0 )
{
category = aCategoryArray.AtL( i );
@@ -287,7 +289,7 @@
}
//codescanner warning: aNewVideosIncrements count is same as aCategoryArray count, so the range is checked
- if ( aNewVideosIncrements[i] != 0 )
+ if ( aForceUpdate || aNewVideosIncrements[i] != 0 )
{
category = aCategoryArray.AtL( i );
@@ -314,10 +316,9 @@
if ( aIncrement != 0 )
{
AddToTUint32AttributeL( aCategory, aIncrement, aCountAttribute );
-
- iCollection.iMessageList->AddEventL( aCategory.ValueTObjectL<TMPXItemId>(
- KMPXMediaGeneralId ), EMPXItemModified, aEventInfo );
}
+ iCollection.iMessageList->AddEventL( aCategory.ValueTObjectL<TMPXItemId>(
+ KMPXMediaGeneralId ), EMPXItemModified, aEventInfo );
}
// ----------------------------------------------------------------------------
--- a/videoplayback/inc/mpxvideobaseplaybackview.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/inc/mpxvideobaseplaybackview.h Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: 25 %
+// Version : %version: 26 %
// This file defines the API for VideoBasePlaybackView.dll
@@ -387,9 +387,10 @@
TBool iPdlReloading;
TBool iRealOneDelayedPlay;
TBool iKeyboardInFocus;
+ TBool iExitPlayer;
HBufC* iClipName;
-
+
TBool iSyncClose;
};
--- a/videoplayback/videohelix/group/mpxvideohelixplayback.mmp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/group/mpxvideohelixplayback.mmp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 16 %
+// Version : %version: 16.1.1 %
@@ -44,6 +44,7 @@
SOURCE mpxvideoplayerutility.cpp
SOURCE mpxvideodrmhelper.cpp
SOURCE mpxvideoposterframesetter.cpp
+SOURCE mpxcalldetector.cpp
START RESOURCE ../data/10282550.rss
TARGET mpxvideohelixplayback.rsc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/inc/mpxcalldetector.h Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Class for call detaction
+*
+*/
+
+// Version : %version: 1 %
+
+#ifndef MPXCALLDETECTOR_H
+#define MPXCALLDETECTOR_H
+
+#include <e32base.h>
+#include <e32property.h>
+
+class MMPXCallDetectorObserver
+{
+ public:
+ virtual void CallDetectedL() = 0;
+};
+
+/**
+ * Detector for incoming call
+ */
+NONSHARABLE_CLASS( CMPXCallDetector ) : public CActive
+{
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CMPXCallDetector* NewL( MMPXCallDetectorObserver* aObserver );
+
+ /**
+ * Destructor.
+ */
+ ~CMPXCallDetector();
+
+ public: // New functions
+
+ /**
+ * Request call notifications
+ *
+ */
+ void RequestNotification();
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CMPXCallDetector( MMPXCallDetectorObserver* aObserver );
+
+ /**
+ * Symbian OS 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * From CActive
+ * @see CActive for more information
+ */
+ void RunL();
+
+ /**
+ * From CActive
+ * @see CActive for more information
+ */
+ void DoCancel();
+
+ private:
+
+ // Call observer
+ MMPXCallDetectorObserver* iObserver;
+ RProperty iTsyProperty;
+};
+
+#endif // CALLDETECTOR_H
--- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: 29 %
+// Version : %version: 30 %
#ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_
@@ -41,6 +41,7 @@
#include "mpxvideoplayerutility.h"
#include "mpxvideo_debug.h"
+#include "mpxcalldetector.h"
// DATA TYPES
// FORWARD DECLARATIONS
@@ -68,6 +69,7 @@
NONSHARABLE_CLASS( CMPXVideoPlaybackController )
: public CBase
, public MMPXCenRepObserver
+ , public MMPXCallDetectorObserver
{
public:
//
@@ -146,6 +148,7 @@
private:
+ void CallDetectedL();
void SetDisplayWindowL( CMPXCommand& aCmd );
void RestartDSA( CMPXCommand& aCmd );
@@ -261,6 +264,9 @@
// Timer monitoring user activity when TV-out is connected
CPeriodic* iUserActivityTimer;
+ // Call detector
+ CMPXCallDetector* iCallDetector;
+
TBool iSeekable;
CMpxVideoDrmHelper* iDrmHelper;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/src/mpxcalldetector.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// Version : %version: 1 %
+
+// INCLUDE FILES
+#include <ctsydomainpskeys.h>
+
+#include "mpxcalldetector.h"
+#include "mpxvideo_debug.h"
+
+
+// ---------------------------------------------------------------------------
+// CCallDetector::NewL
+//
+// ---------------------------------------------------------------------------
+//
+CMPXCallDetector* CMPXCallDetector::NewL( MMPXCallDetectorObserver* aObserver )
+{
+ MPX_ENTER_EXIT(_L("CMPXCallDetector::NewL()"));
+
+ CMPXCallDetector* self = new( ELeave ) CMPXCallDetector( aObserver );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+}
+
+// ---------------------------------------------------------------------------
+// Destructor
+//
+// ---------------------------------------------------------------------------
+//
+CMPXCallDetector::~CMPXCallDetector()
+{
+ Cancel();
+ iTsyProperty.Close();
+}
+
+// ---------------------------------------------------------------------------
+// CCallDetector::RequestNotification
+//
+// ---------------------------------------------------------------------------
+//
+void CMPXCallDetector::RequestNotification()
+{
+ MPX_ENTER_EXIT(_L("CCallDetector::RequestNotification()"));
+
+ iTsyProperty.Subscribe( iStatus );
+ SetActive();
+}
+
+// ---------------------------------------------------------------------------
+// Constructor
+//
+// ---------------------------------------------------------------------------
+//
+CMPXCallDetector::CMPXCallDetector( MMPXCallDetectorObserver* aObserver )
+ : CActive( EPriorityStandard ), iObserver( aObserver )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CCallDetector::ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CMPXCallDetector::ConstructL()
+{
+ MPX_ENTER_EXIT(_L("CCallDetector::ConstructL"));
+
+ User::LeaveIfError( iTsyProperty.Attach( KPSUidCtsyCallInformation, KCTsyCallState ) );
+
+ CActiveScheduler::Add( this );
+}
+
+// ---------------------------------------------------------------------------
+// CCallDetector::RunL
+// Called when the voice line status changes.
+// ---------------------------------------------------------------------------
+//
+void CMPXCallDetector::RunL()
+{
+ TInt status = iStatus.Int();
+
+ RequestNotification();
+
+ if ( status == KErrNone )
+ {
+ TInt status;
+ iTsyProperty.Get( status );
+
+ if ( status != EPSCTsyCallStateNone )
+ {
+ iObserver->CallDetectedL();
+ }
+ }
+}
+
+// ---------------------------------------------------------------------------
+// CCallDetector::DoCancel
+//
+// ---------------------------------------------------------------------------
+//
+void CMPXCallDetector::DoCancel()
+{
+ iTsyProperty.Cancel();
+}
+
+// End of File
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: 65 %
+// Version : %version: 66 %
//
@@ -167,6 +167,9 @@
iDrmHelper = CMpxVideoDrmHelper::NewL();
+ iCallDetector = CMPXCallDetector::NewL( this );
+ iCallDetector->RequestNotification();
+
iSavedPosition = 0;
iViewActivated = EFalse;
}
@@ -291,6 +294,14 @@
delete iSeekingState;
delete iStoppedState;
+ if ( iCallDetector )
+ {
+ iCallDetector->Cancel();
+
+ delete iCallDetector;
+ iCallDetector = NULL;
+ }
+
if ( iPlaybackMode )
{
delete iPlaybackMode;
@@ -2551,4 +2562,13 @@
iPlaybackMode->HandleFrameReady(aError);
}
+
+void CMPXVideoPlaybackController::CallDetectedL()
+{
+ MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CallDetectedL"));
+
+ // Pause playback
+ DoHandleCommandL( EPbCmdPause );
+}
+
// End of file
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg Wed Sep 15 12:15:24 2010 +0300
@@ -589,7 +589,7 @@
waittestclass test
test PlayduringVoiceCall
pause 100
-test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackBuffering
+test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackPlaying
pause 1000
test EndPhoneCall
delete test
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 10 %
+// Version : %version: 10.1.1 %
@@ -62,6 +62,7 @@
SOURCE mpxvideoplaybackstate.cpp
SOURCE mpxvideoseeker.cpp
SOURCE mpxvideoposterframesetter.cpp
+SOURCE mpxcalldetector.cpp
LIBRARY euser.lib
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 26 %
+// Version : %version: 27 %
// [INCLUDE FILES] - do not remove
@@ -1958,6 +1958,13 @@
TInt err = 0;
+ //callback event
+ TCallbackEvent* event = new TCallbackEvent;
+ event->iError = 0;
+ event->iData = 0;
+ event->iEvent = EPPaused;
+ AddExpectedEvent( event );
+
//set phone call as Connected
err = RProperty::Set(KPSUidCtsyCallInformation, KCTsyCallState, EPSCTsyCallStateConnected);
--- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: 86 %
+// Version : %version: 88 %
// Include Files
@@ -966,7 +966,7 @@
}
case KMPXVideoCallOngoingError:
{
- DisplayInfoMessageL( R_MPX_VIDEO_CALL_ONGOING );
+ DisplayInfoMessageL( R_MPX_VIDEO_CALL_ONGOING, ETrue );
break;
}
default:
@@ -1550,7 +1550,15 @@
void CMPXVideoBasePlaybackView::DoClosePlayerL()
{
MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::DoClosePlayerL()"));
- AppUi()->HandleCommandL( EAknSoftkeyBack );
+
+ if ( iExitPlayer )
+ {
+ AppUi()->HandleCommandL( EAknCmdExit );
+ }
+ else
+ {
+ AppUi()->HandleCommandL( EAknSoftkeyBack );
+ }
}
// -------------------------------------------------------------------------------------------------
@@ -1860,6 +1868,8 @@
{
MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleDrmErrorsL()"));
+ TInt drmUiError = KErrNone;
+
//
// If we receive an error when we are initialized, let the DRM UI Handler
// process the error. If we have been playing, display the error message
@@ -1883,10 +1893,11 @@
DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
CleanupStack::PushL( drmUiHandling );
- drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle,
- ContentAccess::EPlay,
- aError,
- NULL );
+ MPX_TRAP( drmUiError,
+ drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle,
+ ContentAccess::EPlay,
+ aError,
+ NULL ) );
CleanupStack::PopAndDestroy( drmUiHandling );
}
@@ -1903,10 +1914,12 @@
DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
CleanupStack::PushL( drmUiHandling );
- drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle64,
- ContentAccess::EPlay,
- aError,
- NULL );
+ MPX_TRAP( drmUiError,
+ drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle64,
+ ContentAccess::EPlay,
+ aError,
+ NULL ) );
+
CleanupStack::PopAndDestroy( drmUiHandling );
}
else
@@ -1925,7 +1938,19 @@
CleanupStack::PopAndDestroy(); // fileHandle
}
- HandleClosePlaybackViewL();
+ if ( KErrNone == drmUiError )
+ {
+ HandleClosePlaybackViewL();
+ }
+ else if ( KLeaveExit == drmUiError )
+ {
+ iExitPlayer = ETrue;
+ ActivateClosePlayerActiveObject();
+ }
+ else
+ {
+ User::Leave( drmUiError );
+ }
}
// -------------------------------------------------------------------------------------------------
--- a/videoplayerapp/mpxvideoplayer/group/mpxvideoplayer.mmp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/group/mpxvideoplayer.mmp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: da1mmcf#28 %
+// Version : %version: 29 %
#include <platform_paths.hrh>
#include <data_caging_paths.hrh>
@@ -37,6 +37,7 @@
SOURCE mpxvideoplayerappui.cpp
SOURCE mpxvideoplayerappuiengine.cpp
SOURCE mpxvideoembeddedpdlhandler.cpp
+SOURCE mpxvideoplayeriadupdate.cpp
START RESOURCE ../data/mpxvideoplayer.rss
HEADER
@@ -81,5 +82,7 @@
LIBRARY mpxcommon.lib
LIBRARY flogger.lib
LIBRARY videoplaylistutility.lib
+LIBRARY featmgr.lib
+LIBRARY iaupdateapi.lib
// End of File
--- a/videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappuiengine.h Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappuiengine.h Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: da1mmcf#34 %
+// Version : %version: 35 %
#ifndef CMPXVIDEOPLAYERAPPUIENGINE_H
@@ -43,6 +43,7 @@
class MMPXCollectionUiHelper;
class CAiwGenericParamList;
class CVideoPlaylistUtility;
+class CMpxVideoPlayerIadUpdate;
/**
* Application UI class.
@@ -314,6 +315,11 @@
*/
virtual void DoLateConstructL();
+ /**
+ * Checks for updates via IAD.
+ */
+ void DoCheckForUpdatesL();
+
private: // data
CMpxVideoPlayerAppUi* iAppUi;
@@ -330,6 +336,7 @@
CIdle* iExitAo;
CMediaRecognizer* iRecognizer; // own
CMpxVideoEmbeddedPdlHandler* iPdlHandler; // own
+ CMpxVideoPlayerIadUpdate* iIadUpdate; // own
TInt iAccessPointId;
TBool iMultilinkPlaylist;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayerapp/mpxvideoplayer/inc/mpxvideoplayeriadupdate.h Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IAD update handling.
+*
+*/
+
+
+// Version : %version: 1 %
+
+
+#ifndef CMPXVIDEOPLAYERIADUPDATE_H
+#define CMPXVIDEOPLAYERIADUPDATE_H
+
+#include <e32std.h>
+#include <iaupdateobserver.h>
+
+class CIAUpdate;
+class CIAUpdateParameters;
+class MMPXViewUtility;
+
+
+/**
+ * This class handles IAD update.
+ */
+NONSHARABLE_CLASS( CMpxVideoPlayerIadUpdate ) : public CBase, public MIAUpdateObserver
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ * @param aViewUtility Reference to view utility
+ */
+ static CMpxVideoPlayerIadUpdate* NewL( MMPXViewUtility& aViewUtility );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CMpxVideoPlayerIadUpdate();
+
+public: // New methods
+
+ /**
+ * Start IAD update process.
+ */
+ void StartL();
+
+private: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ * @param aViewUtility Reference to view utility
+ */
+ CMpxVideoPlayerIadUpdate( MMPXViewUtility& aViewUtility );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // New methods
+
+ /**
+ * From MIAUpdateObserver.
+ * This callback function is called when the update checking operation has completed.
+ *
+ * @param aErrorCode The error code of the observed update operation.
+ * KErrNone for successful completion,
+ * otherwise a system wide error code.
+ * @param aAvailableUpdates Number of the updates that were found available.
+ *
+ * @since S60 v3.2
+ */
+ void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates );
+
+
+ /**
+ * From MIAUpdateObserver.
+ * This callback function is called when an update operation has completed.
+ * Even if multiple functions are provided to start different update operations,
+ * this callback function is always called after an update operation has completed.
+ *
+ * @param aErrorCode The error code of the completed update operation.
+ * KErrNone for successful completion,
+ * otherwise a system wide error code.
+ * @param aResult Details about the completed update operation.
+ * Ownership is transferred.
+ *
+ * @since S60 v3.2
+ */
+ void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails );
+
+
+ /**
+ * From MIAUpdateObserver.
+ * This callback function is called when an update query operation has completed.
+ *
+ * @param aErrorCode The error code of the observed query operation.
+ * KErrNone for successful completion,
+ * otherwise a system wide error code.
+ * @param aUpdateNow ETrue informs that an update operation should be started.
+ * EFalse informs that there is no need to start an update
+ * operation.
+ * @since Series 60 3.2
+ */
+ void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow );
+
+
+ /**
+ * Parses SDP file.
+ * @since Series 60 3.2
+ * @param none.
+ * @return none.
+ */
+ void Delete();
+
+private: // Data
+
+ /**
+ * IAD update API.
+ */
+ CIAUpdate* iUpdate;
+
+ /**
+ * IAD update parameters.
+ */
+ CIAUpdateParameters* iParameters;
+
+ /**
+ * Reference to view utility.
+ */
+ MMPXViewUtility& iViewUtility;
+
+ };
+
+#endif // CMPXVIDEOPLAYERIADUPDATE_H
+
--- a/videoplayerapp/mpxvideoplayer/sis/VideoPlayer.pkg Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/sis/VideoPlayer.pkg Wed Sep 15 12:15:24 2010 +0300
@@ -20,10 +20,10 @@
&EN
; Header
-#{"Video Player"},(0x200159B2),9,20,28, TYPE=SA, RU
+#{"Video Player"},(0x200159B2),9,21,35, TYPE=SA, RU
-; Supports Series 60 v5.0
-;[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+; Supports S60 v5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
; Localised Vendor name
%{"Nokia"}
--- a/videoplayerapp/mpxvideoplayer/sis/VideoPlayer_stub.pkg Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/sis/VideoPlayer_stub.pkg Wed Sep 15 12:15:24 2010 +0300
@@ -20,7 +20,7 @@
&EN
;Header
-#{"Video Player"},(0x200159B2),9,20,28, TYPE=SA
+#{"Video Player"},(0x200159B2),9,21,35, TYPE=SA
;Localised Vendor name
%{"Nokia"}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayerapp/mpxvideoplayer/sis/depends.xml Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
+ xmlns:ad="http://nokia.com/arrow/application_metadata">
+ <appResources>
+ <appResource>
+ <language>1</language>
+ <iacName>Videos</iacName>
+ <iacDescription>Update package for Videos</iacDescription>
+ </appResource>
+ </appResources>
+ <swPlatformDep>
+ <platform>S60</platform>
+ <versionFrom>
+ <major>5</major>
+ <minor>2</minor>
+ <date>
+ <year>2010</year>
+ <week>1</week>
+ </date>
+ </versionFrom>
+ <versionTo>
+ <major>5</major>
+ <minor>2</minor>
+ <date>
+ <year>2020</year>
+ <week>1</week>
+ </date>
+ </versionTo>
+ </swPlatformDep>
+ <interDeps>
+ </interDeps>
+</ad:metadata>
--- a/videoplayerapp/mpxvideoplayer/sis/make_videoplayer_sisx.bat Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/sis/make_videoplayer_sisx.bat Wed Sep 15 12:15:24 2010 +0300
@@ -16,10 +16,10 @@
call makesis.exe cenrep.pkg cenrep.sis
-call signsis.exe cenrep.sis cenrep.sisx Nokia_RnDCert_02.der Nokia_RnDCert_02.key
+call signsis.exe cenrep.sis cenrep.sisx \Nokia_RnDCert_02.der \Nokia_RnDCert_02.key
call del cenrep.sis
call makesis.exe VideoPlayer.pkg VideoPlayer.sis
-call signsis.exe VideoPlayer.sis VideoPlayer.sisx Nokia_RnDCert_02.der Nokia_RnDCert_02.key
+call signsis.exe VideoPlayer.sis VideoPlayer.sisx \Nokia_RnDCert_02.der \Nokia_RnDCert_02.key
call del VideoPlayer.sis
call del cenrep.sisx
--- a/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -16,7 +16,7 @@
*/
-// Version : %version: da1mmcf#72 %
+// Version : %version: 73 %
#include <eikon.hrh>
@@ -52,6 +52,7 @@
#include <mpxvideoplaybackdefs.h>
#include "mpxvideo_debug.h"
#include "mpxvideoplayercustomviewmsgconsts.h"
+#include "mpxvideoplayeriadupdate.h"
const TInt KMpxPlaybackPluginTypeUid = 0x101FFCA0;
@@ -204,6 +205,12 @@
{
MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::~CMpxVideoPlayerAppUiEngine()"));
+ if ( iIadUpdate )
+ {
+ delete iIadUpdate;
+ iIadUpdate = NULL;
+ }
+
if ( iConstructTimer )
{
delete iConstructTimer;
@@ -1179,7 +1186,24 @@
iConstructTimer->Cancel();
+ DoCheckForUpdatesL();
+
PlaybackUtilityL();
}
+// ---------------------------------------------------------------------------
+// Checks for updates via IAD
+// ---------------------------------------------------------------------------
+//
+void CMpxVideoPlayerAppUiEngine::DoCheckForUpdatesL()
+ {
+ MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::DoCheckForUpdatesL()"));
+
+ if ( !iIadUpdate )
+ {
+ iIadUpdate = CMpxVideoPlayerIadUpdate::NewL( *iViewUtility );
+ }
+ iIadUpdate->StartL();
+ }
+
// EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoplayeriadupdate.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IAD update handling.
+*
+*/
+
+
+// Version : %version: 1 %
+
+#include <iaupdate.h>
+#include <iaupdateparameters.h>
+#include <iaupdateresult.h>
+#include <featmgr.h>
+#include <mpxviewutility.h>
+
+#include "mpxvideoplayeriadupdate.h"
+#include "mpxvideoplayerconstants.h"
+#include "mpxvideo_debug.h"
+
+const TUid KIadParamUid = { 0x200159B2 }; // Uid of VideoPlayer.sis
+_LIT( KIadParamExec, "mpxvideoplayer.exe" );
+
+
+// --------------------------------------------------------------------------
+// Two-phased constructor.
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate* CMpxVideoPlayerIadUpdate::NewL( MMPXViewUtility& aViewUtility )
+ {
+ CMpxVideoPlayerIadUpdate* self = new( ELeave ) CMpxVideoPlayerIadUpdate( aViewUtility );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// --------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate::CMpxVideoPlayerIadUpdate( MMPXViewUtility& aViewUtility )
+ : iUpdate( NULL ), iParameters( NULL ), iViewUtility( aViewUtility )
+ {
+ // None
+ }
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::ConstructL()
+ {
+ MPX_ENTER_EXIT( _L("CMpxVideoPlayerIadUpdate::ConstructL()") );
+
+ if( FeatureManager::FeatureSupported( KFeatureIdIAUpdate ) )
+ {
+ iUpdate = CIAUpdate::NewL( *this );
+ iParameters = CIAUpdateParameters::NewL();
+ }
+ else
+ {
+ MPX_DEBUG(_L("CMpxVideoPlayerIadUpdate::ConstructL(), Feature not supported"));
+ }
+ }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate::~CMpxVideoPlayerIadUpdate()
+ {
+ Delete();
+ }
+
+// --------------------------------------------------------------------------
+// Starts update process.
+// --------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::StartL()
+ {
+ MPX_ENTER_EXIT( _L("CMpxVideoPlayerIadUpdate::StartL()") );
+
+ if( iUpdate && iParameters )
+ {
+ iParameters->SetUid( KIadParamUid );
+ // We want Videos to be started after update is finished
+ iParameters->SetCommandLineExecutableL( KIadParamExec );
+ iParameters->SetShowProgress( EFalse );
+
+ // Check the updates
+ iUpdate->CheckUpdates( *iParameters );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates )
+ {
+ MPX_ENTER_EXIT( _L("CMpxVideoPlayerIadUpdate::CheckUpdatesComplete()"),
+ _L("aErrorCode: %d, aAvailableUpdates: %d"), aErrorCode, aAvailableUpdates );
+
+ if ( aErrorCode == KErrNone )
+ {
+ if ( aAvailableUpdates > 0 && iViewUtility.ActiveViewType() == KUidMyVideosViewType )
+ {
+ // There were some updates available and video list is active.
+ iUpdate->UpdateQuery();
+ }
+ else
+ {
+ // No updates available or playback ongoing.
+ Delete();
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResult )
+ {
+ MPX_ENTER_EXIT( _L("CMpxVideoPlayerIadUpdate::UpdateComplete()"),
+ _L("aErrorCode: %d, SuccessCount: %d"), aErrorCode, aResult->SuccessCount() );
+
+ delete aResult; // Ownership was transferred, so this must be deleted by the client
+
+ // We do not need the client-server session anymore
+ Delete();
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow )
+ {
+ MPX_ENTER_EXIT( _L("CMpxVideoPlayerIadUpdate::UpdateQueryComplete()"),
+ _L("aErrorCode: %d, aUpdateNow: %d"), aErrorCode, aUpdateNow );
+
+ if ( aErrorCode == KErrNone )
+ {
+ if ( aUpdateNow )
+ {
+ // User choosed to update now, so let's launch the IAUpdate UI.
+ iUpdate->ShowUpdates( *iParameters );
+ }
+ else
+ {
+ // The answer was 'Later'.
+ Delete();
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::Delete()
+ {
+ if ( iUpdate )
+ {
+ delete iUpdate;
+ iUpdate = NULL;
+ }
+ if ( iParameters )
+ {
+ delete iParameters;
+ iParameters = NULL;
+ }
+ }
+
--- a/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/group/mpxvideoplayertest.mmp Tue Sep 14 21:23:06 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/group/mpxvideoplayertest.mmp Wed Sep 15 12:15:24 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: ou1cpsw#11 %
+// Version : %version: ou1cpsw#12 %
#include <platform_paths.hrh>
@@ -48,6 +48,7 @@
SOURCE stifutilities.cpp
SOURCE coneutils_stub.cpp
SOURCE timeoutcontroller.cpp
+SOURCE mpxvideoplayeriadupdate_stub.cpp
SOURCEPATH ../../../src
SOURCE mpxvideoplayerappuiengine.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/inc/mpxvideoplayeriadupdate_stub.h Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IAD update handling.
+*
+*/
+
+
+// Version : %version: 1 %
+
+
+#ifndef CMPXVIDEOPLAYERIADUPDATE_H
+#define CMPXVIDEOPLAYERIADUPDATE_H
+
+#include <e32std.h>
+
+class MMPXViewUtility;
+
+
+/**
+ * This class handles IAD update.
+ */
+NONSHARABLE_CLASS( CMpxVideoPlayerIadUpdate ) : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ * @param aViewUtility Reference to view utility
+ */
+ static CMpxVideoPlayerIadUpdate* NewL( MMPXViewUtility& aViewUtility );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CMpxVideoPlayerIadUpdate();
+
+public: // New methods
+
+ /**
+ * Start IAD update process.
+ */
+ void StartL();
+
+private: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ * @param aViewUtility Reference to view utility
+ */
+ CMpxVideoPlayerIadUpdate( MMPXViewUtility& aViewUtility );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // Data
+
+ /**
+ * Reference to view utility.
+ */
+ MMPXViewUtility& iViewUtility;
+
+ };
+
+#endif // CMPXVIDEOPLAYERIADUPDATE_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayeriadupdate_stub.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IAD update handling.
+*
+*/
+
+
+// Version : %version: 1 %
+
+#include <mpxviewutility.h>
+
+#include "mpxvideoplayeriadupdate_stub.h"
+
+
+// --------------------------------------------------------------------------
+// Two-phased constructor.
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate* CMpxVideoPlayerIadUpdate::NewL( MMPXViewUtility& aViewUtility )
+ {
+ CMpxVideoPlayerIadUpdate* self = new( ELeave ) CMpxVideoPlayerIadUpdate( aViewUtility );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// --------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate::CMpxVideoPlayerIadUpdate( MMPXViewUtility& aViewUtility )
+ : iViewUtility( aViewUtility )
+ {
+ // None
+ }
+
+// ---------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::ConstructL()
+ {
+ }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CMpxVideoPlayerIadUpdate::~CMpxVideoPlayerIadUpdate()
+ {
+ }
+
+// --------------------------------------------------------------------------
+// Starts update process.
+// --------------------------------------------------------------------------
+//
+void CMpxVideoPlayerIadUpdate::StartL()
+ {
+ }
+