mpengine/src/mpmpxplaybackframeworkwrapper_p.cpp
author hgs
Fri, 03 Sep 2010 19:58:01 -0500
changeset 55 f3930dda3342
parent 51 560ce2306a17
child 59 cd9e40a08dda
permissions -rw-r--r--
201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description: Framework wraper for Playback - Private.
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include <mpxplaybackutility.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include <mpxmedia.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include <mpxmediageneraldefs.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include <mpxmediamusicdefs.h>
43
hgs
parents: 36
diff changeset
    22
#include <mpxmediaaudiodefs.h>
hgs
parents: 36
diff changeset
    23
#include <mpxmediadrmdefs.h>
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <mpxcommandgeneraldefs.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include <mpxplaybackmessage.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include <mpxmessagegeneraldefs.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
#include <mpxplaybackmessagedefs.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#include <mpxplaybackframeworkdefs.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include <hbglobal.h>
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
#include <xqsharablefile.h>
51
hgs
parents: 47
diff changeset
    31
#include <mpxcollectionplaylist.h>
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
#include "mpmpxplaybackframeworkwrapper_p.h"
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
#include "mpmpxplaybackframeworkwrapper.h"
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
#include "mpplaybackdata.h"
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
#include "mpcommondefs.h"
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
#include "mptrace.h"
35
hgs
parents: 22
diff changeset
    38
#include "mpxaudioeffectengine.h"
43
hgs
parents: 36
diff changeset
    39
#include "mpsongdata.h"
51
hgs
parents: 47
diff changeset
    40
#include "mpxcollectionpath.h"
35
hgs
parents: 22
diff changeset
    41
hgs
parents: 22
diff changeset
    42
_LIT(KMPXPnRealAudioMimeType, "audio/x-pn-realaudio");
hgs
parents: 22
diff changeset
    43
_LIT(KMPXRealAudioMimeType, "audio/x-realaudio");
hgs
parents: 22
diff changeset
    44
_LIT(KMPXRnRealAudioMimeType, "audio/vnd.rn-realaudio");
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
    \class MpMpxPlaybackFrameworkWrapperPrivate
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
    \brief Wrapper for mpx framework utilities - private implementation.
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
    This is a private implementation of the mpx framework wrapper utilties interface.
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
*/
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
MpMpxPlaybackFrameworkWrapperPrivate::MpMpxPlaybackFrameworkWrapperPrivate( MpMpxPlaybackFrameworkWrapper *qq)
43
hgs
parents: 36
diff changeset
    56
    : q_ptr(qq),
hgs
parents: 36
diff changeset
    57
      iPlaybackUtility(0),
hgs
parents: 36
diff changeset
    58
      iPlaybackData(0),
hgs
parents: 36
diff changeset
    59
      iDetailsRequest(false)
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
    TX_LOG
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
MpMpxPlaybackFrameworkWrapperPrivate::~MpMpxPlaybackFrameworkWrapperPrivate()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
    if ( iPlaybackUtility ) {
36
hgs
parents: 35
diff changeset
    71
        TRAP_IGNORE( ForceStopL() );
hgs
parents: 35
diff changeset
    72
        TRAP_IGNORE( iPlaybackUtility->RemoveObserverL(*this) );
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
        iPlaybackUtility->Close();
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
    delete iPlaybackData;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
 */
55
hgs
parents: 51
diff changeset
    82
void MpMpxPlaybackFrameworkWrapperPrivate::init( quint32 clientSecureId, MpSongData *songData )
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
{
43
hgs
parents: 36
diff changeset
    84
    TX_ENTRY
55
hgs
parents: 51
diff changeset
    85
    iHostUid = TUid::Uid( clientSecureId );
43
hgs
parents: 36
diff changeset
    86
    iSongData = songData;
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
    TRAPD(err, DoInitL());
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
    }
43
hgs
parents: 36
diff changeset
    91
    TX_EXIT
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
void MpMpxPlaybackFrameworkWrapperPrivate::play( QString aFilename )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
    TRAPD( err, DoPlayL(aFilename) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
        TX_LOG_ARGS( "Error: " << err << "; should never get here." );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
void MpMpxPlaybackFrameworkWrapperPrivate::play( const XQSharableFile& file )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
    TRAPD( err, DoPlayL( file ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
        TX_LOG_ARGS( "Error: " << err << "; should never get here." );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
}
47
hgs
parents: 45
diff changeset
   115
hgs
parents: 45
diff changeset
   116
/*!
hgs
parents: 45
diff changeset
   117
 \internal
hgs
parents: 45
diff changeset
   118
 */
hgs
parents: 45
diff changeset
   119
void MpMpxPlaybackFrameworkWrapperPrivate::play()
hgs
parents: 45
diff changeset
   120
{
hgs
parents: 45
diff changeset
   121
    TX_ENTRY
hgs
parents: 45
diff changeset
   122
    TRAPD( err, iPlaybackUtility->CommandL(EPbCmdPlay) );
hgs
parents: 45
diff changeset
   123
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   124
        TX_LOG_ARGS( "Error: " << err << "; should never get here." );
hgs
parents: 45
diff changeset
   125
    }
hgs
parents: 45
diff changeset
   126
    TX_EXIT
hgs
parents: 45
diff changeset
   127
}
hgs
parents: 45
diff changeset
   128
hgs
parents: 45
diff changeset
   129
/*!
hgs
parents: 45
diff changeset
   130
 \internal
hgs
parents: 45
diff changeset
   131
 */
hgs
parents: 45
diff changeset
   132
void MpMpxPlaybackFrameworkWrapperPrivate::pause()
hgs
parents: 45
diff changeset
   133
{
hgs
parents: 45
diff changeset
   134
    TX_ENTRY
hgs
parents: 45
diff changeset
   135
    TRAPD( err, iPlaybackUtility->CommandL(EPbCmdPause) );
hgs
parents: 45
diff changeset
   136
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   137
        TX_LOG_ARGS( "Error: " << err << "; should never get here." );
hgs
parents: 45
diff changeset
   138
    }
hgs
parents: 45
diff changeset
   139
    TX_EXIT
hgs
parents: 45
diff changeset
   140
}
hgs
parents: 45
diff changeset
   141
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
void MpMpxPlaybackFrameworkWrapperPrivate::playPause()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdPlayPause));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   152
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   153
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
void MpMpxPlaybackFrameworkWrapperPrivate::stop()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdStop));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   169
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
void MpMpxPlaybackFrameworkWrapperPrivate::skipForward()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   172
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdNext));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
 */
35
hgs
parents: 22
diff changeset
   184
void MpMpxPlaybackFrameworkWrapperPrivate::startSeekForward()
hgs
parents: 22
diff changeset
   185
{
hgs
parents: 22
diff changeset
   186
    TX_ENTRY
hgs
parents: 22
diff changeset
   187
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdStartSeekForward));
hgs
parents: 22
diff changeset
   188
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   189
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   190
    }
hgs
parents: 22
diff changeset
   191
    TX_EXIT
hgs
parents: 22
diff changeset
   192
}
hgs
parents: 22
diff changeset
   193
hgs
parents: 22
diff changeset
   194
/*!
hgs
parents: 22
diff changeset
   195
 \internal
hgs
parents: 22
diff changeset
   196
 */
hgs
parents: 22
diff changeset
   197
void MpMpxPlaybackFrameworkWrapperPrivate::stopSeeking()
hgs
parents: 22
diff changeset
   198
{
hgs
parents: 22
diff changeset
   199
    TX_ENTRY
hgs
parents: 22
diff changeset
   200
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdStopSeeking));
hgs
parents: 22
diff changeset
   201
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   202
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   203
    }
hgs
parents: 22
diff changeset
   204
    TX_EXIT
hgs
parents: 22
diff changeset
   205
}
hgs
parents: 22
diff changeset
   206
hgs
parents: 22
diff changeset
   207
/*!
hgs
parents: 22
diff changeset
   208
 \internal
hgs
parents: 22
diff changeset
   209
 */
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
void MpMpxPlaybackFrameworkWrapperPrivate::skipBackward()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   212
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdPrevious));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   215
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   220
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   221
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
 */
35
hgs
parents: 22
diff changeset
   223
void MpMpxPlaybackFrameworkWrapperPrivate::startSeekBackward()
hgs
parents: 22
diff changeset
   224
{
hgs
parents: 22
diff changeset
   225
    TX_ENTRY
hgs
parents: 22
diff changeset
   226
    TRAPD(err, iPlaybackUtility->CommandL(EPbCmdStartSeekBackward));
hgs
parents: 22
diff changeset
   227
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   228
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   229
    }
hgs
parents: 22
diff changeset
   230
    TX_EXIT
hgs
parents: 22
diff changeset
   231
}
hgs
parents: 22
diff changeset
   232
hgs
parents: 22
diff changeset
   233
/*!
hgs
parents: 22
diff changeset
   234
 \internal
hgs
parents: 22
diff changeset
   235
 */
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
void MpMpxPlaybackFrameworkWrapperPrivate::setPosition( int value )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
    TX_ENTRY_ARGS("value =" << value);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
    TRAPD(err, iPlaybackUtility->SetL(EPbPropertyPosition, value));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   245
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   246
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
void MpMpxPlaybackFrameworkWrapperPrivate::setShuffle( bool mode )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
    TX_ENTRY_ARGS("mode =" << mode);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
    TRAPD(err, iPlaybackUtility->SetL(EPbPropertyRandomMode, mode));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   253
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   257
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   258
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   259
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   260
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   261
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   262
void MpMpxPlaybackFrameworkWrapperPrivate::setRepeat( bool mode )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   263
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   264
    TX_ENTRY_ARGS("mode =" << mode);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   265
    TRAPD(err, iPlaybackUtility->SetL(EPbPropertyRepeatMode, mode ? EPbRepeatAll : EPbRepeatOff));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   266
    if ( err != KErrNone ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
 */
35
hgs
parents: 22
diff changeset
   275
void MpMpxPlaybackFrameworkWrapperPrivate::setBalance( int value )
hgs
parents: 22
diff changeset
   276
{
hgs
parents: 22
diff changeset
   277
    TX_ENTRY_ARGS("value =" << value);
hgs
parents: 22
diff changeset
   278
    TRAPD( err, iPlaybackUtility->SetL( EPbPropertyBalance, value ) );
hgs
parents: 22
diff changeset
   279
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   280
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   281
    }
hgs
parents: 22
diff changeset
   282
    TX_EXIT
hgs
parents: 22
diff changeset
   283
}
hgs
parents: 22
diff changeset
   284
hgs
parents: 22
diff changeset
   285
/*!
hgs
parents: 22
diff changeset
   286
 \internal
hgs
parents: 22
diff changeset
   287
 */
hgs
parents: 22
diff changeset
   288
void MpMpxPlaybackFrameworkWrapperPrivate::applyAudioEffects()
hgs
parents: 22
diff changeset
   289
{
hgs
parents: 22
diff changeset
   290
    TX_ENTRY
hgs
parents: 22
diff changeset
   291
    TRAPD( err, iPlaybackUtility->CommandL( EPbApplyEffect, KAudioEffectsID ) );
hgs
parents: 22
diff changeset
   292
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   293
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   294
    }
hgs
parents: 22
diff changeset
   295
    TX_EXIT
hgs
parents: 22
diff changeset
   296
}
hgs
parents: 22
diff changeset
   297
hgs
parents: 22
diff changeset
   298
/*!
hgs
parents: 22
diff changeset
   299
 \internal
hgs
parents: 22
diff changeset
   300
 */
hgs
parents: 22
diff changeset
   301
void MpMpxPlaybackFrameworkWrapperPrivate::applyEqualizer()
hgs
parents: 22
diff changeset
   302
{
hgs
parents: 22
diff changeset
   303
    TX_ENTRY
hgs
parents: 22
diff changeset
   304
    TRAPD( err, iPlaybackUtility->CommandL( EPbApplyEffect, KEqualizerID ) );
hgs
parents: 22
diff changeset
   305
    if ( err != KErrNone ) {
hgs
parents: 22
diff changeset
   306
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 22
diff changeset
   307
    }
hgs
parents: 22
diff changeset
   308
    TX_EXIT
hgs
parents: 22
diff changeset
   309
}
hgs
parents: 22
diff changeset
   310
hgs
parents: 22
diff changeset
   311
/*!
47
hgs
parents: 45
diff changeset
   312
 \internal
hgs
parents: 45
diff changeset
   313
 */
hgs
parents: 45
diff changeset
   314
void MpMpxPlaybackFrameworkWrapperPrivate::getMaxVolume()
hgs
parents: 45
diff changeset
   315
{
hgs
parents: 45
diff changeset
   316
    TX_ENTRY
hgs
parents: 45
diff changeset
   317
    TRAPD( err, iPlaybackUtility->PropertyL( *this, EPbPropertyMaxVolume ) );
hgs
parents: 45
diff changeset
   318
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   319
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   320
    }
hgs
parents: 45
diff changeset
   321
    TX_EXIT
hgs
parents: 45
diff changeset
   322
}
hgs
parents: 45
diff changeset
   323
hgs
parents: 45
diff changeset
   324
/*!
hgs
parents: 45
diff changeset
   325
 \internal
hgs
parents: 45
diff changeset
   326
 */
hgs
parents: 45
diff changeset
   327
void MpMpxPlaybackFrameworkWrapperPrivate::getVolume()
hgs
parents: 45
diff changeset
   328
{
hgs
parents: 45
diff changeset
   329
    TX_ENTRY
hgs
parents: 45
diff changeset
   330
    TRAPD( err, iPlaybackUtility->PropertyL( *this, EPbPropertyVolume ) );
hgs
parents: 45
diff changeset
   331
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   332
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   333
    }
hgs
parents: 45
diff changeset
   334
    TX_EXIT
hgs
parents: 45
diff changeset
   335
}
hgs
parents: 45
diff changeset
   336
hgs
parents: 45
diff changeset
   337
/*!
hgs
parents: 45
diff changeset
   338
 \internal
hgs
parents: 45
diff changeset
   339
 */
hgs
parents: 45
diff changeset
   340
void MpMpxPlaybackFrameworkWrapperPrivate::increaseVolume()
hgs
parents: 45
diff changeset
   341
{
hgs
parents: 45
diff changeset
   342
    TX_ENTRY
hgs
parents: 45
diff changeset
   343
    TRAPD( err, iPlaybackUtility->CommandL( EPbCmdIncreaseVolume ) );
hgs
parents: 45
diff changeset
   344
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   345
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   346
    }
hgs
parents: 45
diff changeset
   347
    TX_EXIT
hgs
parents: 45
diff changeset
   348
}
hgs
parents: 45
diff changeset
   349
hgs
parents: 45
diff changeset
   350
/*!
hgs
parents: 45
diff changeset
   351
 \internal
hgs
parents: 45
diff changeset
   352
 */
hgs
parents: 45
diff changeset
   353
void MpMpxPlaybackFrameworkWrapperPrivate::decreaseVolume()
hgs
parents: 45
diff changeset
   354
{
hgs
parents: 45
diff changeset
   355
    TX_ENTRY
hgs
parents: 45
diff changeset
   356
    TRAPD( err, iPlaybackUtility->CommandL( EPbCmdDecreaseVolume ) );
hgs
parents: 45
diff changeset
   357
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   358
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   359
    }
hgs
parents: 45
diff changeset
   360
    TX_EXIT
hgs
parents: 45
diff changeset
   361
}
hgs
parents: 45
diff changeset
   362
hgs
parents: 45
diff changeset
   363
/*!
hgs
parents: 45
diff changeset
   364
 \internal
hgs
parents: 45
diff changeset
   365
 */
hgs
parents: 45
diff changeset
   366
void MpMpxPlaybackFrameworkWrapperPrivate::setVolume( int value )
hgs
parents: 45
diff changeset
   367
{
hgs
parents: 45
diff changeset
   368
    TX_ENTRY
hgs
parents: 45
diff changeset
   369
    TRAPD( err, iPlaybackUtility->CommandL( EPbCmdSetVolume, value ) );
hgs
parents: 45
diff changeset
   370
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   371
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   372
    }
hgs
parents: 45
diff changeset
   373
    TX_EXIT
hgs
parents: 45
diff changeset
   374
}
hgs
parents: 45
diff changeset
   375
hgs
parents: 45
diff changeset
   376
/*!
hgs
parents: 45
diff changeset
   377
 \internal
hgs
parents: 45
diff changeset
   378
 */
hgs
parents: 45
diff changeset
   379
void MpMpxPlaybackFrameworkWrapperPrivate::getMuteState()
hgs
parents: 45
diff changeset
   380
{
hgs
parents: 45
diff changeset
   381
    TX_ENTRY
hgs
parents: 45
diff changeset
   382
    TRAPD( err, iPlaybackUtility->PropertyL( *this, EPbPropertyMute ) );
hgs
parents: 45
diff changeset
   383
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   384
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   385
    }
hgs
parents: 45
diff changeset
   386
    TX_EXIT
hgs
parents: 45
diff changeset
   387
}
hgs
parents: 45
diff changeset
   388
hgs
parents: 45
diff changeset
   389
/*!
hgs
parents: 45
diff changeset
   390
 \internal
hgs
parents: 45
diff changeset
   391
 */
hgs
parents: 45
diff changeset
   392
void MpMpxPlaybackFrameworkWrapperPrivate::mute()
hgs
parents: 45
diff changeset
   393
{
hgs
parents: 45
diff changeset
   394
    TX_ENTRY
hgs
parents: 45
diff changeset
   395
    TRAPD( err, iPlaybackUtility->CommandL( EPbCmdMuteVolume ) );
hgs
parents: 45
diff changeset
   396
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   397
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   398
    }
hgs
parents: 45
diff changeset
   399
    TX_EXIT
hgs
parents: 45
diff changeset
   400
}
hgs
parents: 45
diff changeset
   401
hgs
parents: 45
diff changeset
   402
/*!
hgs
parents: 45
diff changeset
   403
 \internal
hgs
parents: 45
diff changeset
   404
 */
hgs
parents: 45
diff changeset
   405
void MpMpxPlaybackFrameworkWrapperPrivate::unmute()
hgs
parents: 45
diff changeset
   406
{
hgs
parents: 45
diff changeset
   407
    TX_ENTRY
hgs
parents: 45
diff changeset
   408
    TRAPD( err, iPlaybackUtility->CommandL( EPbCmdUnMuteVolume ) );
hgs
parents: 45
diff changeset
   409
    if ( err != KErrNone ) {
hgs
parents: 45
diff changeset
   410
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 45
diff changeset
   411
    }
hgs
parents: 45
diff changeset
   412
    TX_EXIT
hgs
parents: 45
diff changeset
   413
}
hgs
parents: 45
diff changeset
   414
hgs
parents: 45
diff changeset
   415
/*!
45
hgs
parents: 43
diff changeset
   416
 \ Closes current playback source.
hgs
parents: 43
diff changeset
   417
 */
hgs
parents: 43
diff changeset
   418
void MpMpxPlaybackFrameworkWrapperPrivate::closeCurrentPlayback()
hgs
parents: 43
diff changeset
   419
{
hgs
parents: 43
diff changeset
   420
    TX_ENTRY
hgs
parents: 43
diff changeset
   421
    TRAPD( err, DoCloseCurrentPlaybackL() );
hgs
parents: 43
diff changeset
   422
    if ( err != KErrNone ) {
hgs
parents: 43
diff changeset
   423
        TX_LOG_ARGS("Error: " << err << "; should never get here.");
hgs
parents: 43
diff changeset
   424
    }
hgs
parents: 43
diff changeset
   425
    TX_EXIT
hgs
parents: 43
diff changeset
   426
}
hgs
parents: 43
diff changeset
   427
hgs
parents: 43
diff changeset
   428
/*!
35
hgs
parents: 22
diff changeset
   429
 \internal
hgs
parents: 22
diff changeset
   430
 */
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   431
MpPlaybackData *MpMpxPlaybackFrameworkWrapperPrivate::playbackData()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   432
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   433
    return iPlaybackData;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   434
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   435
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   436
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   437
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   438
 */
43
hgs
parents: 36
diff changeset
   439
void MpMpxPlaybackFrameworkWrapperPrivate::retrieveSongDetails()
hgs
parents: 36
diff changeset
   440
{
hgs
parents: 36
diff changeset
   441
    TX_ENTRY
hgs
parents: 36
diff changeset
   442
    TRAPD( err, DoRetrieveSongDetailsL(true) );
hgs
parents: 36
diff changeset
   443
    if ( err == KErrNone ) {
hgs
parents: 36
diff changeset
   444
        iDetailsRequest = true;
hgs
parents: 36
diff changeset
   445
    }
hgs
parents: 36
diff changeset
   446
    else {
hgs
parents: 36
diff changeset
   447
        TX_LOG_ARGS( "Error: " << err << "; should never get here." );
hgs
parents: 36
diff changeset
   448
    }
hgs
parents: 36
diff changeset
   449
    TX_EXIT
hgs
parents: 36
diff changeset
   450
}
hgs
parents: 36
diff changeset
   451
hgs
parents: 36
diff changeset
   452
/*!
hgs
parents: 36
diff changeset
   453
 \internal
hgs
parents: 36
diff changeset
   454
 */
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   455
void MpMpxPlaybackFrameworkWrapperPrivate::HandlePlaybackMessage( CMPXMessage *aMessage, TInt aError )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   456
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   457
    TX_ENTRY_ARGS("aError=" << aError);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   458
    if ( aError == KErrNone && aMessage ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   459
        TRAP_IGNORE( DoHandlePlaybackMessageL(*aMessage) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   460
    }
51
hgs
parents: 47
diff changeset
   461
    else{
hgs
parents: 47
diff changeset
   462
        TRAP_IGNORE( DoHandlePlaybackErrorL(aError) );
hgs
parents: 47
diff changeset
   463
	}
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   464
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   465
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   466
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   467
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   468
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   469
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   470
void MpMpxPlaybackFrameworkWrapperPrivate::HandlePropertyL(
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   471
    TMPXPlaybackProperty aProperty,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   472
    TInt aValue,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   473
    TInt aError )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   474
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   475
    TX_ENTRY_ARGS("aProperty=" << aProperty << "aValue=" << aValue << "aError=" << aError)
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   476
    if ( KErrNone == aError ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   477
        switch ( aProperty  ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   478
            case EPbPropertyPosition:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   479
                TX_LOG_ARGS("EPbPropertyPosition")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   480
                iPlaybackData->setPosition(aValue);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   481
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   482
            case EPbPropertyDuration:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   483
                TX_LOG_ARGS("EPbPropertyDuration")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   484
                iPlaybackData->setDuration(aValue);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   485
                break;
47
hgs
parents: 45
diff changeset
   486
            case EPbPropertyVolume:
hgs
parents: 45
diff changeset
   487
                TX_LOG_ARGS("EPbPropertyVolume")
hgs
parents: 45
diff changeset
   488
                q_ptr->emit volumePropertyChanged( MpCommon::Volume, aValue );
hgs
parents: 45
diff changeset
   489
                break;
hgs
parents: 45
diff changeset
   490
            case EPbPropertyMaxVolume:
hgs
parents: 45
diff changeset
   491
                TX_LOG_ARGS("EPbPropertyMaxVolume")
hgs
parents: 45
diff changeset
   492
                q_ptr->emit volumePropertyChanged( MpCommon::MaxVolume, aValue );
hgs
parents: 45
diff changeset
   493
                break;
hgs
parents: 45
diff changeset
   494
            case EPbPropertyMute:
hgs
parents: 45
diff changeset
   495
                TX_LOG_ARGS("EPbPropertyMute")
hgs
parents: 45
diff changeset
   496
                q_ptr->emit volumePropertyChanged( MpCommon::MuteState, aValue );
hgs
parents: 45
diff changeset
   497
                break;
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   498
            default:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   499
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   500
        }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   501
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   502
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   503
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   504
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   505
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   506
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   507
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   508
void MpMpxPlaybackFrameworkWrapperPrivate::HandleSubPlayerNamesL(
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   509
    TUid aPlayer,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   510
    const MDesCArray *aSubPlayers,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   511
    TBool aComplete,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   512
    TInt aError )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   513
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   514
    Q_UNUSED(aPlayer);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   515
    Q_UNUSED(aSubPlayers);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   516
    Q_UNUSED(aComplete);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   517
    Q_UNUSED(aError);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   518
    TX_LOG
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   519
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   520
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   522
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   524
void MpMpxPlaybackFrameworkWrapperPrivate::HandleMediaL(
43
hgs
parents: 36
diff changeset
   525
    const CMPXMedia& aMedia,
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   526
    TInt aError )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   527
{
43
hgs
parents: 36
diff changeset
   528
    TX_ENTRY
hgs
parents: 36
diff changeset
   529
    if ( KErrNone != aError ){
hgs
parents: 36
diff changeset
   530
        TX_LOG_ARGS( "Error: " << aError << "; should never get here." );
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   531
        TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   532
        return;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   533
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   534
43
hgs
parents: 36
diff changeset
   535
    if ( iDetailsRequest ) {
hgs
parents: 36
diff changeset
   536
        iDetailsRequest = false;
hgs
parents: 36
diff changeset
   537
        iSongData->setMpxMedia( aMedia );
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   538
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   539
    else {
43
hgs
parents: 36
diff changeset
   540
        bool changed = false;
hgs
parents: 36
diff changeset
   541
        if ( aMedia.IsSupported( KMPXMediaGeneralTitle ) ) {
hgs
parents: 36
diff changeset
   542
            changed |= iPlaybackData->setTitle(
hgs
parents: 36
diff changeset
   543
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   544
                    aMedia.ValueText( KMPXMediaGeneralTitle ).Ptr(),
hgs
parents: 36
diff changeset
   545
                    aMedia.ValueText( KMPXMediaGeneralTitle ).Length() ) );
hgs
parents: 36
diff changeset
   546
        }
hgs
parents: 36
diff changeset
   547
        else {
hgs
parents: 36
diff changeset
   548
            changed |= iPlaybackData->setTitle(
hgs
parents: 36
diff changeset
   549
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   550
                    aMedia.ValueText( KMPXMediaGeneralUri ).Ptr(),
hgs
parents: 36
diff changeset
   551
                    aMedia.ValueText( KMPXMediaGeneralUri ).Length() ) );
hgs
parents: 36
diff changeset
   552
        }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   553
43
hgs
parents: 36
diff changeset
   554
        if ( aMedia.IsSupported( KMPXMediaMusicArtist ) ) {
hgs
parents: 36
diff changeset
   555
            changed |= iPlaybackData->setArtist(
hgs
parents: 36
diff changeset
   556
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   557
                    aMedia.ValueText( KMPXMediaMusicArtist ).Ptr(),
hgs
parents: 36
diff changeset
   558
                    aMedia.ValueText( KMPXMediaMusicArtist ).Length() ) );
hgs
parents: 36
diff changeset
   559
        }
hgs
parents: 36
diff changeset
   560
        else {
hgs
parents: 36
diff changeset
   561
                changed |= iPlaybackData->setArtist(QString());
hgs
parents: 36
diff changeset
   562
        }
hgs
parents: 36
diff changeset
   563
        if ( aMedia.IsSupported( KMPXMediaMusicAlbum ) ) {
hgs
parents: 36
diff changeset
   564
            changed |= iPlaybackData->setAlbum(
hgs
parents: 36
diff changeset
   565
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   566
                    aMedia.ValueText( KMPXMediaMusicAlbum ).Ptr(),
hgs
parents: 36
diff changeset
   567
                    aMedia.ValueText( KMPXMediaMusicAlbum ).Length() ) );
hgs
parents: 36
diff changeset
   568
        }
hgs
parents: 36
diff changeset
   569
        else {
hgs
parents: 36
diff changeset
   570
                changed |= iPlaybackData->setAlbum(QString());
hgs
parents: 36
diff changeset
   571
        }
hgs
parents: 36
diff changeset
   572
        if (aMedia.IsSupported(TMPXAttribute(KMPXMediaGeneralMimeType))) {
hgs
parents: 36
diff changeset
   573
hgs
parents: 36
diff changeset
   574
                const TDesC& mimeType = aMedia.ValueText ( KMPXMediaGeneralMimeType );
35
hgs
parents: 22
diff changeset
   575
43
hgs
parents: 36
diff changeset
   576
                bool realAudioMode =
hgs
parents: 36
diff changeset
   577
                        ( mimeType.Compare( KMPXPnRealAudioMimeType ) == 0 ) ||
hgs
parents: 36
diff changeset
   578
                        ( mimeType.Compare( KMPXRealAudioMimeType ) == 0) ||
hgs
parents: 36
diff changeset
   579
                        ( mimeType.Compare( KMPXRnRealAudioMimeType ) == 0 );
hgs
parents: 36
diff changeset
   580
hgs
parents: 36
diff changeset
   581
                changed |= iPlaybackData->setRealAudio( realAudioMode );
hgs
parents: 36
diff changeset
   582
        }
hgs
parents: 36
diff changeset
   583
hgs
parents: 36
diff changeset
   584
        if ( aMedia.IsSupported( KMPXMediaGeneralUri) ) {
hgs
parents: 36
diff changeset
   585
            iPlaybackData->setUri(
hgs
parents: 36
diff changeset
   586
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   587
                    aMedia.ValueText( KMPXMediaGeneralUri ).Ptr(),
hgs
parents: 36
diff changeset
   588
                    aMedia.ValueText( KMPXMediaGeneralUri ).Length() ) );
hgs
parents: 36
diff changeset
   589
        }
hgs
parents: 36
diff changeset
   590
        if (aMedia.IsSupported(TMPXAttribute(KMPXMediaMusicAlbumArtFileName))) {
hgs
parents: 36
diff changeset
   591
            iPlaybackData->setAlbumArtUri(
hgs
parents: 36
diff changeset
   592
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   593
                    aMedia.ValueText(KMPXMediaMusicAlbumArtFileName).Ptr(),
hgs
parents: 36
diff changeset
   594
                    aMedia.ValueText(KMPXMediaMusicAlbumArtFileName).Length()));
hgs
parents: 36
diff changeset
   595
        }
hgs
parents: 36
diff changeset
   596
        else {
hgs
parents: 36
diff changeset
   597
            iPlaybackData->setAlbumArtUri(
hgs
parents: 36
diff changeset
   598
                QString::fromUtf16(
hgs
parents: 36
diff changeset
   599
                    aMedia.ValueText( KMPXMediaGeneralUri ).Ptr(),
hgs
parents: 36
diff changeset
   600
                    aMedia.ValueText( KMPXMediaGeneralUri ).Length() ) );
hgs
parents: 36
diff changeset
   601
        }
hgs
parents: 36
diff changeset
   602
        if ( aMedia.IsSupported( KMPXMediaMusicAlbumId) ) {
hgs
parents: 36
diff changeset
   603
        changed |= iPlaybackData->setAlbumId(
hgs
parents: 36
diff changeset
   604
                aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaMusicAlbumId ) );
hgs
parents: 36
diff changeset
   605
        }
hgs
parents: 36
diff changeset
   606
hgs
parents: 36
diff changeset
   607
        if ( aMedia.IsSupported( KMPXMediaGeneralId ) ) {
hgs
parents: 36
diff changeset
   608
        changed |= iPlaybackData->setId(
hgs
parents: 36
diff changeset
   609
                    aMedia.ValueTObjectL<TInt>( KMPXMediaGeneralId ) );
hgs
parents: 36
diff changeset
   610
        }
hgs
parents: 36
diff changeset
   611
hgs
parents: 36
diff changeset
   612
        if ( changed ) {
hgs
parents: 36
diff changeset
   613
            // This is required to propagate the playback info to UI at once.
hgs
parents: 36
diff changeset
   614
            iPlaybackData->commitPlaybackInfo();
hgs
parents: 36
diff changeset
   615
        }
35
hgs
parents: 22
diff changeset
   616
    }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   617
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   618
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   619
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   620
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   621
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   622
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   623
void MpMpxPlaybackFrameworkWrapperPrivate::DoInitL()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   624
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   625
    TX_ENTRY
43
hgs
parents: 36
diff changeset
   626
    iPlaybackUtility = MMPXPlaybackUtility::UtilityL( iHostUid );
35
hgs
parents: 22
diff changeset
   627
    iPlaybackUtility->AddObserverL( *this );
hgs
parents: 22
diff changeset
   628
    iPlaybackData = new MpPlaybackData();
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   629
35
hgs
parents: 22
diff changeset
   630
    UpdateStateL();
hgs
parents: 22
diff changeset
   631
    if ( iPlaybackUtility->Source() ) {
43
hgs
parents: 36
diff changeset
   632
        DoRetrieveSongDetailsL(false);
35
hgs
parents: 22
diff changeset
   633
    }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   634
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   635
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   636
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   637
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   638
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   639
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   640
void MpMpxPlaybackFrameworkWrapperPrivate::DoPlayL( QString aFilename )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   641
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   642
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   643
    if ( !aFilename.isNull() ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   644
        const TDesC& playTitle = TPtrC(reinterpret_cast<const TText*>( aFilename.constData() ));
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   645
        iPlaybackUtility->InitL( playTitle );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   646
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   647
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   648
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   649
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   650
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   651
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   652
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   653
void MpMpxPlaybackFrameworkWrapperPrivate::DoPlayL( const XQSharableFile& file )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   654
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   655
    TX_ENTRY
43
hgs
parents: 36
diff changeset
   656
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   657
    RFile xqfile;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   658
    bool ok = file.getHandle( xqfile );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   659
    if ( ok ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   660
        iPlaybackUtility->InitL( xqfile );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   661
    }
36
hgs
parents: 35
diff changeset
   662
    else {
hgs
parents: 35
diff changeset
   663
        TX_LOG_ARGS("Error: " << ok << "; should never get here.");
hgs
parents: 35
diff changeset
   664
    }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   665
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   666
}
36
hgs
parents: 35
diff changeset
   667
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   668
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   669
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   670
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   671
void MpMpxPlaybackFrameworkWrapperPrivate::DoHandlePlaybackMessageL( const CMPXMessage& aMessage )
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   672
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   673
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   674
    TMPXMessageId id( aMessage.ValueTObjectL<TMPXMessageId>( KMPXMessageGeneralId ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   675
    if ( KMPXMessageGeneral == id ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   676
        TInt event( aMessage.ValueTObjectL<TInt>( KMPXMessageGeneralEvent ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   677
        TInt type( aMessage.ValueTObjectL<TInt>( KMPXMessageGeneralType ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   678
        TInt data( aMessage.ValueTObjectL<TInt>( KMPXMessageGeneralData ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   679
        TX_LOG_ARGS("event=" << event << ", type=" << type << ", data=" << data);
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   680
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   681
        switch ( event ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   682
            case TMPXPlaybackMessage::EStateChanged:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   683
                TX_LOG_ARGS("TMPXPlaybackMessage::EStateChanged")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   684
                UpdateStateL();
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   685
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   686
            case TMPXPlaybackMessage::EInitializeComplete:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   687
                TX_LOG_ARGS("TMPXPlaybackMessage::EInitializeComplete")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   688
                if ( data ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   689
                    // Play the track
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   690
                    CMPXCommand *cmd( CMPXCommand::NewL() );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   691
                    CleanupStack::PushL( cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   692
                    cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   693
                            KMPXCommandIdPlaybackGeneral );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   694
                    cmd->SetTObjectValueL<TInt>(
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   695
                            KMPXCommandPlaybackGeneralType,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   696
                            EPbCmdPlay );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   697
                    cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   698
                            ETrue );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   699
                    cmd->SetTObjectValueL<TBool>(
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   700
                            KMPXCommandPlaybackGeneralNoBuffer,
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   701
                            ETrue );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   702
                    iPlaybackUtility->CommandL( *cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   703
                    CleanupStack::PopAndDestroy( cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   704
                }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   705
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   706
            case TMPXPlaybackMessage::EPropertyChanged:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   707
                TX_LOG_ARGS("TMPXPlaybackMessage::EPropertyChanged")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   708
                TMPXPlaybackProperty property;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   709
                property = static_cast<TMPXPlaybackProperty>( type );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   710
                HandlePropertyL( property, data, KErrNone );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   711
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   712
            case TMPXPlaybackMessage::EMediaChanged:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   713
                TX_LOG_ARGS("TMPXPlaybackMessage::EMediaChanged")
43
hgs
parents: 36
diff changeset
   714
                DoRetrieveSongDetailsL(false);
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   715
                break;
35
hgs
parents: 22
diff changeset
   716
            case TMPXPlaybackMessage::EPlaylistUpdated:
hgs
parents: 22
diff changeset
   717
                TX_LOG_ARGS( "EPlaylistUpdated" )
47
hgs
parents: 45
diff changeset
   718
                // coverity[fallthrough]
35
hgs
parents: 22
diff changeset
   719
            case TMPXPlaybackMessage::EActivePlayerChanged:
hgs
parents: 22
diff changeset
   720
                TX_LOG_ARGS( "EActivePlayerChanged or fall through from EPlaylistUpdated" )
hgs
parents: 22
diff changeset
   721
                UpdateStateL();
43
hgs
parents: 36
diff changeset
   722
                DoRetrieveSongDetailsL(false);
35
hgs
parents: 22
diff changeset
   723
                break;
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   724
            default:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   725
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   726
        }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   727
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   728
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   729
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   730
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   731
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   732
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   733
 */
51
hgs
parents: 47
diff changeset
   734
void MpMpxPlaybackFrameworkWrapperPrivate::DoHandlePlaybackErrorL( const TInt aError )
hgs
parents: 47
diff changeset
   735
{
hgs
parents: 47
diff changeset
   736
    TX_ENTRY
hgs
parents: 47
diff changeset
   737
    switch ( aError ) {
55
hgs
parents: 51
diff changeset
   738
        case KErrNotSupported:
hgs
parents: 51
diff changeset
   739
        case KErrCorrupt:{
hgs
parents: 51
diff changeset
   740
            MMPXSource* source( iPlaybackUtility->Source() );
hgs
parents: 51
diff changeset
   741
            if ( source ){
hgs
parents: 51
diff changeset
   742
                CMPXCollectionPlaylist* playlist( source->PlaylistL() );
hgs
parents: 51
diff changeset
   743
                if ( playlist ){
hgs
parents: 51
diff changeset
   744
                    MpPlaybackData* pData = playbackData();
hgs
parents: 51
diff changeset
   745
                    pData->setCorrupted( playlist->Path().IdOfIndex( playlist->Index() ).iId2 );
hgs
parents: 51
diff changeset
   746
                           
hgs
parents: 51
diff changeset
   747
                    if ( playlist->Index() == ( playlist->Count()-1 ) ){
hgs
parents: 51
diff changeset
   748
                        //reach the end of list, pop up corrupt notification
hgs
parents: 51
diff changeset
   749
                        emit q_ptr->corruptedStop(true);
51
hgs
parents: 47
diff changeset
   750
                    }
55
hgs
parents: 51
diff changeset
   751
                    else{
hgs
parents: 51
diff changeset
   752
                        //corrupted song; there is more song in the playlist
hgs
parents: 51
diff changeset
   753
                        emit q_ptr->corruptedStop(false);
hgs
parents: 51
diff changeset
   754
                    }
51
hgs
parents: 47
diff changeset
   755
                }
55
hgs
parents: 51
diff changeset
   756
                else{
hgs
parents: 51
diff changeset
   757
                    // No playlist;single file playback.
hgs
parents: 51
diff changeset
   758
                    emit q_ptr->corruptedStop(true);
hgs
parents: 51
diff changeset
   759
                }
51
hgs
parents: 47
diff changeset
   760
            }
55
hgs
parents: 51
diff changeset
   761
            break;
hgs
parents: 51
diff changeset
   762
        }
hgs
parents: 51
diff changeset
   763
        default:
hgs
parents: 51
diff changeset
   764
            break;
hgs
parents: 51
diff changeset
   765
    }
51
hgs
parents: 47
diff changeset
   766
    TX_EXIT
hgs
parents: 47
diff changeset
   767
}
hgs
parents: 47
diff changeset
   768
hgs
parents: 47
diff changeset
   769
/*!
hgs
parents: 47
diff changeset
   770
 \internal
hgs
parents: 47
diff changeset
   771
 */
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   772
void MpMpxPlaybackFrameworkWrapperPrivate::ForceStopL()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   773
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   774
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   775
    if ( iPlaybackData->playbackState() != MpPlaybackData::Stopped ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   776
        // Stop the track
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   777
        CMPXCommand *cmd( CMPXCommand::NewL() );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   778
        CleanupStack::PushL( cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   779
        cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   780
        cmd->SetTObjectValueL<TInt>( KMPXCommandPlaybackGeneralType, EPbCmdStop );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   781
        cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   782
        cmd->SetTObjectValueL<TBool>( KMPXCommandPlaybackGeneralNoBuffer, ETrue );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   783
        iPlaybackUtility->CommandL( *cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   784
        CleanupStack::PopAndDestroy( cmd );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   785
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   786
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   787
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   788
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   789
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   790
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   791
 */
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   792
void MpMpxPlaybackFrameworkWrapperPrivate::UpdateStateL()
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   793
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   794
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   795
    if ( !iPlaybackUtility->Source() ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   796
        TX_LOG_ARGS("There is no source")
36
hgs
parents: 35
diff changeset
   797
        //this to prevent mutiple calls to state change.
hgs
parents: 35
diff changeset
   798
        if ( iPlaybackData->playbackState() != MpPlaybackData::NotPlaying ) {
hgs
parents: 35
diff changeset
   799
            iPlaybackData->setPlaybackState( MpPlaybackData::NotPlaying );
hgs
parents: 35
diff changeset
   800
            iPlaybackData->resetData();
hgs
parents: 35
diff changeset
   801
        }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   802
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   803
    else {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   804
        switch ( iPlaybackUtility->StateL() ) {
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   805
            case EPbStatePlaying:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   806
                TX_LOG_ARGS("EPbStatePlaying")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   807
                iPlaybackData->setPlaybackState( MpPlaybackData::Playing );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   808
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   809
            case EPbStatePaused:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   810
                TX_LOG_ARGS("EPbStatePaused")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   811
                iPlaybackData->setPlaybackState( MpPlaybackData::Paused );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   812
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   813
            case EPbStateStopped:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   814
                TX_LOG_ARGS("EPbStateStopped")
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   815
                iPlaybackData->setPlaybackState( MpPlaybackData::Stopped );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   816
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   817
            default:
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   818
                break;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   819
        }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   820
    }
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   821
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   822
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   823
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   824
/*!
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   825
 \internal
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   826
 */
43
hgs
parents: 36
diff changeset
   827
void MpMpxPlaybackFrameworkWrapperPrivate::DoRetrieveSongDetailsL( bool detailsRequest )
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   828
{
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   829
    TX_ENTRY
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   830
    MMPXSource *mediaSrc = iPlaybackUtility->Source();
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   831
    User::LeaveIfNull( mediaSrc );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   832
    RArray<TMPXAttribute> requestedAttr;
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   833
    CleanupClosePushL( requestedAttr );
43
hgs
parents: 36
diff changeset
   834
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralId ) );
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   835
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralTitle ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   836
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicArtist ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   837
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicAlbum ) );
43
hgs
parents: 36
diff changeset
   838
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicAlbumId ) );
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   839
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralUri ) );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   840
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicAlbumArtFileName ) );
43
hgs
parents: 36
diff changeset
   841
    requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralMimeType ) );
hgs
parents: 36
diff changeset
   842
    if ( detailsRequest ) {
hgs
parents: 36
diff changeset
   843
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicAlbumTrack ) );
hgs
parents: 36
diff changeset
   844
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicComposer ) );
hgs
parents: 36
diff changeset
   845
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicYear ) );
hgs
parents: 36
diff changeset
   846
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicGenre ) );
hgs
parents: 36
diff changeset
   847
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralDuration ) );
hgs
parents: 36
diff changeset
   848
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaAudioBitrate ) );
hgs
parents: 36
diff changeset
   849
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaAudioSamplerate ) );
hgs
parents: 36
diff changeset
   850
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaGeneralCopyright ) );
hgs
parents: 36
diff changeset
   851
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaMusicURL ) );
hgs
parents: 36
diff changeset
   852
        requestedAttr.AppendL( TMPXAttribute( KMPXMediaDrmProtected ) );
hgs
parents: 36
diff changeset
   853
    }
22
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   854
    mediaSrc->MediaL( requestedAttr.Array(), *this );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   855
    CleanupStack::PopAndDestroy( &requestedAttr );
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   856
    TX_EXIT
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   857
}
ecf06a08d4d9 Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   858
45
hgs
parents: 43
diff changeset
   859
/*!
hgs
parents: 43
diff changeset
   860
 \internal
hgs
parents: 43
diff changeset
   861
 */
hgs
parents: 43
diff changeset
   862
void MpMpxPlaybackFrameworkWrapperPrivate::DoCloseCurrentPlaybackL()
hgs
parents: 43
diff changeset
   863
{
hgs
parents: 43
diff changeset
   864
    TX_ENTRY
hgs
parents: 43
diff changeset
   865
    if( iPlaybackUtility->Source() ) {
hgs
parents: 43
diff changeset
   866
        iPlaybackUtility->CommandL( EPbCmdClose );
hgs
parents: 43
diff changeset
   867
    }
hgs
parents: 43
diff changeset
   868
    TX_EXIT
hgs
parents: 43
diff changeset
   869
}
hgs
parents: 43
diff changeset
   870