utilities/mpnowplayingbanner/inc/mpnowplayingbackend_p.h
branchGCC_SURGE
changeset 44 eff9df3d9c98
parent 30 b95ddb5a0d10
parent 42 79c49924ae23
equal deleted inserted replaced
30:b95ddb5a0d10 44:eff9df3d9c98
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Music Player now playing widget backend - Private.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPNOWPLAYINGBACKEND_P_H
       
    19 #define MPNOWPLAYINGBACKEND_P_H
       
    20 
       
    21 #include <mpxplaybackobserver.h>
       
    22 #include "mpnowplayingbackend.h"
       
    23 
       
    24 
       
    25 //forward declartions
       
    26 class MMPXPlaybackUtility;
       
    27 
       
    28 //class declaration
       
    29 class MpNowPlayingBackEndPrivate : public MMPXPlaybackObserver,
       
    30                                    public MMPXPlaybackCallback
       
    31 {
       
    32 
       
    33 public:
       
    34     explicit MpNowPlayingBackEndPrivate(long int playerId,
       
    35         MpNowPlayingBackEnd *qq);
       
    36     virtual ~MpNowPlayingBackEndPrivate();
       
    37 
       
    38     void update();
       
    39     void playPause();
       
    40 
       
    41 public: //from MMPXPlaybackObserver
       
    42     void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError );
       
    43 
       
    44 public: //from MMPXPlaybackCallback
       
    45     void HandlePropertyL( TMPXPlaybackProperty aProperty,
       
    46                           TInt aValue,
       
    47                           TInt aError);
       
    48     void HandleSubPlayerNamesL( TUid aPlayer,
       
    49                                 const MDesCArray* aSubPlayers,
       
    50                                 TBool aComplete,
       
    51                                 TInt aError );
       
    52     void HandleMediaL( const CMPXMedia& aProperties, TInt aError );
       
    53 
       
    54 private:
       
    55     void RequestMediaL();
       
    56     void UpdateStateL();
       
    57     void DoPlayPauseL();
       
    58     void DoHandlePlaybackMessageL( const CMPXMessage& message );
       
    59 
       
    60 private:
       
    61     MpNowPlayingBackEnd     *q_ptr;             // not owned
       
    62     SimplifiedPlayerState   mPreviousState;
       
    63     MMPXPlaybackUtility     *mPlaybackUtility;  // owned
       
    64 };
       
    65 
       
    66 #endif  // MPNOWPLAYINGBACKEND_P_H