mpxplugins/viewplugins/views/upnpbrowsedialog/src/mpxplayermanagerstub.cpp
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Implementation of Winscw player manager stub
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    <e32std.h>
       
    21 
       
    22 #include "mpxplayermanagerstub.h"
       
    23 #include <mpxplaybackobserver.h>
       
    24 
       
    25 
       
    26 // ================= MEMBER FUNCTIONS =======================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CMPXPlayerManagerStub::CMPXPlayerManagerStub
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CMPXPlayerManagerStub::CMPXPlayerManagerStub()
       
    35     : CActive(EPriorityStandard)
       
    36     {
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CMPXPlayerManagerStub::ConstructL
       
    41 // Symbian 2nd phase constructor can leave.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 void CMPXPlayerManagerStub::ConstructL()
       
    45     {
       
    46     // Add this active object to the scheduler.
       
    47     CActiveScheduler::Add(this);
       
    48     }
       
    49 
       
    50 // Destructor
       
    51 CMPXPlayerManagerStub::~CMPXPlayerManagerStub()
       
    52     {
       
    53     delete iSubPlayersNamesArray;
       
    54     Cancel();
       
    55     }    
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CMPXPlayerManagerStub::RunL
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 void CMPXPlayerManagerStub::RunL()
       
    62     {
       
    63     delete iSubPlayersNamesArray;
       
    64     iSubPlayersNamesArray = NULL;
       
    65     iSubPlayersNamesArray = new (ELeave) CDesCArrayFlat(4);
       
    66     
       
    67     iSubPlayersNamesArray->AppendL(_L("Subplayer1"));
       
    68     iSubPlayersNamesArray->AppendL(_L("Local"));
       
    69     iSubPlayersNamesArray->AppendL(_L("Subplayer3"));
       
    70     iSubPlayersNamesArray->AppendL(_L("Subplayer4"));
       
    71     
       
    72     iCallback->HandleSubPlayerNamesL( iUid, iSubPlayersNamesArray, 
       
    73                                       ETrue, KErrNone);
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CMPXPlayerManagerStub::DoCancel
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 void CMPXPlayerManagerStub::DoCancel()
       
    81     {
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CMPXPlayerManagerStub::GetPlayerTypesL
       
    86 // -----------------------------------------------------------------------------
       
    87 //    
       
    88 void CMPXPlayerManagerStub::GetPlayerTypesL(RArray<TMPXPlaybackPlayerType>& /*aTypes*/)
       
    89     {
       
    90     }
       
    91     
       
    92 // -----------------------------------------------------------------------------
       
    93 // CMPXPlayerManagerStub::PlayerTypeDisplayNameL
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 HBufC* CMPXPlayerManagerStub::PlayerTypeDisplayNameL(TMPXPlaybackPlayerType /*aType*/)
       
    97     {
       
    98     return NULL;
       
    99     }
       
   100     
       
   101 // -----------------------------------------------------------------------------
       
   102 // CMPXPlayerManagerStub::GetPlayerListL
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 void CMPXPlayerManagerStub::GetPlayerListL(RArray<TUid>& /*aPlayers*/)
       
   106     {
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // CMPXPlayerManagerStub::GetPlayerListL
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 void CMPXPlayerManagerStub::GetPlayerListL(RArray<TUid>& /*aPlayers*/,
       
   114                            TMPXPlaybackPlayerType /*aType*/)
       
   115     {
       
   116     }
       
   117 
       
   118 // -----------------------------------------------------------------------------
       
   119 // CMPXPlayerManagerStub::SubPlayerNamesL
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 void CMPXPlayerManagerStub::SubPlayerNamesL(MMPXPlaybackCallback& aCallback,
       
   123                              TUid aPlayer)
       
   124     {
       
   125     iCallback = &aCallback;
       
   126     iUid = aPlayer;
       
   127     if (!IsActive())
       
   128         {
       
   129         iStatus = KRequestPending;
       
   130         SetActive();
       
   131         }
       
   132     TRequestStatus* status = &iStatus;
       
   133     User::RequestComplete(status, KErrNone);
       
   134     }
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 // CMPXPlayerManagerStub::SelectPlayersL
       
   138 // -----------------------------------------------------------------------------
       
   139 //
       
   140 void CMPXPlayerManagerStub::SelectPlayersL(TMPXPlaybackPlayerType /*aType*/)
       
   141     {
       
   142     }
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // CMPXPlayerManagerStub::SelectSubPlayerL
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 void CMPXPlayerManagerStub::SelectSubPlayerL(TUid /*aPlayer*/, TInt /*aSubPlayerIndex*/)
       
   149     {
       
   150     }
       
   151 
       
   152 // -----------------------------------------------------------------------------
       
   153 // CMPXPlayerManagerStub::SelectPlayerL
       
   154 // -----------------------------------------------------------------------------
       
   155 //
       
   156 void CMPXPlayerManagerStub::SelectPlayerL(TUid /*aPlayer*/)
       
   157     {
       
   158     }
       
   159 
       
   160 // -----------------------------------------------------------------------------
       
   161 // CMPXPlayerManagerStub::ClearSelectPlayersL
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 void CMPXPlayerManagerStub::ClearSelectPlayersL()
       
   165     {
       
   166     }
       
   167     
       
   168 // -----------------------------------------------------------------------------
       
   169 // CMPXPlayerManagerStub::GetSelectionL
       
   170 // -----------------------------------------------------------------------------
       
   171 //
       
   172 void CMPXPlayerManagerStub::GetSelectionL(TMPXPlaybackPlayerType& /*aType*/,
       
   173                            TUid& /*aPlayer*/,
       
   174                            TInt& /*aSubPlayerIndex*/,
       
   175                            HBufC*& /*aSubPlayerName*/)
       
   176     {
       
   177     }
       
   178     
       
   179 // -----------------------------------------------------------------------------
       
   180 // CMPXPlayerManagerStub::CurrentPlayer
       
   181 // -----------------------------------------------------------------------------
       
   182 //
       
   183 MMPXPlayer* CMPXPlayerManagerStub::CurrentPlayer()
       
   184     {
       
   185     return NULL;
       
   186     }
       
   187         
       
   188 // ----------------------------------------------------------------------------
       
   189 // Returns current sub player name
       
   190 // ----------------------------------------------------------------------------
       
   191 //     
       
   192 HBufC* CMPXPlayerManagerStub::GetSelectedSubPlayerNameL(TInt /*aSubPlayerIndex*/)
       
   193     {
       
   194     return NULL; 
       
   195     }        
       
   196 
       
   197 //  End of File